Skip to content

Commit

Permalink
net/af_xdp: disable secondary process support
Browse files Browse the repository at this point in the history
[ upstream commit 0668d82 ]

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: f1debd7 ("net/af_xdp: introduce AF_XDP PMD")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  • Loading branch information
cloftus authored and cpaelzer committed Nov 30, 2021
1 parent 0f30d11 commit 6dbdbe5
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions drivers/net/af_xdp/rte_eth_af_xdp.c
Expand Up @@ -1305,16 +1305,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);
Expand Down

0 comments on commit 6dbdbe5

Please sign in to comment.