[PATCH v2 net-next] ionic: git_ts_info bit shifters

2021-04-13 Thread Shannon Nelson
All the uses of HWTSTAMP_FILTER_* values need to be bit shifters, not straight values. v2: fixed subject and added Cc Dan and SoB Allen Fixes: f8ba81da73fc ("ionic: add ethtool support for PTP") Cc: Dan Carpenter Signed-off-by: Shannon Nelson Signed-off-by: Allen Hubbe --- ..

[PATCH] ionic: git_ts_info bit shifters

2021-04-13 Thread Shannon Nelson
All the uses of HWTSTAMP_FILTER_* values need to be bit shifters, not straight values. Fixes: f8ba81da73fc ("ionic: add ethtool support for PTP") Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 26 +-- 1 file changed, 13 inserti

Re: [PATCH net-next] ionic: return -EFAULT if copy_to_user() fails

2021-04-13 Thread Shannon Nelson
On 4/13/21 3:47 AM, Dan Carpenter wrote: The copy_to_user() function returns the number of bytes that it wasn't able to copy. We want to return -EFAULT to the user. Fixes: fee6efce565d ("ionic: add hw timestamp support files") Signed-off-by: Dan Carpenter Acked-by:

Re: [PATCH net-next 0/8] ionic: hwstamp tweaks

2021-04-12 Thread Shannon Nelson
On 4/11/21 8:38 AM, Richard Cochran wrote: On Wed, Apr 07, 2021 at 04:19:53PM -0700, Shannon Nelson wrote: A few little changes after review comments and additional internal testing. This series is a delta against the previously posted one. Please follow the process by re-basing your changes

[PATCH net-next 8/8] ionic: extend ts_config set locking

2021-04-07 Thread Shannon Nelson
Make sure the configuration is locked before operating on it for the replay. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_phc.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b

[PATCH net-next 7/8] ionic: add ts_config replay

2021-04-07 Thread Shannon Nelson
Split the call into ionic_lif_hwstamp_set() to have two separate interfaces, one from the ioctl() for changing the configuration and one for replaying the current configuration after a FW RESET. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 2 +- .../net

[PATCH net-next 6/8] ionic: ignore EBUSY on queue start

2021-04-07 Thread Shannon Nelson
When starting the queues in the link-check, don't go into the BROKEN state if the return was EBUSY. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/

[PATCH net-next 5/8] ionic: re-start ptp after queues up

2021-04-07 Thread Shannon Nelson
When returning after a firmware reset, re-start the PTP after we've restarted the general queues. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/pensando/

[PATCH net-next 4/8] ionic: add SKBTX_IN_PROGRESS

2021-04-07 Thread Shannon Nelson
Set the SKBTX_IN_PROGRESS when offloading the Tx timestamp. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c

[PATCH net-next 3/8] ionic: check for valid tx_mode on SKBTX_HW_TSTAMP xmit

2021-04-07 Thread Shannon Nelson
Make sure the device is in a Tx offload mode before calling the hwstamp offload xmit. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b

[PATCH net-next 2/8] ionic: remove unnecessary compat ifdef

2021-04-07 Thread Shannon Nelson
We don't need to look for HAVE_HWSTAMP_TX_ONESTEP_P2P in the upstream kernel. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_phc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pen

[PATCH net-next 0/8] ionic: hwstamp tweaks

2021-04-07 Thread Shannon Nelson
A few little changes after review comments and additional internal testing. Shannon Nelson (8): ionic: fix up a couple of code style nits ionic: remove unnecessary compat ifdef ionic: check for valid tx_mode on SKBTX_HW_TSTAMP xmit ionic: add SKBTX_IN_PROGRESS ionic: re-start ptp after

[PATCH net-next 1/8] ionic: fix up a couple of code style nits

2021-04-07 Thread Shannon Nelson
Clean up variable declarations. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c

Re: [PATCH net-next 05/12] ionic: add hw timestamp support files

2021-04-06 Thread Shannon Nelson
On 4/6/21 5:27 PM, Richard Cochran wrote: On Tue, Apr 06, 2021 at 04:18:00PM -0700, Shannon Nelson wrote: On 4/5/21 11:17 AM, Richard Cochran wrote: On Mon, Apr 05, 2021 at 09:16:39AM -0700, Shannon Nelson wrote: On 4/4/21 4:05 PM, Richard Cochran wrote: This check is unneeded, because the

Re: [PATCH net-next 05/12] ionic: add hw timestamp support files

2021-04-06 Thread Shannon Nelson
On 4/5/21 11:17 AM, Richard Cochran wrote: On Mon, Apr 05, 2021 at 09:16:39AM -0700, Shannon Nelson wrote: On 4/4/21 4:05 PM, Richard Cochran wrote: This check is unneeded, because the ioctl layer never passes NULL here. Yes, the ioctl layer never calls this with NULL, but we call it from

Re: [PATCH net-next 09/12] ionic: add and enable tx and rx timestamp handling

2021-04-06 Thread Shannon Nelson
On 4/5/21 11:20 AM, Richard Cochran wrote: On Mon, Apr 05, 2021 at 09:28:44AM -0700, Shannon Nelson wrote: On 4/4/21 4:41 PM, Richard Cochran wrote: On Thu, Apr 01, 2021 at 10:56:07AM -0700, Shannon Nelson wrote: @@ -1150,6 +1232,10 @@ netdev_tx_t ionic_start_xmit(struct sk_buff *skb, struct

Re: [PATCH net-next 12/12] ionic: advertise support for hardware timestamps

2021-04-05 Thread Shannon Nelson
On 4/4/21 4:43 PM, Richard Cochran wrote: On Thu, Apr 01, 2021 at 10:56:10AM -0700, Shannon Nelson wrote: Let the network stack know we've got support for timestamping the packets. Actually, you already advertised the support to user space in Patch 10, so this present patch should go b

Re: [PATCH net-next 09/12] ionic: add and enable tx and rx timestamp handling

2021-04-05 Thread Shannon Nelson
On 4/4/21 4:41 PM, Richard Cochran wrote: On Thu, Apr 01, 2021 at 10:56:07AM -0700, Shannon Nelson wrote: @@ -1150,6 +1232,10 @@ netdev_tx_t ionic_start_xmit(struct sk_buff *skb, struct net_device *netdev) return NETDEV_TX_OK; } + if (unlikely(skb_shinfo(skb

Re: [PATCH net-next 05/12] ionic: add hw timestamp support files

2021-04-05 Thread Shannon Nelson
On 4/4/21 4:21 PM, Richard Cochran wrote: On Thu, Apr 01, 2021 at 10:56:03AM -0700, Shannon Nelson wrote: +int ionic_lif_hwstamp_set(struct ionic_lif *lif, struct ifreq *ifr) +{ + struct ionic *ionic = lif->ionic; + struct hwtstamp_config config; + int tx_mode

Re: [PATCH net-next 02/12] ionic: add handling of larger descriptors

2021-04-05 Thread Shannon Nelson
On 4/4/21 3:50 PM, Richard Cochran wrote: On Thu, Apr 01, 2021 at 10:56:00AM -0700, Shannon Nelson wrote: @@ -1722,11 +1722,15 @@ static void ionic_txrx_free(struct ionic_lif *lif) static int ionic_txrx_alloc(struct ionic_lif *lif) { - unsigned int sg_desc_sz; + unsigned int

Re: [PATCH net-next 05/12] ionic: add hw timestamp support files

2021-04-05 Thread Shannon Nelson
On 4/4/21 4:05 PM, Richard Cochran wrote: On Thu, Apr 01, 2021 at 10:56:03AM -0700, Shannon Nelson wrote: @@ -0,0 +1,589 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright(c) 2017 - 2021 Pensando Systems, Inc */ + +#include +#include + +#include "ionic.h" +#include "ionic_b

Re: [PATCH net-next 00/12] ionic: add PTP and hw clock support

2021-04-01 Thread Shannon Nelson
On 4/1/21 2:02 PM, Andrew Lunn wrote: On Thu, Apr 01, 2021 at 10:55:58AM -0700, Shannon Nelson wrote: This patchset adds support for accessing the DSC hardware clock and for offloading PTP timestamping. Hi Shannon Please always Cc: the PTP maintainer for PTP patches. Richard Cochran

[PATCH net-next 12/12] ionic: advertise support for hardware timestamps

2021-04-01 Thread Shannon Nelson
Let the network stack know we've got support for timestamping the packets. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 25 +++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/ethernet/pensando/

[PATCH net-next 11/12] ionic: ethtool ptp stats

2021-04-01 Thread Shannon Nelson
Add the new hwstamp stats to our ethtool stats output. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_stats.c | 38 +-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic

[PATCH net-next 09/12] ionic: add and enable tx and rx timestamp handling

2021-04-01 Thread Shannon Nelson
The Tx and Rx timestamped packets are handled through separate queues. Here we set them up, service them, and tear them down along with the normal Tx and Rx queues. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.h | 2 +- .../net

[PATCH net-next 10/12] ionic: add ethtool support for PTP

2021-04-01 Thread Shannon Nelson
Add the get_ts_info() callback for ethtool support of timestamping information. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 93 +++ 1 file changed, 93 insertions(+) diff --git a/drivers/net/ethernet/pensando

[PATCH net-next 08/12] ionic: set up hw timestamp queues

2021-04-01 Thread Shannon Nelson
We do hardware timestamping through a separate Tx queue, and optionally through a separate Rx queue. These queues are allocated, freed, and tracked separately from the basic queue arrays. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c

[PATCH net-next 00/12] ionic: add PTP and hw clock support

2021-04-01 Thread Shannon Nelson
ntity information. First we add the ability to detect new queue features, then the handling of the new descriptor sizes. After adding the new interface structures, we start adding the support code, saving the advertising to the stack for last. Shannon Nelson (12): ionic: add new queue featur

[PATCH net-next 07/12] ionic: add rx filtering for hw timestamp steering

2021-04-01 Thread Shannon Nelson
Add handling of the new Rx packet classification filter type. This simple bit of classification allows for steering packets to a separate Rx queue for processing. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_rx_filter.c | 21

[PATCH net-next 06/12] ionic: link in the new hw timestamp code

2021-04-01 Thread Shannon Nelson
These are changes to compile and link the new code, but no new feature support is available or advertised yet. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 1 + drivers/net/ethernet/pensando/ionic/ionic.h | 4 ++ .../net

[PATCH net-next 04/12] ionic: split adminq post and wait calls

2021-04-01 Thread Shannon Nelson
Split the wait part out of adminq_post_wait() into a separate function so that a caller can have finer grain control over the sequencing of operations and locking. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 2 ++ drivers/net

[PATCH net-next 02/12] ionic: add handling of larger descriptors

2021-04-01 Thread Shannon Nelson
we will be using it for PTP Rx support, and we don't have an immediate use for the large descriptors in the general Tx queues yet; it will be used in a special Tx queues added in one of the next few patches. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/ethernet/pen

[PATCH net-next 01/12] ionic: add new queue features to interface

2021-04-01 Thread Shannon Nelson
Add queue feature extensions to prepare for features that can be queue specific, in addition to the general queue features already defined. While we're here, change the existing feature ids from #defines to enum. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/eth

[PATCH net-next 03/12] ionic: add hw timestamp structs to interface

2021-04-01 Thread Shannon Nelson
bit string, then we have support for the hw clock registers. If the IONIC_RXQ_F_HWSTAMP and IONIC_TXQ_F_HWSTAMP features are shown in the ionic_q_identity features, then the queues can support HW timestamps on packets. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net

[PATCH net-next 05/12] ionic: add hw timestamp support files

2021-04-01 Thread Shannon Nelson
This adds the file of code for supporting Tx and Rx hardware timestamps and the raw clock interface, but does not yet link it in for compiling or use. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_phc.c | 589 ++ 1 file

[PATCH net-next 4/4] ionic: pull per-q stats work out of queue loops

2021-03-30 Thread Shannon Nelson
Abstract out the per-queue data collection work into separate functions from the per-queue loops in the stats reporting, similar to what Alex did for the data label strings in commit acebe5b6107c ("ionic: Update driver to use ethtool_sprintf") Signed-off-by: Shannon Nelson --- .../ne

[PATCH net-next 0/4] ionic: code cleanup for heartbeat, dma error counts, sizeof, stats

2021-03-30 Thread Shannon Nelson
These patches are a few more bits of code cleanup found in testing and review: count all our dma error instances, make better use of sizeof, fix a race in our device heartbeat check, and clean up code formatting in the ethtool stats collection. Shannon Nelson (4): ionic: count dma errors

[PATCH net-next 1/4] ionic: count dma errors

2021-03-30 Thread Shannon Nelson
Increment our dma-error counter in a couple of spots that were missed before. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b

[PATCH net-next 2/4] ionic: fix sizeof usage

2021-03-30 Thread Shannon Nelson
Use the actual pointer that we care about as the subject of the sizeof, rather than a struct name. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic

[PATCH net-next 3/4] ionic: avoid races in ionic_heartbeat_check

2021-03-30 Thread Shannon Nelson
Rework the heartbeat checks to be sure that we're getting an atomic operation. Through testing we found occasions where a separate thread could clash with this check and cause erroneous heartbeat check results. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/eth

[PATCH net-next 5/7] ionic: block actions during fw reset

2021-03-18 Thread Shannon Nelson
Block some actions while the FW is in a reset activity and the queues are not configured. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 4 drivers/net/ethernet/pensando/ionic/ionic_dev.c | 8 +--- drivers/net/ethernet/pensando/ionic

[PATCH net-next 4/7] ionic: update ethtool support bits for BASET

2021-03-18 Thread Shannon Nelson
Add support in get_link_ksettings for a couple of new BASET connections. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 8 drivers/net/ethernet/pensando/ionic/ionic_if.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/net

[PATCH net-next 6/7] ionic: stop watchdog when in broken state

2021-03-18 Thread Shannon Nelson
nk watchdog try to restart the queues. At this point the user can try to DOWN and UP the device to clear the errors. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 25 +-- .../net/ethernet/pensando/ionic/ionic_lif.h | 1 + 2 files changed

[PATCH net-next 7/7] ionic: protect adminq from early destroy

2021-03-18 Thread Shannon Nelson
Don't destroy the adminq while there is an outstanding request. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 14 ++-- .../net/ethernet/pensando/ionic/ionic_main.c | 22 ++- 2 files changed, 28 insertions(+), 8 deletions(-)

[PATCH net-next 3/7] ionic: fix unchecked reference

2021-03-18 Thread Shannon Nelson
We can get to the counter without going through the pointer that the robot complained about. Reported-by: kernel test robot Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

[PATCH net-next 1/7] ionic: code cleanup details

2021-03-18 Thread Shannon Nelson
Catch a couple of missing macro name uses, fix a couple of misspellings, etc. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 8 ++ .../net/ethernet/pensando/ionic/ionic_if.h| 26 +-- .../net/ethernet/pensando/ionic/ionic_lif.c | 23

[PATCH net-next 0/7] ionic fixes

2021-03-18 Thread Shannon Nelson
These are a few little fixes and cleanups found while working on other features and more testing. Shannon Nelson (7): ionic: code cleanup details ionic: simplify the intr_index use in txq_init ionic: fix unchecked reference ionic: update ethtool support bits for BASET ionic: block

[PATCH net-next 2/7] ionic: simplify the intr_index use in txq_init

2021-03-18 Thread Shannon Nelson
The qcq->intr.index was set when the queue was allocated, there is no need to reach around to find it. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/pensando/io

[PATCH v2 net] ionic: linearize tso skb with too many frags

2021-03-16 Thread Shannon Nelson
don't rework the check on the nr_frags Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/pensand

Re: [PATCH net] ionic: linearize tso skb with too many frags

2021-03-16 Thread Shannon Nelson
On 3/16/21 2:54 PM, Jakub Kicinski wrote: On Tue, 16 Mar 2021 11:52:43 -0700 Shannon Nelson wrote: We were linearizing non-TSO skbs that had too many frags, but we weren't checking number of frags on TSO skbs. This could lead to a bad page reference when we received a TSO skb with more

[PATCH net] ionic: linearize tso skb with too many frags

2021-03-16 Thread Shannon Nelson
ot;) Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 28 ++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c index 162a1ff1e9d

[PATCH net-next 3/4] ionic: simplify tx clean

2021-03-15 Thread Shannon Nelson
The descriptor mappings are set up the same way whether or not it is a TSO, so we don't need separate logic for the two cases. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 30 +-- 1 file changed, 7 insertions(+), 23 deletions(-) diff --

[PATCH net-next 1/4] ionic: simplify TSO descriptor mapping

2021-03-15 Thread Shannon Nelson
mss number of bytes. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.h | 5 +- .../net/ethernet/pensando/ionic/ionic_txrx.c | 237 +- 2 files changed, 117 insertions(+), 125 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h

[PATCH net-next 4/4] ionic: aggregate Tx byte counting calls

2021-03-15 Thread Shannon Nelson
Gather the Tx packet and byte counts and call netdev_tx_completed_queue() only once per clean cycle. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.h | 1 + .../net/ethernet/pensando/ionic/ionic_txrx.c | 27 --- 2 files changed, 25 insertions

[PATCH net-next 2/4] ionic: generic tx skb mapping

2021-03-15 Thread Shannon Nelson
Make the new ionic_tx_map_tso() usable by the non-TSO paths, and pull the call up a level into ionic_tx() before calling the csum or no-csum routines. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 142 +- 1 file changed, 68 insertions(+), 74

[PATCH net-next 0/4] ionic Tx updates

2021-03-15 Thread Shannon Nelson
generic for use in the non-TSO case. Shannon Nelson (4): ionic: simplify TSO descriptor mapping ionic: generic tx skb mapping ionic: simplify tx clean ionic: aggregate Tx byte counting calls .../net/ethernet/pensando/ionic/ionic_dev.h | 6 +- .../net/ethernet/pensando/ionic/ionic_txrx.c

Re: [PATCH net-next 2/6] ionic: implement Rx page reuse

2021-03-12 Thread Shannon Nelson
On 3/10/21 6:14 PM, Alexander Duyck wrote: On Wed, Mar 10, 2021 at 11:28 AM Shannon Nelson wrote: Rework the Rx buffer allocations to use pages twice when using normal MTU in order to cut down on buffer allocation and mapping overhead. Instead of tracking individual pages, in which we may

Re: [RFC PATCH 10/10] ionic: Update driver to use ethtool_gsprintf

2021-03-11 Thread Shannon Nelson
Thanks, Alex! Acked-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_stats.c | 145 + 1 file changed, 60 insertions(+), 85 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_stats.c b/drivers/net/ethernet/pensando/ionic/ionic_stats.c

[PATCH net-next 6/6] ionic: simplify use of completion types

2021-03-10 Thread Shannon Nelson
Make better use of our struct types and type checking by passing the actual Rx or Tx completion type rather than a generic void pointer type. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions

[PATCH net-next 5/6] ionic: rebuild debugfs on qcq swap

2021-03-10 Thread Shannon Nelson
With a reconfigure of each queue is needed a rebuild of the matching debugfs information. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net

[PATCH net-next 4/6] ionic: simplify rx skb alloc

2021-03-10 Thread Shannon Nelson
Remove an unnecessary layer over rx skb allocation. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 63 +++ 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet

[PATCH net-next 1/6] ionic: move rx_page_alloc and free

2021-03-10 Thread Shannon Nelson
Move ionic_rx_page_alloc() and ionic_rx_page_free() to earlier in the file to make the next patch easier to review. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_txrx.c | 140 +- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/drivers

[PATCH net-next 2/6] ionic: implement Rx page reuse

2021-03-10 Thread Shannon Nelson
use the second half of the page rather than allocate and map a new page once the first buffer has been used. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.h | 12 +- .../net/ethernet/pensando/ionic/ionic_txrx.c | 215 +++--- 2 files changed, 138

[PATCH net-next 0/6] ionic Rx updates

2021-03-10 Thread Shannon Nelson
p the structs and fastpath code for better efficency. Shannon Nelson (6): ionic: move rx_page_alloc and free ionic: implement Rx page reuse ionic: optimize fastpath struct usage ionic: simplify rx skb alloc ionic: rebuild debugfs on qcq swap ionic: simplify use of completion types ..

[PATCH net-next 3/6] ionic: optimize fastpath struct usage

2021-03-10 Thread Shannon Nelson
Clean up a couple of struct uses to make for better fast path access. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.c | 4 +-- .../net/ethernet/pensando/ionic/ionic_dev.h | 7 ++-- .../net/ethernet/pensando/ionic/ionic_lif.c | 3 +- .../net/ethernet

Re: [PATCH] ionic: Remove unused function pointer typedef ionic_reset_cb

2021-02-16 Thread Shannon Nelson
ks. Acked-by: Shannon Nelson

Re: [PATCH net-next 1/6] net: add inline function skb_csum_is_sctp

2021-01-19 Thread Shannon Nelson
lease split out the ionic bits to a separate patch. Either way, for ionic: Acked-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 2 +- include/linux/skbuff.h | 5 + net/core/dev.c | 2 +- 3 files chang

Re: [PATCH net-next v1 1/2] net: core: count drops from GRO

2021-01-08 Thread Shannon Nelson
On 1/8/21 10:26 AM, Jesse Brandeburg wrote: Shannon Nelson wrote: On 1/6/21 1:55 PM, Jesse Brandeburg wrote: When drivers call the various receive upcalls to receive an skb to the stack, sometimes that stack can drop the packet. The good news is that the return code is given to all the

Re: [PATCH net-next v1 1/2] net: core: count drops from GRO

2021-01-07 Thread Shannon Nelson
On 1/6/21 1:55 PM, Jesse Brandeburg wrote: When drivers call the various receive upcalls to receive an skb to the stack, sometimes that stack can drop the packet. The good news is that the return code is given to all the drivers of NET_RX_DROP or GRO_DROP. The bad news is that no drivers except t

[PATCH net] ionic: account for vlan tag len in rx buffer len

2020-12-18 Thread Shannon Nelson
Let the FW know we have enough receive buffer space for the vlan tag if it isn't stripped. Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH net-next] drivers: net: ionic: simplify the return expression of ionic_set_rxfh()

2020-12-09 Thread Shannon Nelson
On 12/8/20 5:53 AM, Zheng Yongjun wrote: Simplify the return expression. Signed-off-by: Zheng Yongjun Acked-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/pensando

Re: [PATCH 1/1] fix possible array overflow on receiving too many fragments for a packet

2020-12-09 Thread Shannon Nelson
On 12/7/20 8:06 PM, Xiaohui Zhang wrote: From: Zhang Xiaohui If the hardware receives an oversized packet with too many rx fragments, skb_shinfo(skb)->frags can overflow and corrupt memory of adjacent pages. This becomes especially visible if it corrupts the freelist pointer of a slab page. I f

Re: [PATCH 1/1] ionic: fix array overflow on receiving too many fragments for a packet

2020-12-06 Thread Shannon Nelson
On 12/6/20 5:51 PM, Jesse Brandeburg wrote: Xiaohui Zhang wrote: From: Zhang Xiaohui If the hardware receives an oversized packet with too many rx fragments, skb_shinfo(skb)->frags can overflow and corrupt memory of adjacent pages. This becomes especially visible if it corrupts the freelist p

[PATCH net-next 1/2] ionic: remove some unnecessary oom messages

2020-11-30 Thread Shannon Nelson
Remove memory allocation fail messages where the OOM stack trace will make it obvious which allocation request failed. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_dev.c | 2 +- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 8 +++- drivers/net/ethernet

[PATCH net-next 2/2] ionic: change mtu after queues are stopped

2020-11-30 Thread Shannon Nelson
Order of operations is slightly more correct in the driver to change the netdev->mtu after the queues have been stopped rather than before. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --gi

[PATCH net-next 0/2] ionic updates

2020-11-30 Thread Shannon Nelson
These are a pair of small code cleanups. Shannon Nelson (2): ionic: remove some unnecessary oom messages ionic: change mtu after queues are stopped drivers/net/ethernet/pensando/ionic/ionic_dev.c | 2 +- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 14 +++--- drivers/net

Re: [PATCH net-next] net: don't include ethtool.h from netdevice.h

2020-11-20 Thread Shannon Nelson
+ Acked-by: Shannon Nelson drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 1 + drivers/net/geneve.c | 1 + drivers/net/hyperv/netvsc_drv.c | 1 + drivers/net/hyperv/rndis_filter.c| 1 + drivers

Re: [net-next v2 PATCH] devlink: move request_firmware out of driver

2020-11-18 Thread Shannon Nelson
On 11/18/20 10:52 AM, Jacob Keller wrote: On 11/13/2020 3:48 PM, Shannon Nelson wrote: On 11/13/20 2:45 PM, Jacob Keller wrote: -int ionic_firmware_update(struct ionic_lif *lif, const char *fw_name, +int ionic_firmware_update(struct ionic_lif *lif, const struct firmware *fw

Re: [net-next v2 PATCH] devlink: move request_firmware out of driver

2020-11-13 Thread Shannon Nelson
contents. For distributions which do not support the fallback userspace mechanism, there should be essentially no difference between request_firmware and request_firmware_direct. Signed-off-by: Jacob Keller Cc: Jiri Pirko Cc: Michael Chan Cc: Shannon Nelson Cc: Saeed Mahameed Cc: Boris Pismenny

[PATCH v3 net-next 8/8] ionic: useful names for booleans

2020-11-12 Thread Shannon Nelson
With a few more uses of true and false in function calls, we need to give them some useful names so we can tell from the calling point what we're doing. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/pensando/ionic/ionic_dev.c | 2 +- drivers/net/eth

[PATCH v3 net-next 6/8] ionic: flatten calls to ionic_lif_rx_mode

2020-11-12 Thread Shannon Nelson
The _ionic_lif_rx_mode() is only used once and really doesn't need to be broken out. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed --- .../net/ethernet/pensando/ionic/ionic_lif.c | 38 --- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/driver

[PATCH v3 net-next 7/8] ionic: change set_rx_mode from_ndo to can_sleep

2020-11-12 Thread Shannon Nelson
Instead of having two different ways of expressing the same sleepability concept, using opposite logic, we can rework the from_ndo to can_sleep for a more consistent usage. Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.") Signed-off-by: Shannon Nelson Reviewed-by: Saee

[PATCH v3 net-next 4/8] ionic: batch rx buffer refilling

2020-11-12 Thread Shannon Nelson
We don't need to refill the rx descriptors on every napi if only a few were handled. Waiting until we can batch up a few together will save us a few Rx cycles. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed --- .../net/ethernet/pensando/ionic/ionic_dev.h| 4 +++- ..

[PATCH v3 net-next 5/8] ionic: use mc sync for multicast filters

2020-11-12 Thread Shannon Nelson
We should be using the multicast sync routines for the multicast filters. Also, let's just flatten the logic a bit and pull the small unicast routine back into ionic_set_rx_mode(). Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.") Signed-off-by: Shannon Nelson Rev

[PATCH v3 net-next 0/8] ionic updates

2020-11-12 Thread Shannon Nelson
can_sleep Shannon Nelson (8): ionic: start queues before announcing link up ionic: check for link after netdev registration ionic: add lif quiesce ionic: batch rx buffer refilling ionic: use mc sync for multicast filters ionic: flatten calls to ionic_lif_rx_mode ionic: change

[PATCH v3 net-next 3/8] ionic: add lif quiesce

2020-11-12 Thread Shannon Nelson
After the queues are stopped, expressly quiesce the lif. This assures that even if the queues were in an odd state, the firmware will close up everything cleanly. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed --- .../net/ethernet/pensando/ionic/ionic_lif.c | 20

[PATCH v3 net-next 1/8] ionic: start queues before announcing link up

2020-11-12 Thread Shannon Nelson
Change the order of operations in the link_up handling to be sure that the queues are up and ready before we announce that the link is up. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 12 ++-- 1 file changed, 6

[PATCH v3 net-next 2/8] ionic: check for link after netdev registration

2020-11-12 Thread Shannon Nelson
Request a link check as soon as the netdev is registered rather than waiting for the watchdog to go off in order to get the interface operational a little more quickly. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 ++ 1 file

Re: [PATCH v2 net-next 6/8] ionic: flatten calls to ionic_lif_rx_mode

2020-11-06 Thread Shannon Nelson
On 11/6/20 1:33 PM, Saeed Mahameed wrote: On Thu, 2020-11-05 at 16:12 -0800, Shannon Nelson wrote: The _ionic_lif_rx_mode() is only used once and really doesn't need to be broken out. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c

Re: [PATCH v2 net-next 6/8] ionic: flatten calls to ionic_lif_rx_mode

2020-11-06 Thread Shannon Nelson
On 11/6/20 9:03 AM, Jakub Kicinski wrote: On Thu, 5 Nov 2020 16:12:18 -0800 Shannon Nelson wrote: + work = kzalloc(sizeof(*work), GFP_ATOMIC); + if (!work) { + netdev_err(lif->netdev, "%s OOM\n&qu

[PATCH v2 net-next 5/8] ionic: use mc sync for multicast filters

2020-11-05 Thread Shannon Nelson
We should be using the multicast sync routines for the multicast filters. Also, let's just flatten the logic a bit and pull the small unicast routine back into ionic_set_rx_mode(). Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.") Signed-off-by: Shannon Nelso

[PATCH v2 net-next 7/8] ionic: change set_rx_mode from_ndo to can_sleep

2020-11-05 Thread Shannon Nelson
Instead of having two different ways of expressing the same sleepability concept, using opposite logic, we can rework the from_ndo to can_sleep for a more consistent usage. Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.") Signed-off-by: Shannon Nelson --- .../ne

[PATCH v2 net-next 6/8] ionic: flatten calls to ionic_lif_rx_mode

2020-11-05 Thread Shannon Nelson
The _ionic_lif_rx_mode() is only used once and really doesn't need to be broken out. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 38 --- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/pensando/

[PATCH v2 net-next 8/8] ionic: useful names for booleans

2020-11-05 Thread Shannon Nelson
With a few more uses of true and false in function calls, we need to give them some useful names so we can tell from the calling point what we're doing. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_dev.c | 2 +- drivers/net/ethernet/pensando/ionic/ionic_

[PATCH v2 net-next 1/8] ionic: start queues before announcing link up

2020-11-05 Thread Shannon Nelson
Change the order of operations in the link_up handling to be sure that the queues are up and ready before we announce that the link is up. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PATCH v2 net-next 4/8] ionic: batch rx buffer refilling

2020-11-05 Thread Shannon Nelson
We don't need to refill the rx descriptors on every napi if only a few were handled. Waiting until we can batch up a few together will save us a few Rx cycles. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.h| 4 +++- .../net/ethernet/pensando/

[PATCH v2 net-next 0/8] ionic updates

2020-11-05 Thread Shannon Nelson
These updates are a bit of code cleaning and a minor bit of performance tweaking. v2: added void cast on call to ionic_lif_quiesce() lowered batching threshold added patch to flatten calls to ionic_lif_rx_mode added patch to change from_ndo to can_sleep Shannon Nelson (8): ionic

[PATCH v2 net-next 3/8] ionic: add lif quiesce

2020-11-05 Thread Shannon Nelson
After the queues are stopped, expressly quiesce the lif. This assures that even if the queues were in an odd state, the firmware will close up everything cleanly. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 24 +++ 1 file changed, 24

[PATCH v2 net-next 2/8] ionic: check for link after netdev registration

2020-11-05 Thread Shannon Nelson
Request a link check as soon as the netdev is registered rather than waiting for the watchdog to go off in order to get the interface operational a little more quickly. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 ++ 1 file changed, 2 insertions

Re: [PATCH net-next 6/6] ionic: useful names for booleans

2020-11-05 Thread Shannon Nelson
On 11/4/20 5:21 PM, Saeed Mahameed wrote: On Wed, 2020-11-04 at 14:33 -0800, Shannon Nelson wrote: With a few more uses of true and false in function calls, we need to give them some useful names so we can tell from the calling point what we're doing. Aha! The root cause of the iss

  1   2   3   4   5   6   7   8   9   10   >