From: Jakub Kicinski <kuba@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
saeedm@nvidia.com, leon@kernel.org, shayagr@amazon.com,
akiyano@amazon.com, darinzon@amazon.com, sgoutham@marvell.com,
lorenzo.bianconi@redhat.com, toke@redhat.com,
teknoraver@meta.com, ttoukan.linux@gmail.com
Subject: Re: [PATCH net v2 7/8] net/mlx5e: take into account device reconfiguration for xdp_features flag
Date: Wed, 15 Mar 2023 16:39:00 -0700 [thread overview]
Message-ID: <20230315163900.381dd25e@kernel.org> (raw)
In-Reply-To: <16c37367670903e86f863cc8c481100dd4b3a323.1678364613.git.lorenzo@kernel.org>
On Thu, 9 Mar 2023 13:25:31 +0100 Lorenzo Bianconi wrote:
> Take into account LRO and GRO configuration setting device xdp_features
> flag. Consider channel rq_wq_type enabling rx scatter-gatter support in
> xdp_features flag and disable NETDEV_XDP_ACT_NDO_XMIT_SG since it is not
> supported yet by the driver.
> Moreover always enable NETDEV_XDP_ACT_NDO_XMIT as the ndo_xdp_xmit
> callback does not require to load a dummy xdp program on the NIC.
>
> Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features")
> Co-developed-by: Tariq Toukan <tariqt@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
This one hits ASSERT_RTNL(), I think. Don't we need something like:
diff --git a/net/core/xdp.c b/net/core/xdp.c
index 87e654b7d06c..5722a1fc6e9e 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -781,6 +781,9 @@ void xdp_set_features_flag(struct net_device *dev, xdp_features_t val)
return;
dev->xdp_features = val;
+
+ if (dev->reg_state < NETREG_REGISTERED)
+ return;
call_netdevice_notifiers(NETDEV_XDP_FEAT_CHANGE, dev);
}
EXPORT_SYMBOL_GPL(xdp_set_features_flag);
? The notifiers are not needed until the device is actually live.
next prev parent reply other threads:[~2023-03-15 23:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 12:25 [PATCH net v2 0/8] update xdp_features flag according to NIC re-configuration Lorenzo Bianconi
2023-03-09 12:25 ` [PATCH net v2 1/8] tools: ynl: fix render-max for flags definition Lorenzo Bianconi
2023-03-09 12:25 ` [PATCH net v2 2/8] tools: ynl: fix get_mask utility routine Lorenzo Bianconi
2023-03-09 12:25 ` [PATCH net v2 3/8] xdp: add xdp_set_features_flag " Lorenzo Bianconi
2023-03-09 12:25 ` [PATCH net v2 4/8] net: thunderx: take into account xdp_features setting tx/rx queues Lorenzo Bianconi
2023-03-09 12:25 ` [PATCH net v2 5/8] net: ena: " Lorenzo Bianconi
2023-03-09 12:25 ` [PATCH net v2 6/8] veth: take into account device reconfiguration for xdp_features flag Lorenzo Bianconi
2023-03-13 14:15 ` Matthieu Baerts
2023-03-13 15:50 ` Eric Dumazet
2023-03-13 15:53 ` Eric Dumazet
2023-03-13 16:31 ` Matthieu Baerts
2023-03-13 16:35 ` Lorenzo Bianconi
2023-03-13 16:37 ` Eric Dumazet
2023-03-13 16:47 ` Lorenzo Bianconi
2023-04-06 0:56 ` Martin KaFai Lau
2023-03-09 12:25 ` [PATCH net v2 7/8] net/mlx5e: " Lorenzo Bianconi
2023-03-15 23:39 ` Jakub Kicinski [this message]
2023-03-16 0:29 ` Jakub Kicinski
2023-03-16 2:46 ` Saeed Mahameed
2023-03-16 2:53 ` Jakub Kicinski
2023-03-16 5:03 ` Saeed Mahameed
2023-03-16 5:37 ` Jakub Kicinski
2023-03-09 12:25 ` [PATCH net v2 8/8] mvpp2: take care of xdp_features when reconfiguring queues Lorenzo Bianconi
2023-03-11 5:50 ` [PATCH net v2 0/8] update xdp_features flag according to NIC re-configuration patchwork-bot+netdevbpf
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=20230315163900.381dd25e@kernel.org \
--to=kuba@kernel.org \
--cc=akiyano@amazon.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=darinzon@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=leon@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=sgoutham@marvell.com \
--cc=shayagr@amazon.com \
--cc=teknoraver@meta.com \
--cc=toke@redhat.com \
--cc=ttoukan.linux@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.