projects
/
flowspec-xdp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7a55a54
)
Use a single command to install xdp instead of remove+add
author
Matt Corallo
<git@bluematt.me>
Sat, 23 Oct 2021 19:53:46 +0000
(19:53 +0000)
committer
Matt Corallo
<git@bluematt.me>
Thu, 28 Oct 2021 01:34:22 +0000
(
01:34
+0000)
install.sh
patch
|
blob
|
history
diff --git
a/install.sh
b/install.sh
index 8106defcede58a12000699055160daf35c3e5856..b791d8ee5c0b98c692e14e9102cecd149b3b8a04 100755
(executable)
--- a/
install.sh
+++ b/
install.sh
@@
-29,12
+29,10
@@
fi
echo "Before unload drop count was:"
./dropcount.sh || echo "Not loaded"
echo "Before unload drop count was:"
./dropcount.sh || echo "Not loaded"
-ip link set "$1" xdp off
-ip link set "$1" xdpgeneric off
# Note that sometimes the automated fallback does not work properly so we have to || generic here
# Note that sometimes the automated fallback does not work properly so we have to || generic here
-ip link set "$1" xdpoffload obj xdp sec $XDP_SECTION || (
- echo "Failed to install in NIC, testing in driver..." && ip link set "$1" xdpdrv obj xdp sec $XDP_SECTION || (
- echo "Failed to install in driver, using generic..." && ip link set "$1" xdpgeneric obj xdp sec $XDP_SECTION
+ip
-force
link set "$1" xdpoffload obj xdp sec $XDP_SECTION || (
+ echo "Failed to install in NIC, testing in driver..." && ip
-force
link set "$1" xdpdrv obj xdp sec $XDP_SECTION || (
+ echo "Failed to install in driver, using generic..." && ip
-force
link set "$1" xdpgeneric obj xdp sec $XDP_SECTION
)
)
echo "$STATS_RULES" > installed-rules.txt
)
)
echo "$STATS_RULES" > installed-rules.txt