diff --git a/0287-ethdev-fix-one-address-occupies-two-entries-in-MAC-a.patch b/0287-ethdev-fix-MAC-address-occupies-two-entries.patch similarity index 82% rename from 0287-ethdev-fix-one-address-occupies-two-entries-in-MAC-a.patch rename to 0287-ethdev-fix-MAC-address-occupies-two-entries.patch index f94dc239f9cb2712bc97cbdb8fda00cb7e1b2c22..0449ac2ed352c543815e38cc4f891700f8ca3767 100644 --- a/0287-ethdev-fix-one-address-occupies-two-entries-in-MAC-a.patch +++ b/0287-ethdev-fix-MAC-address-occupies-two-entries.patch @@ -1,9 +1,9 @@ -From dfa6c33450b990739a282f5acad8e43a5b27437b Mon Sep 17 00:00:00 2001 +From 4376182ad6b6abaf1c9fa9d3fe4df9f0a03870eb Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 19 May 2023 17:31:55 +0800 -Subject: ethdev: fix one address occupies two entries in MAC addrs +Subject: [PATCH] ethdev: fix MAC address occupies two entries -[ upstream commit 964ccaf2fe229ef31f57574176f966af7fcefae4 ] +[ upstream commit 8f02f472a29432650d999969359d6a49ea6aadca ] The dev->data->mac_addrs[0] will be changed to a new MAC address when applications modify the default MAC address by .mac_addr_set(). However, @@ -35,12 +35,12 @@ Acked-by: Thomas Monjalon Reviewed-by: Ferruh Yigit --- lib/ethdev/ethdev_driver.h | 6 +++++- - lib/ethdev/rte_ethdev.c | 14 +++++++++++++- + lib/ethdev/rte_ethdev.c | 10 ++++++++++ lib/ethdev/rte_ethdev.h | 4 ++++ - 3 files changed, 22 insertions(+), 2 deletions(-) + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h -index d3de203d7a..6f539d45c6 100644 +index d3de203..6f539d4 100644 --- a/lib/ethdev/ethdev_driver.h +++ b/lib/ethdev/ethdev_driver.h @@ -111,7 +111,11 @@ struct rte_eth_dev_data { @@ -57,10 +57,10 @@ index d3de203d7a..6f539d45c6 100644 /** Bitmap associating MAC addresses to pools */ uint64_t mac_pool_sel[RTE_ETH_NUM_RECEIVE_MAC_ADDR]; diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c -index 054715e05a..2f0aa282df 100644 +index 4e5499a..ed2cdec 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c -@@ -4471,6 +4471,7 @@ int +@@ -4470,6 +4470,7 @@ int rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr) { struct rte_eth_dev *dev; @@ -68,14 +68,10 @@ index 054715e05a..2f0aa282df 100644 int ret; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); -@@ -4486,8 +4487,19 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr) - if (!rte_is_valid_assigned_ether_addr(addr)) - return -EINVAL; +@@ -4487,6 +4488,15 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr) + + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_set, -ENOTSUP); -- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_set, -ENOTSUP); -+ if (*dev->dev_ops->mac_addr_set == NULL) -+ return -ENOTSUP; -+ + /* Keep address unique in dev->data->mac_addrs[]. */ + index = eth_dev_get_mac_addr_index(port_id, addr); + if (index > 0) { @@ -84,13 +80,12 @@ index 054715e05a..2f0aa282df 100644 + port_id); + return -EEXIST; + } - -+ ret = (*dev->dev_ops->mac_addr_set)(dev, addr); ++ ret = (*dev->dev_ops->mac_addr_set)(dev, addr); if (ret < 0) return ret; diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h -index b262939a33..9df50c30b4 100644 +index b262939..9df50c3 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -4167,6 +4167,9 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id, diff --git a/dpdk.spec b/dpdk.spec index 7ce920b1c1b109cb8587304c3b08a3346149951b..71ea01dee8369949529c6fc6eb713e991d08ff1e 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,6 +1,6 @@ Name: dpdk Version: 21.11 -Release: 55 +Release: 56 Packager: packaging@6wind.com URL: http://dpdk.org %global source_version 21.11 @@ -307,7 +307,7 @@ Patch6283: 0283-dma-skeleton-fix-empty-devargs-parsing.patch Patch6284: 0284-raw-skeleton-fix-empty-devargs-parsing.patch Patch6285: 0285-net-hns3-simplify-hardware-checksum-offloading.patch Patch6286: 0286-net-hns3-support-dump-media-type.patch -Patch6287: 0287-ethdev-fix-one-address-occupies-two-entries-in-MAC-a.patch +Patch6287: 0287-ethdev-fix-MAC-address-occupies-two-entries.patch Patch6288: 0288-net-hns3-fix-never-set-MAC-flow-control.patch Patch6289: 0289-net-hns3-add-flow-control-autoneg-for-fiber-port.patch Patch6290: 0290-net-hns3-fix-variable-type-mismatch.patch @@ -522,6 +522,10 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko /usr/sbin/depmod %changelog +* Thu Aug 17 2023 huangdengdui - 21.11-56 + Update the following patch + - ethdev: fix MAC address occupies two entries + * Mon Jul 17 2023 chenjiji - 21.11-55 Sync some patchs from upstreaming about add FDIR VLAN match mode runtime config and fix doc format for hns3 pmd. Patchs