netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: David Wei <dw@davidwei.uk>
Cc: netdev@vger.kernel.org, Michael Chan <michael.chan@broadcom.com>,
	Pavan Chebbi <pavan.chebbi@broadcom.com>,
	Andy Gospodarek <andrew.gospodarek@broadcom.com>,
	Adrian Alvarado <adrian.alvarado@broadcom.com>,
	Mina Almasry <almasrymina@google.com>,
	Shailend Chand <shailend@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [RFC PATCH net-next v2 3/9] netdev: add netdev_rx_queue_restart()
Date: Sat, 4 May 2024 13:20:07 +0100	[thread overview]
Message-ID: <20240504122007.GG3167983@kernel.org> (raw)
In-Reply-To: <20240502045410.3524155-4-dw@davidwei.uk>

On Wed, May 01, 2024 at 09:54:04PM -0700, David Wei wrote:
> From: Mina Almasry <almasrymina@google.com>
> 
> Add netdev_rx_queue_restart() function to netdev_rx_queue.h. This is
> taken from Mina's work in [1] with a slight modification of taking
> rtnl_lock() during the queue stop and start ops.
> 
> For bnxt specifically, if the firmware doesn't support
> BNXT_RST_RING_SP_EVENT, then ndo_queue_stop() returns -EOPNOTSUPP and
> the whole restart fails. Unlike bnxt_rx_ring_reset(), there is no
> attempt to reset the whole device.
> 
> [1]: https://lore.kernel.org/linux-kernel/20240403002053.2376017-6-almasrymina@google.com/#t
> 
> Signed-off-by: David Wei <dw@davidwei.uk>

nit: Mina's From line is above, but there is no corresponding Signed-off-by
     line here.

> ---
>  include/net/netdev_rx_queue.h |  3 ++
>  net/core/Makefile             |  1 +
>  net/core/netdev_rx_queue.c    | 58 +++++++++++++++++++++++++++++++++++
>  3 files changed, 62 insertions(+)
>  create mode 100644 net/core/netdev_rx_queue.c
> 
> diff --git a/include/net/netdev_rx_queue.h b/include/net/netdev_rx_queue.h
> index aa1716fb0e53..e78ca52d67fb 100644
> --- a/include/net/netdev_rx_queue.h
> +++ b/include/net/netdev_rx_queue.h
> @@ -54,4 +54,7 @@ get_netdev_rx_queue_index(struct netdev_rx_queue *queue)
>  	return index;
>  }
>  #endif
> +
> +int netdev_rx_queue_restart(struct net_device *dev, unsigned int rxq);
> +
>  #endif
> diff --git a/net/core/Makefile b/net/core/Makefile
> index 21d6fbc7e884..f2aa63c167a3 100644
> --- a/net/core/Makefile
> +++ b/net/core/Makefile
> @@ -19,6 +19,7 @@ obj-$(CONFIG_NETDEV_ADDR_LIST_TEST) += dev_addr_lists_test.o
>  
>  obj-y += net-sysfs.o
>  obj-y += hotdata.o
> +obj-y += netdev_rx_queue.o
>  obj-$(CONFIG_PAGE_POOL) += page_pool.o page_pool_user.o
>  obj-$(CONFIG_PROC_FS) += net-procfs.o
>  obj-$(CONFIG_NET_PKTGEN) += pktgen.o
> diff --git a/net/core/netdev_rx_queue.c b/net/core/netdev_rx_queue.c
> new file mode 100644
> index 000000000000..9633fb36f6d1
> --- /dev/null
> +++ b/net/core/netdev_rx_queue.c
> @@ -0,0 +1,58 @@
> +/* SPDX-License-Identifier: GPL-2.0 */

nit: my understanding is that, as a .c file, the correct SPDX format is:

// SPDX-License-Identifier: GPL-2.0

...

  parent reply	other threads:[~2024-05-04 12:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02  4:54 [RFC PATCH net-next v2 0/9] bnxt: implement queue api David Wei
2024-05-02  4:54 ` [RFC PATCH net-next v2 1/9] queue_api: define " David Wei
2024-05-04 12:11   ` Simon Horman
2024-05-06  0:34     ` David Wei
2024-05-02  4:54 ` [RFC PATCH net-next v2 2/9] bnxt: implement " David Wei
2024-05-02 17:23   ` Mina Almasry
2024-05-06  0:36     ` David Wei
2024-05-02  4:54 ` [RFC PATCH net-next v2 3/9] netdev: add netdev_rx_queue_restart() David Wei
2024-05-02 17:27   ` Mina Almasry
2024-05-06  0:38     ` David Wei
2024-05-04 12:20   ` Simon Horman [this message]
2024-05-06  0:41     ` David Wei
2024-05-07 16:46       ` Simon Horman
2024-05-08 17:13         ` Mina Almasry
2024-05-02  4:54 ` [RFC PATCH net-next v2 4/9] bnxt: refactor bnxt_{alloc,free}_one_rx_ring() David Wei
2024-05-02  4:54 ` [RFC PATCH net-next v2 5/9] bnxt: refactor bnxt_{alloc,free}_one_tpa_info() David Wei
2024-05-04 12:30   ` Simon Horman
2024-05-06  0:43     ` David Wei
2024-05-02  4:54 ` [RFC PATCH net-next v2 6/9] bnxt: add __bnxt_init_rx_ring_struct() helper David Wei
2024-05-02  4:54 ` [RFC PATCH net-next v2 7/9] bnxt: add helpers for allocating rx ring mem David Wei
2024-05-04 12:34   ` Simon Horman
2024-05-06  0:42     ` David Wei
2024-05-02  4:54 ` [RFC PATCH net-next v2 8/9] bnxt: alloc rx ring mem first before reset David Wei
2024-05-02  4:54 ` [RFC PATCH net-next v2 9/9] bnxt: swap rx ring mem during queue_stop() David Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240504122007.GG3167983@kernel.org \
    --to=horms@kernel.org \
    --cc=adrian.alvarado@broadcom.com \
    --cc=almasrymina@google.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=shailend@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).