DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 805] af_xdp PMD is broken with primary/secondary process
Date: Fri, 03 Sep 2021 03:21:08 +0000	[thread overview]
Message-ID: <bug-805-3@http.bugs.dpdk.org/> (raw)

https://bugs.dpdk.org/show_bug.cgi?id=805

            Bug ID: 805
           Summary: af_xdp PMD is broken with primary/secondary process
           Product: DPDK
           Version: 21.11
          Hardware: All
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: stephen@networkplumber.org
  Target Milestone: ---

AF_XDP PMD is broken for primary/secondary process model.
Both the procinfo, pdump and other applications need to be able to basic
calls from secondary process.

There is one bug easy bug, where af_xdp crashes when calling
rte_eth_info_get() in secondary process because eth_dev->device
was not set.

--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1800,6 +1800,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
                        return -EINVAL;
                }
                eth_dev->dev_ops = &ops;
+               eth_dev->device = &dev->device;
                rte_eth_dev_probing_finish(eth_dev);
                return 0;
        }

But there is a bigger problem when code calls rte_eth_stats_get().
The af_xdp PMD tries to send a request to kernel to get the number
of missed packets; but the file descriptor is only valid in the primary
process. Fixing this is much deeper and requires opening a different
socket in each process, and will XDP in kernel handle this correctly?

I think we should just mark AF_XDP as broken in with primary/secondary
and return an error in probe in secondary process.

-- 
You are receiving this mail because:
You are the assignee for the bug.

             reply	other threads:[~2021-09-03  3:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  3:21 bugzilla [this message]
2021-10-11  6:59 ` bugzilla

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=bug-805-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /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).