From 25582a62ddb8ce9dc560b07614da81fe45ad172f Mon Sep 17 00:00:00 2001 From: yangchen Date: Fri, 1 Nov 2024 09:13:20 +0800 Subject: [PATCH] net/af_xdp: fix getsockopt ENOTSOCK error --- ...af_xdp-fix-getsockopt-ENOTSOCK-error.patch | 30 +++++++++++++++++++ dpdk.spec | 8 +++-- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 0485-net-af_xdp-fix-getsockopt-ENOTSOCK-error.patch diff --git a/0485-net-af_xdp-fix-getsockopt-ENOTSOCK-error.patch b/0485-net-af_xdp-fix-getsockopt-ENOTSOCK-error.patch new file mode 100644 index 0000000..423b382 --- /dev/null +++ b/0485-net-af_xdp-fix-getsockopt-ENOTSOCK-error.patch @@ -0,0 +1,30 @@ +From d1e498f1832a09b220831d87d345fe943189cbe7 Mon Sep 17 00:00:00 2001 +From: yangchen +Date: Wed, 30 Oct 2024 04:20:55 +0800 +Subject: [PATCH] net/af_xdp: fix getsockopt ENOTSOCK error + +--- + drivers/net/af_xdp/rte_eth_af_xdp.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c +index 6314338..4254a5c 100644 +--- a/drivers/net/af_xdp/rte_eth_af_xdp.c ++++ b/drivers/net/af_xdp/rte_eth_af_xdp.c +@@ -1914,12 +1914,11 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, + ret = -rte_errno; + goto err; + } +- rxq->fds[0].fd = 0; + } else { +- rxq->fds[0].fd = xsk_socket__fd(rxq->xsk); + rxq->fds[0].events = POLLIN; + } + ++ rxq->fds[0].fd = xsk_socket__fd(rxq->xsk); + process_private->rxq_xsk_fds[rx_queue_id] = rxq->fds[0].fd; + + rxq->port = dev->data->port_id; +-- +2.33.0 + diff --git a/dpdk.spec b/dpdk.spec index f643f80..8673290 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,6 +1,6 @@ Name: dpdk Version: 21.11 -Release: 78 +Release: 79 Packager: packaging@6wind.com URL: http://dpdk.org %global source_version 21.11 @@ -516,10 +516,9 @@ patch9479: 0479-config-arm-adapt-RTE_MAX_LCORE-to-640.patch patch9480: 0480-af_xdp-support-recv-multi-buffer.patch Patch9481: 0481-net-af_xdp-add-interrupt-support.patch Patch9482: 0482-af_xdp-del-XDP_USE_SG-and-XDP_PKT_CONTD-definition.patch - Patch9483: 0483-af_xdp-fix-mbuf-ol_flags-not-init.patch - Patch9484: 0484-bus-pci-fix-UIO-resource-mapping-in-secondary-proces.patch +Patch9485: 0485-net-af_xdp-fix-getsockopt-ENOTSOCK-error.patch Summary: Data Plane Development Kit core Group: System Environment/Libraries @@ -687,6 +686,9 @@ fi /usr/sbin/depmod %changelog +* Thu Oct 31 2024 yangchen - 21.11-79 + net/af_xdp: fix getsockopt ENOTSOCK error + * Wed Oct 23 2024 chenyi - 21.11-78 Sync some patches from upstream about bugfix, modifies are as follow: - bus/pci: fix UIO resource mapping in secondary process -- Gitee