From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1CB9A0C4D; Fri, 3 Sep 2021 05:21:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 446624013F; Fri, 3 Sep 2021 05:21:10 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id B909140041 for ; Fri, 3 Sep 2021 05:21:08 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 78659A0C53; Fri, 3 Sep 2021 05:21:08 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Fri, 03 Sep 2021 03:21:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: core X-Bugzilla-Version: 21.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: stephen@networkplumber.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 805] af_xdp PMD is broken with primary/secondary process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D805 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 =3D &ops; + eth_dev->device =3D &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. --=20 You are receiving this mail because: You are the assignee for the bug.=