-
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.
- Loading branch information
1 parent
7e8d814
commit dc7ef58
Showing
11 changed files
with
61 additions
and
77 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
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
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
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
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
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,5 +1,5 @@ | ||
SPDX-License-Identifier: Apache-2.0 | ||
Copyright 2019 Intel Corporation | ||
Copyright 2019-present Intel Corporation | ||
|
||
From e1bc63488d346cb84ae7e76f2bc480247f577abb Mon Sep 17 00:00:00 2001 | ||
From: Saikrishna Edupuganti <[email protected]> | ||
|
@@ -17,33 +17,36 @@ 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 | 9 +++++++++ | ||
1 file changed, 9 insertions(+) | ||
drivers/net/af_packet/rte_eth_af_packet.c | 8 ++++++++ | ||
1 file changed, 8 insertions(+) | ||
|
||
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c | ||
index f5806bf42..29d45eb47 100644 | ||
index c13a0942aa..e47aefb64c 100644 | ||
--- a/drivers/net/af_packet/rte_eth_af_packet.c | ||
+++ b/drivers/net/af_packet/rte_eth_af_packet.c | ||
@@ -472,6 +472,7 @@ static int | ||
@@ -573,6 +573,7 @@ static int | ||
eth_dev_change_flags(char *if_name, uint32_t flags, uint32_t mask) | ||
{ | ||
struct ifreq ifr; | ||
+ uint32_t cur_flags; | ||
int ret = 0; | ||
int s; | ||
|
||
@@ -484,8 +485,16 @@ eth_dev_change_flags(char *if_name, uint32_t flags, uint32_t mask) | ||
@@ -585,8 +586,15 @@ eth_dev_change_flags(char *if_name, uint32_t flags, uint32_t mask) | ||
ret = -errno; | ||
goto out; | ||
} | ||
+ | ||
+ cur_flags = ifr.ifr_flags; | ||
ifr.ifr_flags &= mask; | ||
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; | ||
+ } | ||
+ | ||
|
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
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
- libgtest-dev | ||
- python3 | ||
- python3-pip | ||
- python3-pyelftools | ||
- python3-setuptools | ||
- pkg-config | ||
|
||
|