-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update AF_PACKET patch as source file was updated
- Loading branch information
1 parent
8b5e4e2
commit ed42124
Showing
1 changed file
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
SPDX-License-Identifier: Apache-2.0 | ||
Copyright 2019-present Intel Corporation | ||
|
||
From 4d95b7d7cb501cce958bb77e33e066f23ae52901 Mon Sep 17 00:00:00 2001 | ||
From: "Arrobo, Gabriel" <gabriel.arrobo@intel.com> | ||
Date: Thu, 29 Feb 2024 11:34:41 -0800 | ||
From e1bc63488d346cb84ae7e76f2bc480247f577abb Mon Sep 17 00:00:00 2001 | ||
From: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com> | ||
Date: Fri, 12 Jun 2020 21:36:53 +0000 | ||
Subject: [PATCH] af_packet Avoid set ioctl if there is no flag diff | ||
|
||
Signed-off-by: Arrobo, Gabriel <[email protected]> | ||
rte_eth_dev_start -> rte_eth_dev_config_restore | ||
In 19.11 DPDK started returning errors | ||
https://github.com/DPDK/dpdk/commit/9039c8125730adfd46b8c891e7f205eb4ac43c67 | ||
https://github.com/DPDK/dpdk/commit/69d0e7092874db1909bc40986c06219f1880dc23 | ||
|
||
Gist | ||
https://gist.github.com/krsna1729/0c7160920343f9fa55f760c770286155 | ||
|
||
We also patch af_packet PMD to change set flags only when needed | ||
|
||
Signed-off-by: Saikrishna Edupuganti <[email protected]> | ||
|
||
[Updated] | ||
From: "Arrobo, Gabriel" <[email protected]> | ||
Date: Thu, 29 Feb 2024 11:34:41 -0800 | ||
--- | ||
drivers/net/af_packet/rte_eth_af_packet.c | 8 ++++++++ | ||
1 file changed, 8 insertions(+) | ||
|
@@ -22,7 +36,7 @@ index c13a0942aa..e47aefb64c 100644 | |
+ uint32_t cur_flags; | ||
int ret = 0; | ||
int s; | ||
|
||
@@ -585,8 +586,15 @@ eth_dev_change_flags(char *if_name, uint32_t flags, uint32_t mask) | ||
ret = -errno; | ||
goto out; | ||
|
@@ -32,13 +46,13 @@ index c13a0942aa..e47aefb64c 100644 | |
ifr.ifr_flags |= flags; | ||
+ | ||
+ // Return if there is no change | ||
+ if (cur_flags == ifr.ifr_flags){ | ||
+ if (cur_flags == (uint32_t)ifr.ifr_flags){ | ||
+ goto out; | ||
+ } | ||
+ | ||
if (ioctl(s, SIOCSIFFLAGS, &ifr) < 0) { | ||
ret = -errno; | ||
goto out; | ||
-- | ||
-- | ||
2.25.1 | ||
|