From: Matt Corallo Date: Sat, 23 Oct 2021 19:53:46 +0000 (+0000) Subject: Use a single command to install xdp instead of remove+add X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=f14e8156a096aaa3ba97498b90e028019aa3252a;p=flowspec-xdp Use a single command to install xdp instead of remove+add --- diff --git a/install.sh b/install.sh index 8106def..b791d8e 100755 --- a/install.sh +++ b/install.sh @@ -29,12 +29,10 @@ fi 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 -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