net/af_xdp: do not attempt probe for secondary processes
PATCH 1/1 net/af_xdp: do not attempt probe for secondary processes
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
--- drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/net/af_xdp/rte_eth_af_xdp.c +5 -10
@@ -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);
Signature · 1 line
2.17.1
Quoted 10 lines · On Thu, 30 Sep 2021 13:46:04 +0000 Ciara Loftus <[email protected]> wrote:
Since the
AF_XDPPMD 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")Signed-off-by Ciara Loftus <[email protected]>Reported-by Stephen Hemminger <[email protected]>
Thanks for fixing.
Quoted 4 lines · Ciara Loftus
Since the
AF_XDPPMD 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
Quoted 37 lines
Bugzilla ID: 805
Fixes f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")Signed-off-by Ciara Loftus <[email protected]>Reported-by Stephen Hemminger <[email protected]>--- drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)drivers/net/af_xdp/rte_eth_af_xdp.c +5
-10@@ -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);
PATCH v2 1/1 net/af_xdp: disable secondary process support
In reply to Ciara LoftusSince 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
--- 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(-)
doc/guides/rel_notes/release_21_11.rst +4 -0
@@ -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.
drivers/net/af_xdp/rte_eth_af_xdp.c +5 -10
@@ -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);
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2] net/af_xdp: disable secondary process support
Quoted 8 lines · Ciara Loftus
Since the
AF_XDPPMD 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_msgto pass the state to the secondary process that it requires in order to work.
Quoted 6 lines
Bugzilla ID: 805
Fixes f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")Signed-off-by Ciara Loftus <[email protected]>Reported-by Stephen Hemminger <[email protected]>
Applied to dpdk-next-net/main, thanks.