* [dpdk-stable] [PATCH] net/af_xdp: do not attempt probe for secondary processes
@ 2021-09-30 13:46 Ciara Loftus
2021-09-30 15:18 ` Stephen Hemminger
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ciara Loftus @ 2021-09-30 13:46 UTC (permalink / raw)
To: dev; +Cc: stable, ferruh.yigit, stephen, Ciara Loftus
Since the AF_XDP PMD does not work for secondary processes as reported
in Bugzilla 805, check for the process type at the beginning of probe
and return ENOTSUP if the process type is secondary.
Bugzilla ID: 805
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 9bea0a895a..d61cb0aa7c 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1790,16 +1790,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
rte_vdev_device_name(dev));
name = rte_vdev_device_name(dev);
- if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
- strlen(rte_vdev_device_args(dev)) == 0) {
- eth_dev = rte_eth_dev_attach_secondary(name);
- if (eth_dev == NULL) {
- AF_XDP_LOG(ERR, "Failed to probe %s\n", name);
- return -EINVAL;
- }
- eth_dev->dev_ops = &ops;
- rte_eth_dev_probing_finish(eth_dev);
- return 0;
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+ AF_XDP_LOG(ERR, "Failed to probe %s. "
+ "AF_XDP PMD does not support secondary processes.\n",
+ name);
+ return -ENOTSUP;
}
kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments);
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH] net/af_xdp: do not attempt probe for secondary processes
2021-09-30 13:46 [dpdk-stable] [PATCH] net/af_xdp: do not attempt probe for secondary processes Ciara Loftus
@ 2021-09-30 15:18 ` Stephen Hemminger
2021-10-05 15:06 ` Ferruh Yigit
2021-10-08 7:50 ` [dpdk-stable] [PATCH v2] net/af_xdp: disable secondary process support Ciara Loftus
2 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2021-09-30 15:18 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev, stable, ferruh.yigit
On Thu, 30 Sep 2021 13:46:04 +0000
Ciara Loftus <ciara.loftus@intel.com> wrote:
> Since the AF_XDP PMD does not work for secondary processes as reported
> in Bugzilla 805, check for the process type at the beginning of probe
> and return ENOTSUP if the process type is secondary.
>
> Bugzilla ID: 805
> Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Thanks for fixing.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH] net/af_xdp: do not attempt probe for secondary processes
2021-09-30 13:46 [dpdk-stable] [PATCH] net/af_xdp: do not attempt probe for secondary processes Ciara Loftus
2021-09-30 15:18 ` Stephen Hemminger
@ 2021-10-05 15:06 ` Ferruh Yigit
2021-10-08 7:50 ` [dpdk-stable] [PATCH v2] net/af_xdp: disable secondary process support Ciara Loftus
2 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2021-10-05 15:06 UTC (permalink / raw)
To: Ciara Loftus, dev; +Cc: stable, stephen
On 9/30/2021 2:46 PM, Ciara Loftus wrote:
> Since the AF_XDP PMD does not work for secondary processes as reported
> in Bugzilla 805, check for the process type at the beginning of probe
> and return ENOTSUP if the process type is secondary.
>
Hi Ciara,
'Do not attempt probe for secondary process' practically means disabling the
secondary process support for af_xdp, what to you think highlight this in
the patch title?
Also can you please add a brief release notes update, for the possible
af_xdp secondary process users.
And would you mind putting the discussed plan to the commit log to record it,
to support the secondary process fully in 22.02 etc..
Thanks,
ferruh
> Bugzilla ID: 805
> Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
> index 9bea0a895a..d61cb0aa7c 100644
> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
> @@ -1790,16 +1790,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
> rte_vdev_device_name(dev));
>
> name = rte_vdev_device_name(dev);
> - if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
> - strlen(rte_vdev_device_args(dev)) == 0) {
> - eth_dev = rte_eth_dev_attach_secondary(name);
> - if (eth_dev == NULL) {
> - AF_XDP_LOG(ERR, "Failed to probe %s\n", name);
> - return -EINVAL;
> - }
> - eth_dev->dev_ops = &ops;
> - rte_eth_dev_probing_finish(eth_dev);
> - return 0;
> + if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
> + AF_XDP_LOG(ERR, "Failed to probe %s. "
> + "AF_XDP PMD does not support secondary processes.\n",
> + name);
> + return -ENOTSUP;
> }
>
> kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-stable] [PATCH v2] net/af_xdp: disable secondary process support
2021-09-30 13:46 [dpdk-stable] [PATCH] net/af_xdp: do not attempt probe for secondary processes Ciara Loftus
2021-09-30 15:18 ` Stephen Hemminger
2021-10-05 15:06 ` Ferruh Yigit
@ 2021-10-08 7:50 ` Ciara Loftus
2021-10-08 11:06 ` Ferruh Yigit
2 siblings, 1 reply; 5+ messages in thread
From: Ciara Loftus @ 2021-10-08 7:50 UTC (permalink / raw)
To: dev; +Cc: stable, ferruh.yigit, stephen, Ciara Loftus
Since the AF_XDP PMD does not work for secondary processes as reported
in Bugzilla 805, check for the process type at the beginning of probe
and return ENOTSUP if the process type is secondary.
It is planned that secondary processes will be supported by the PMD in
full in a future release by using rte_mp_msg to pass the state to the
secondary process that it requires in order to work.
Bugzilla ID: 805
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
---
doc/guides/rel_notes/release_21_11.rst | 4 ++++
drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++----------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index efeffe37a0..f30299ae7e 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -67,6 +67,10 @@ New Features
Added macros ETH_RSS_IPV4_CHKSUM and ETH_RSS_L4_CHKSUM, now IPv4 and
TCP/UDP/SCTP header checksum field can be used as input set for RSS.
+* **Updated AF_XDP PMD.**
+
+ * Disabled secondary process support.
+
* **Updated Broadcom bnxt PMD.**
* Added flow offload support for Thor.
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 9bea0a895a..d61cb0aa7c 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1790,16 +1790,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
rte_vdev_device_name(dev));
name = rte_vdev_device_name(dev);
- if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
- strlen(rte_vdev_device_args(dev)) == 0) {
- eth_dev = rte_eth_dev_attach_secondary(name);
- if (eth_dev == NULL) {
- AF_XDP_LOG(ERR, "Failed to probe %s\n", name);
- return -EINVAL;
- }
- eth_dev->dev_ops = &ops;
- rte_eth_dev_probing_finish(eth_dev);
- return 0;
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+ AF_XDP_LOG(ERR, "Failed to probe %s. "
+ "AF_XDP PMD does not support secondary processes.\n",
+ name);
+ return -ENOTSUP;
}
kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments);
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH v2] net/af_xdp: disable secondary process support
2021-10-08 7:50 ` [dpdk-stable] [PATCH v2] net/af_xdp: disable secondary process support Ciara Loftus
@ 2021-10-08 11:06 ` Ferruh Yigit
0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2021-10-08 11:06 UTC (permalink / raw)
To: Ciara Loftus, dev; +Cc: stable, stephen
On 10/8/2021 8:50 AM, Ciara Loftus wrote:
> Since the AF_XDP PMD does not work for secondary processes as reported
> in Bugzilla 805, check for the process type at the beginning of probe
> and return ENOTSUP if the process type is secondary.
>
> It is planned that secondary processes will be supported by the PMD in
> full in a future release by using rte_mp_msg to pass the state to the
> secondary process that it requires in order to work.
>
> Bugzilla ID: 805
> Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-08 11:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 13:46 [dpdk-stable] [PATCH] net/af_xdp: do not attempt probe for secondary processes Ciara Loftus
2021-09-30 15:18 ` Stephen Hemminger
2021-10-05 15:06 ` Ferruh Yigit
2021-10-08 7:50 ` [dpdk-stable] [PATCH v2] net/af_xdp: disable secondary process support Ciara Loftus
2021-10-08 11:06 ` Ferruh Yigit
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).