* [PATCH net-next v4 5/5] selftests: tc-tests: actions: add MPLS tests
From: John Hurley @ 2019-07-01 12:30 UTC (permalink / raw)
To: netdev
Cc: davem, jiri, xiyou.wangcong, dsahern, simon.horman,
jakub.kicinski, oss-drivers, John Hurley
In-Reply-To: <1561984257-9798-1-git-send-email-john.hurley@netronome.com>
Add a new series of selftests to verify the functionality of act_mpls in
TC.
Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
.../tc-testing/tc-tests/actions/mpls.json | 812 +++++++++++++++++++++
1 file changed, 812 insertions(+)
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/mpls.json
diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/mpls.json b/tools/testing/selftests/tc-testing/tc-tests/actions/mpls.json
new file mode 100644
index 0000000..9708de9
--- /dev/null
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/mpls.json
@@ -0,0 +1,812 @@
+[
+ {
+ "id": "a933",
+ "name": "Add MPLS dec_ttl action with pipe opcode",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl pipe index 8",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*pipe.*index 8 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "08d1",
+ "name": "Add mpls dec_ttl action with pass opcode",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl pass index 8",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions get action mpls index 8",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*pass.*index 8 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "d786",
+ "name": "Add mpls dec_ttl action with drop opcode",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl drop index 8",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions get action mpls index 8",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*drop.*index 8 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "f334",
+ "name": "Add mpls dec_ttl action with reclassify opcode",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl reclassify index 8",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions get action mpls index 8",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*reclassify.*index 8 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "29bd",
+ "name": "Add mpls dec_ttl action with continue opcode",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl continue index 8",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions get action mpls index 8",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*continue.*index 8 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "48df",
+ "name": "Add mpls dec_ttl action with jump opcode",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl jump 10 index 8",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*jump 10.*index 8 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "62eb",
+ "name": "Add mpls dec_ttl action with trap opcode",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl trap index 8",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl trap.*index 8 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "9118",
+ "name": "Add mpls dec_ttl action with invalid opcode",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl foo index 8",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*foo.*index 8 ref",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "6ce1",
+ "name": "Add mpls dec_ttl action with label (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl label 20",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*label.*20.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "352f",
+ "name": "Add mpls dec_ttl action with tc (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl tc 3",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*tc.*3.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "fa1c",
+ "name": "Add mpls dec_ttl action with ttl (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl ttl 20",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*ttl.*20.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "6b79",
+ "name": "Add mpls dec_ttl action with bos (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls dec_ttl bos 1",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*bos.*1.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "d4c4",
+ "name": "Add mpls pop action with ip proto",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*pop.*protocol.*ip.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "92fe",
+ "name": "Add mpls pop action with mpls proto",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls pop protocol mpls_mc",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*pop.*protocol.*mpls_mc.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "7e23",
+ "name": "Add mpls pop action with no protocol (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls pop",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*pop.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "6182",
+ "name": "Add mpls pop action with label (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 label 20",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*pop.*label.*20.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "6475",
+ "name": "Add mpls pop action with tc (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 tc 3",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*pop.*tc.*3.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "067b",
+ "name": "Add mpls pop action with ttl (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 ttl 20",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*pop.*ttl.*20.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "7316",
+ "name": "Add mpls pop action with bos (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 bos 1",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*pop.*bos.*1.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "38cc",
+ "name": "Add mpls push action with label",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push label 20",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*[0-9]+.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "c281",
+ "name": "Add mpls push action with mpls_mc protocol",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push protocol mpls_mc label 20",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_mc.*label.*20.*ttl.*[0-9]+.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "5db4",
+ "name": "Add mpls push action with label, tc and ttl",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push label 20 tc 3 ttl 128",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*tc.*3.*ttl.*128.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "16eb",
+ "name": "Add mpls push action with label and bos",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push label 20 bos 1",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*bos.*1.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "d69d",
+ "name": "Add mpls push action with no label (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "e8e4",
+ "name": "Add mpls push action with ipv4 protocol (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push protocol ipv4 label 20",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*[0-9]+.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "ecd0",
+ "name": "Add mpls push action with out of range label (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push label 1048576",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*1048576.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "d303",
+ "name": "Add mpls push action with out of range tc (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push label 20 tc 8",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*tc.*8.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "fd6e",
+ "name": "Add mpls push action with ttl of 0 (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls push label 20 ttl 0",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*0.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "19e9",
+ "name": "Add mpls mod action with mpls label",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls mod label 20",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*modify.*label.*20.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "04b5",
+ "name": "Add mpls mod action with mpls tc",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls mod tc 3",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*modify.*tc.*3.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "6ed5",
+ "name": "Add mpls mod action with mpls label",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls mod ttl 128",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*128.*pipe",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "db7c",
+ "name": "Add mpls mod action with protocol (invalid)",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ]
+ ],
+ "cmdUnderTest": "$TC actions add action mpls mod protocol ipv4",
+ "expExitCode": "255",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*modify.*protocol.*ip.*pipe",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "b070",
+ "name": "Replace existing mpls push action with new ID",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC actions add action mpls push label 20 pipe index 12"
+ ],
+ "cmdUnderTest": "$TC actions replace action mpls push label 30 pipe index 12",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions get action mpls index 12",
+ "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*30.*pipe.*index 12 ref",
+ "matchCount": "1",
+ "teardown": [
+ "$TC actions flush action mpls"
+ ]
+ },
+ {
+ "id": "6cce",
+ "name": "Delete mpls pop action",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC actions add action mpls pop protocol ipv4 index 44"
+ ],
+ "cmdUnderTest": "$TC actions del action mpls index 44",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*pop.*index 44 ref",
+ "matchCount": "0",
+ "teardown": []
+ },
+ {
+ "id": "d138",
+ "name": "Flush mpls actions",
+ "category": [
+ "actions",
+ "mpls"
+ ],
+ "setup": [
+ [
+ "$TC actions flush action mpls",
+ 0,
+ 1,
+ 255
+ ],
+ "$TC actions add action mpls push label 10 index 10",
+ "$TC actions add action mpls push label 20 index 20",
+ "$TC actions add action mpls push label 30 index 30",
+ "$TC actions add action mpls push label 40 index 40"
+ ],
+ "cmdUnderTest": "$TC actions flush action mpls",
+ "expExitCode": "0",
+ "verifyCmd": "$TC actions list action mpls",
+ "matchPattern": "action order [0-9]+: mpls.*push.*",
+ "matchCount": "0",
+ "teardown": []
+ }
+]
--
2.7.4
^ permalink raw reply related
* Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns
From: Nicolas Dichtel @ 2019-07-01 12:34 UTC (permalink / raw)
To: David Howells; +Cc: Alexander Aring, netdev, linux-fsdevel, kernel
In-Reply-To: <18557.1561739215@warthog.procyon.org.uk>
Le 28/06/2019 à 18:26, David Howells a écrit :
> Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
>
>> David Howells was working on a mount notification mechanism:
>> https://lwn.net/Articles/760714/
>> https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=notifications
>>
>> I don't know what is the status of this series.
>
> It's still alive. I just posted a new version on it. I'm hoping, possibly
> futiley, to get it in in this merge window.
Nice to hear. It will help to properly solve this issue.
Thank you,
Nicolas
^ permalink raw reply
* Re: [RFC iproute2] netns: add mounting state file for each netns
From: Nicolas Dichtel @ 2019-07-01 12:38 UTC (permalink / raw)
To: Matteo Croce, netdev; +Cc: Alexander Aring
In-Reply-To: <20190630192933.30743-1-mcroce@redhat.com>
Le 30/06/2019 à 21:29, Matteo Croce a écrit :
> When ip creates a netns, there is a small time interval between the
> placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc.
>
> Add a temporary file named .mounting-$netns which gets deleted after the
> bind mount, so watching for delete event matching the .mounting-* name
> will notify watchers only after the bind mount has been done.
Probably a naive question, but why creating those '.mounting-$netns' files in
the directory where netns are stored? Why not another directory, something like
/var/run/netns-monitor/?
Regards,
Nicolas
^ permalink raw reply
* Re: [PATCH] net: ethernet: mediatek: Fix overlapping capability bits.
From: René van Dorst @ 2019-07-01 12:44 UTC (permalink / raw)
To: Willem de Bruijn
Cc: sean.wang, f.fainelli, linux, David Miller, matthias.bgg, andrew,
vivien.didelot, frank-w, Network Development, linux-mediatek,
linux-mips
In-Reply-To: <CA+FuTSdr8HCRJTE8pEVxsga3N-xx-fEAxzKAAyPFWH6doVRHbQ@mail.gmail.com>
Quoting Willem de Bruijn <willemdebruijn.kernel@gmail.com>:
> On Sat, Jun 29, 2019 at 8:24 AM René van Dorst <opensource@vdorst.com> wrote:
>>
>> Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10.
>>
>> This causes issues on non-MT7621 devices which has the
>> MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) capability set.
>> The wrong TRGMII setup code is executed.
>>
>> Moving the MTK_PATH_BIT to bit 11 fixes the issue.
>>
>> Fixes: 8efaa653a8a5 ("net: ethernet: mediatek: Add MT7621 TRGMII mode
>> support")
>> Signed-off-by: René van Dorst <opensource@vdorst.com>
>
> This targets net? Please mark networking patches [PATCH net] or [PATCH
> net-next].
Hi Willem,
Thanks for you input.
This patch was for net-next.
>
>> ---
>> drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
>> b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
>> index 876ce6798709..2cb8a915731c 100644
>> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
>> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
>> @@ -626,7 +626,7 @@ enum mtk_eth_path {
>> #define MTK_TRGMII_MT7621_CLK BIT(10)
>>
>> /* Supported path present on SoCs */
>> -#define MTK_PATH_BIT(x) BIT((x) + 10)
>>
>> +#define MTK_PATH_BIT(x) BIT((x) + 11)
>>
>
> To avoid this happening again, perhaps make the reserved range more explicit?
>
> For instance
>
> #define MTK_FIXED_BIT_LAST 10
> #define MTK_TRGMII_MT7621_CLK BIT(MTK_FIXED_BIT_LAST)
>
> #define MTK_PATH_BIT_FIRST (MTK_FIXED_BIT_LAST + 1)
> #define MTK_PATH_BIT_LAST (MTK_FIXED_BIT_LAST + 7)
> #define MTK_MUX_BIT_FIRST (MTK_PATH_BIT_LAST + 1)
>
> Though I imagine there are cleaner approaches. Perhaps define all
> fields as enum instead of just mtk_eth_mux and mtk_eth_path. Then
> there can be no accidental collision.
You mean in a similar way as done in the ethtool.h [0]?
Use a enum to define the unique bits.
enum mtk_bits {
MTK_RGMII_BIT = 0,
MTK_SGMII_BIT,
MTK_TRGMII_BIT,
AND SO ON ....
};
Also move the mtk_eth_mux and mtk_eth_path in to this enum.
Then use defines to convert bits to values.
#define MTK_RGMII BIT(MTK_RGMII_BIT)
#define MTK_TRGMII BIT(MTK_TRGMII_BIT)
Replace the MTK_PATH_BIT and MTK_PATH_BIT macro with BIT()
Is this what you had in mind?
Greats,
René
[0]:
https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/ethtool.h#L1402
^ permalink raw reply
* Re: [PATCH] net: ethernet: mediatek: Allow non TRGMII mode with MT7621 DDR2 devices
From: René van Dorst @ 2019-07-01 12:57 UTC (permalink / raw)
To: sean.wang, f.fainelli, linux, davem, matthias.bgg, andrew,
vivien.didelot
Cc: frank-w, netdev, linux-mediatek, linux-mips
In-Reply-To: <20190629122451.19578-1-opensource@vdorst.com>
Quoting René van Dorst <opensource@vdorst.com>:
I see that I also forgot to tag this patch for net-next.
Greats,
René
> No reason to error out on a MT7621 device with DDR2 memory when non
> TRGMII mode is selected.
> Only MT7621 DDR2 clock setup is not supported for TRGMII mode.
> But non TRGMII mode doesn't need any special clock setup.
>
> Signed-off-by: René van Dorst <opensource@vdorst.com>
> ---
> drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index 066712f2e985..b20b3a5a1ebb 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -139,9 +139,12 @@ static int mt7621_gmac0_rgmii_adjust(struct
> mtk_eth *eth,
> {
> u32 val;
>
> - /* Check DDR memory type. Currently DDR2 is not supported. */
> + /* Check DDR memory type.
> + * Currently TRGMII mode with DDR2 memory is not supported.
> + */
> regmap_read(eth->ethsys, ETHSYS_SYSCFG, &val);
> - if (val & SYSCFG_DRAM_TYPE_DDR2) {
> + if (interface == PHY_INTERFACE_MODE_TRGMII &&
> + val & SYSCFG_DRAM_TYPE_DDR2) {
> dev_err(eth->dev,
> "TRGMII mode with DDR2 memory is not supported!\n");
> return -EOPNOTSUPP;
> --
> 2.20.1
^ permalink raw reply
* Re: [PATCH] net: ethernet: mediatek: Fix overlapping capability bits.
From: Willem de Bruijn @ 2019-07-01 12:57 UTC (permalink / raw)
To: René van Dorst
Cc: sean.wang, Florian Fainelli, linux, David Miller, matthias.bgg,
andrew, vivien.didelot, frank-w, Network Development,
linux-mediatek, linux-mips
In-Reply-To: <20190701124447.Horde.RNUh-fSQf6XMauvPaGIYpKj@www.vdorst.com>
On Mon, Jul 1, 2019 at 8:44 AM René van Dorst <opensource@vdorst.com> wrote:
>
> Quoting Willem de Bruijn <willemdebruijn.kernel@gmail.com>:
>
> > On Sat, Jun 29, 2019 at 8:24 AM René van Dorst <opensource@vdorst.com> wrote:
> >>
> >> Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10.
> >>
> >> This causes issues on non-MT7621 devices which has the
> >> MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) capability set.
> >> The wrong TRGMII setup code is executed.
> >>
> >> Moving the MTK_PATH_BIT to bit 11 fixes the issue.
> >>
> >> Fixes: 8efaa653a8a5 ("net: ethernet: mediatek: Add MT7621 TRGMII mode
> >> support")
> >> Signed-off-by: René van Dorst <opensource@vdorst.com>
> >
> > This targets net? Please mark networking patches [PATCH net] or [PATCH
> > net-next].
>
> Hi Willem,
>
> Thanks for you input.
>
> This patch was for net-next.
>
> >
> >> ---
> >> drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
> >> b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
> >> index 876ce6798709..2cb8a915731c 100644
> >> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
> >> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
> >> @@ -626,7 +626,7 @@ enum mtk_eth_path {
> >> #define MTK_TRGMII_MT7621_CLK BIT(10)
> >>
> >> /* Supported path present on SoCs */
> >> -#define MTK_PATH_BIT(x) BIT((x) + 10)
> >>
> >> +#define MTK_PATH_BIT(x) BIT((x) + 11)
> >>
> >
> > To avoid this happening again, perhaps make the reserved range more explicit?
> >
> > For instance
> >
> > #define MTK_FIXED_BIT_LAST 10
> > #define MTK_TRGMII_MT7621_CLK BIT(MTK_FIXED_BIT_LAST)
> >
> > #define MTK_PATH_BIT_FIRST (MTK_FIXED_BIT_LAST + 1)
> > #define MTK_PATH_BIT_LAST (MTK_FIXED_BIT_LAST + 7)
> > #define MTK_MUX_BIT_FIRST (MTK_PATH_BIT_LAST + 1)
> >
> > Though I imagine there are cleaner approaches. Perhaps define all
> > fields as enum instead of just mtk_eth_mux and mtk_eth_path. Then
> > there can be no accidental collision.
>
> You mean in a similar way as done in the ethtool.h [0]?
>
> Use a enum to define the unique bits.
>
> enum mtk_bits {
> MTK_RGMII_BIT = 0,
> MTK_SGMII_BIT,
> MTK_TRGMII_BIT,
> AND SO ON ....
> };
>
> Also move the mtk_eth_mux and mtk_eth_path in to this enum.
That's the key part: they are all part of the same namespace and these
enums are not used anywhere else, so a single enum will avoid
accidentally namespace collisions.
> Then use defines to convert bits to values.
>
> #define MTK_RGMII BIT(MTK_RGMII_BIT)
> #define MTK_TRGMII BIT(MTK_TRGMII_BIT)
>
> Replace the MTK_PATH_BIT and MTK_PATH_BIT macro with BIT()
>
> Is this what you had in mind?
Great find. Exactly, but I did not find such a clear example.
>
> Greats,
>
> René
>
> [0]:
> https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/ethtool.h#L1402
>
>
>
^ permalink raw reply
* Re: [PATCH net-next] xdp: xdp_umem: fix umem pages mapping for 32bits systems
From: Björn Töpel @ 2019-07-01 13:10 UTC (permalink / raw)
To: David Miller, Ivan Khoronzhuk
Cc: Björn Töpel, Karlsson, Magnus, Alexei Starovoitov,
Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend, Netdev,
bpf, Xdp, LKML
In-Reply-To: <20190629.105306.762888643756822083.davem@davemloft.net>
On Sat, 29 Jun 2019 at 19:53, David Miller <davem@davemloft.net> wrote:
>
> From: Björn Töpel <bjorn.topel@gmail.com>
> Date: Wed, 26 Jun 2019 22:50:23 +0200
>
> > On Wed, 26 Jun 2019 at 17:59, Ivan Khoronzhuk
> > <ivan.khoronzhuk@linaro.org> wrote:
> >>
> >> Use kmap instead of page_address as it's not always in low memory.
> >>
> >
> > Ah, some 32-bit love. :-) Thanks for working on this!
> >
> > For future patches, please base AF_XDP patches on the bpf/bpf-next
> > tree instead of net/net-next.
> >
> > Acked-by: Björn Töpel <bjorn.topel@intel.com>
>
> Alexei and Daniel, I'll let you guys take this one.
>
> Thanks.
Ivan, kbuild reported some build issues. Faulty, or not; Please have a
look at them.
Cheers,
Björn
^ permalink raw reply
* Re: [PATCH net-next 3/3] macsec: add brackets and indentation after calling macsec_decrypt
From: Sabrina Dubroca @ 2019-07-01 13:21 UTC (permalink / raw)
To: Willem de Bruijn; +Cc: Andreas Steinmetz, Network Development
In-Reply-To: <CA+FuTSfmi3XCTR5CCiUk180XTy69mJsL4Y_5zStP727b=woWJQ@mail.gmail.com>
2019-06-30, 22:05:41 -0400, Willem de Bruijn wrote:
> On Sun, Jun 30, 2019 at 4:48 PM Andreas Steinmetz <ast@domdv.de> wrote:
> >
> > At this point, skb could only be a valid pointer, so this patch does
> > not introduce any functional change.
>
> Previously, macsec_post_decrypt could be called on the original skb if
> the initial condition was false and macsec_decrypt is skipped. That
> was probably unintended. Either way, then this is a functional change,
> and perhaps a bugfix?
Ouch, I missed that when Andreas sent me that patch before. No, it is
actually intended. If we skip macsec_decrypt(), we should still
account for that packet in the InPktsUnchecked/InPktsDelayed
counters. That's in Figure 10-5 in the standard.
Thanks for catching this, Willem. That patch should only move the
IS_ERR(skb) case under the block where macsec_decrypt() is called, but
not move the call to macsec_post_decrypt().
> > Signed-off-by: Andreas Steinmetz <ast@domdv.de>
> >
> > --- a/drivers/net/macsec.c 2019-06-30 22:05:17.785683634 +0200
> > +++ b/drivers/net/macsec.c 2019-06-30 22:05:20.526171178 +0200
> > @@ -1205,21 +1205,22 @@
> >
> > /* Disabled && !changed text => skip validation */
> > if (hdr->tci_an & MACSEC_TCI_C ||
> > - secy->validate_frames != MACSEC_VALIDATE_DISABLED)
> > + secy->validate_frames != MACSEC_VALIDATE_DISABLED) {
> > skb = macsec_decrypt(skb, dev, rx_sa, sci, secy);
> >
> > - if (IS_ERR(skb)) {
> > - /* the decrypt callback needs the reference */
> > - if (PTR_ERR(skb) != -EINPROGRESS) {
> > - macsec_rxsa_put(rx_sa);
> > - macsec_rxsc_put(rx_sc);
> > + if (IS_ERR(skb)) {
> > + /* the decrypt callback needs the reference */
> > + if (PTR_ERR(skb) != -EINPROGRESS) {
> > + macsec_rxsa_put(rx_sa);
> > + macsec_rxsc_put(rx_sc);
> > + }
> > + rcu_read_unlock();
> > + return RX_HANDLER_CONSUMED;
> > }
> > - rcu_read_unlock();
> > - return RX_HANDLER_CONSUMED;
> > - }
> >
> > - if (!macsec_post_decrypt(skb, secy, pn))
> > - goto drop;
> > + if (!macsec_post_decrypt(skb, secy, pn))
> > + goto drop;
> > + }
> >
> > deliver:
> > macsec_finalize_skb(skb, secy->icv_len,
> >
--
Sabrina
^ permalink raw reply
* Re: [BUG] net: dm9600: false link status
From: Andrew Lunn @ 2019-07-01 13:29 UTC (permalink / raw)
To: Corentin Labbe; +Cc: jacmet, davem, netdev, linux-usb, linux-kernel
In-Reply-To: <20190701122050.GA11021@Red>
> But thoses chips should have marking (according to some photos on
> the web), so I probably own a counterfeiting of a
> clone/counterfeiting.
> At least, now i know that have a chip not designed to work with an external PHY, so all EXTPHY registers could be ignored.
> My last ressort is to brute force all values until something happen.
Does the rest of this work? You can actually transmit/receive frames,
but it is a 10/Half? So the MAC is working, just the PHY is missing?
> My simple tries, write 0xsomeval everywhere, lead to something, phy/eeprom return now 0x000y.
> Probably, this chip doesnt have any PHY...
If you look at dm9601_mdio_write() and dm9601_mdio_read() it always
passes 1. 0 is used for the EEPROM, at least in a real device. so try
1-31 and see if you get anything interesting.
Andrew
^ permalink raw reply
* Re: r8169 not working on 5.2.0rc6 with GPD MicroPC
From: Andrew Lunn @ 2019-07-01 13:35 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Karsten Wiborg, nic_swsd, romieu, netdev
In-Reply-To: <94b0f05e-2521-7251-ab92-b099a3cf99c9@gmail.com>
> When the vendor driver assigns a random MAC address, it writes it to the
> chip. The related registers may be persistent (can't say exactly due to
> missing documentation).
If the device supports WOL, it could be it is powered using the
standby supply, not the main supply. Try pulling the plug from the
wall to really remove all power.
Andrew
^ permalink raw reply
* [PATCH net-next] ipv6: icmp: allow flowlabel reflection in echo replies
From: Eric Dumazet @ 2019-07-01 13:39 UTC (permalink / raw)
To: David S . Miller; +Cc: netdev, Eric Dumazet, Eric Dumazet
Extend flowlabel_reflect bitmask to allow conditional
reflection of incoming flowlabels in echo replies.
Note this has precedence against auto flowlabels.
Add flowlabel_reflect enum to replace hard coded
values.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
Documentation/networking/ip-sysctl.txt | 4 +++-
include/net/ipv6.h | 7 +++++++
net/ipv6/af_inet6.c | 2 +-
net/ipv6/icmp.c | 3 +++
net/ipv6/sysctl_net_ipv6.c | 4 ++--
net/ipv6/tcp_ipv6.c | 2 +-
6 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index e0d8a96e2c671e3d09d234c8ed49799b08240259..f0e6d1f53485d6cbfcd73c9cd079b970d976b6d9 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1452,7 +1452,7 @@ flowlabel_reflect - INTEGER
environments. See RFC 7690 and:
https://tools.ietf.org/html/draft-wang-6man-flow-label-reflection-01
- This is a mask of two bits.
+ This is a bitmask.
1: enabled for established flows
Note that this prevents automatic flowlabel changes, as done
@@ -1463,6 +1463,8 @@ flowlabel_reflect - INTEGER
If set, a RST packet sent in response to a SYN packet on a closed
port will reflect the incoming flow label.
+ 4: enabled for ICMPv6 echo reply messages.
+
Default: 0
fib_multipath_hash_policy - INTEGER
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index b41f6a0fa903e9916e293f86f8bfb0f264161e80..8eca5fb30376f3a0a40ff0dc438cbad9ff56142a 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -301,6 +301,13 @@ struct ipv6_txoptions {
/* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */
};
+/* flowlabel_reflect sysctl values */
+enum flowlabel_reflect {
+ FLOWLABEL_REFLECT_ESTABLISHED = 1,
+ FLOWLABEL_REFLECT_TCP_RESET = 2,
+ FLOWLABEL_REFLECT_ICMPV6_ECHO_REPLIES = 4,
+};
+
struct ip6_flowlabel {
struct ip6_flowlabel __rcu *next;
__be32 label;
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 7382a927d1eb74a6bbf4d5f83de336ccab5a2ae2..8369af32cef619b5d8fd2fcfaeb12924941d4ae8 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -208,7 +208,7 @@ static int inet6_create(struct net *net, struct socket *sock, int protocol,
np->mc_loop = 1;
np->mc_all = 1;
np->pmtudisc = IPV6_PMTUDISC_WANT;
- np->repflow = net->ipv6.sysctl.flowlabel_reflect & 1;
+ np->repflow = net->ipv6.sysctl.flowlabel_reflect & FLOWLABEL_REFLECT_ESTABLISHED;
sk->sk_ipv6only = net->ipv6.sysctl.bindv6only;
/* Init the ipv4 part of the socket since we can have sockets
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 12906301ec7baedcccfba224b93d30cb6060c3b9..62c997201970a664cbcfd526d426af07ae019b0e 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -703,6 +703,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
tmp_hdr.icmp6_type = ICMPV6_ECHO_REPLY;
memset(&fl6, 0, sizeof(fl6));
+ if (net->ipv6.sysctl.flowlabel_reflect & FLOWLABEL_REFLECT_ICMPV6_ECHO_REPLIES)
+ fl6.flowlabel = ip6_flowlabel(ipv6_hdr(skb));
+
fl6.flowi6_proto = IPPROTO_ICMPV6;
fl6.daddr = ipv6_hdr(skb)->saddr;
if (saddr)
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 6d86fac472e7298cbd8df7aa0b190cf0087675e2..8b3fe81783ed945e2f9172fd9008f48fed474475 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -23,7 +23,7 @@
static int zero;
static int one = 1;
-static int three = 3;
+static int flowlabel_reflect_max = 0x7;
static int auto_flowlabels_min;
static int auto_flowlabels_max = IP6_AUTO_FLOW_LABEL_MAX;
@@ -116,7 +116,7 @@ static struct ctl_table ipv6_table_template[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
.extra1 = &zero,
- .extra2 = &three,
+ .extra2 = &flowlabel_reflect_max,
},
{
.procname = "max_dst_opts_number",
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 408d9ec2697154e840a26675765e8a9c1636ada4..4f3f99b3982099b3c64669f0445bc68d27390c89 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -989,7 +989,7 @@ static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb)
if (sk->sk_state == TCP_TIME_WAIT)
label = cpu_to_be32(inet_twsk(sk)->tw_flowlabel);
} else {
- if (net->ipv6.sysctl.flowlabel_reflect & 2)
+ if (net->ipv6.sysctl.flowlabel_reflect & FLOWLABEL_REFLECT_TCP_RESET)
label = ip6_flowlabel(ipv6h);
}
--
2.22.0.410.gd8fdbe21b5-goog
^ permalink raw reply related
* Re: [PATCH] sis900: add ethtool tests (link, eeprom)
From: Andrew Lunn @ 2019-07-01 13:46 UTC (permalink / raw)
To: Sergej Benilov; +Cc: venza, netdev
In-Reply-To: <20190701090333.25277-1-sergej.benilov@googlemail.com>
On Mon, Jul 01, 2019 at 11:03:33AM +0200, Sergej Benilov wrote:
> Add tests for ethtool: link test, EEPROM read test.
> Correct a few typos, too.
Hi Sergej
Please split this up into two patches. The first one should fixing the
typos.
Rather than implementing a test for the EEPROM, add support for
ethtool --eeprom-dump. That is much more useful.
The link test does not show you anything which you cannot get via ip
link show. If there is no carrier, the link is down. So drop that.
The patch also has white space issues. Spaces where there should be
tabs. Please run ./scripts/checkpatch.pl.
Andrew
^ permalink raw reply
* Re: [RFC iproute2] netns: add mounting state file for each netns
From: Matteo Croce @ 2019-07-01 13:50 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev, Alexander Aring
In-Reply-To: <e2173091-1c7a-fd74-95ea-41eedbab92d3@6wind.com>
On Mon, Jul 1, 2019 at 2:38 PM Nicolas Dichtel
<nicolas.dichtel@6wind.com> wrote:
>
> Le 30/06/2019 à 21:29, Matteo Croce a écrit :
> > When ip creates a netns, there is a small time interval between the
> > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc.
> >
> > Add a temporary file named .mounting-$netns which gets deleted after the
> > bind mount, so watching for delete event matching the .mounting-* name
> > will notify watchers only after the bind mount has been done.
> Probably a naive question, but why creating those '.mounting-$netns' files in
> the directory where netns are stored? Why not another directory, something like
> /var/run/netns-monitor/?
>
>
> Regards,
> Nicolas
Yes, would work too. But ideally I'd wait for the mount inotify notifications.
--
Matteo Croce
per aspera ad upstream
^ permalink raw reply
* Re: [PATCH net-next 1/8] Documentation/bindings: net: ocelot: document the PTP bank
From: Andrew Lunn @ 2019-07-01 13:52 UTC (permalink / raw)
To: Antoine Tenart
Cc: davem, richardcochran, alexandre.belloni, UNGLinuxDriver, ralf,
paul.burton, jhogan, netdev, linux-mips, thomas.petazzoni,
allan.nielsen
In-Reply-To: <20190701100327.6425-2-antoine.tenart@bootlin.com>
On Mon, Jul 01, 2019 at 12:03:20PM +0200, Antoine Tenart wrote:
> One additional register range needs to be described within the Ocelot
> device tree node: the PTP. This patch documents the binding needed to do
> so.
Hi Antoine
Are there any more register banks? Maybe just add them all?
Also, you should probably add a comment that despite it being in the
Required part of the binding, it is actually optional.
Andrew
^ permalink raw reply
* Re: [PATCH net-next 3/8] Documentation/bindings: net: ocelot: document the PTP ready IRQ
From: Andrew Lunn @ 2019-07-01 13:54 UTC (permalink / raw)
To: Antoine Tenart
Cc: davem, richardcochran, alexandre.belloni, UNGLinuxDriver, ralf,
paul.burton, jhogan, netdev, linux-mips, thomas.petazzoni,
allan.nielsen
In-Reply-To: <20190701100327.6425-4-antoine.tenart@bootlin.com>
On Mon, Jul 01, 2019 at 12:03:22PM +0200, Antoine Tenart wrote:
> One additional interrupt needs to be described within the Ocelot device
> tree node: the PTP ready one. This patch documents the binding needed to
> do so.
Hi Antoine
Same questions/points as for the register bank :-)
Andrew
^ permalink raw reply
* [PATCH iproute2] man: tc-netem.8: fix URL for netem page
From: Andrea Claudi @ 2019-07-01 14:04 UTC (permalink / raw)
To: netdev; +Cc: stephen, dsahern
URL for netem page on sources section points to a no more existent
resource. Fix this using the correct URL.
Fixes: cd72dcf13c8a4 ("netem: add man-page")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
---
man/man8/tc-netem.8 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man8/tc-netem.8 b/man/man8/tc-netem.8
index 111109cf042f0..5a08a406a4a7b 100644
--- a/man/man8/tc-netem.8
+++ b/man/man8/tc-netem.8
@@ -219,7 +219,7 @@ April 2005
(http://devresources.linux-foundation.org/shemminger/netem/LCA2005_paper.pdf)
.IP " 2. " 4
-Netem page from Linux foundation, (http://www.linuxfoundation.org/en/Net:Netem)
+Netem page from Linux foundation, (https://wiki.linuxfoundation.org/networking/netem)
.IP " 3. " 4
Salsano S., Ludovici F., Ordine A., "Definition of a general and intuitive loss
--
2.20.1
^ permalink raw reply related
* Re: [PATCH iproute2] man: tc-netem.8: fix URL for netem page
From: Andrea Claudi @ 2019-07-01 14:10 UTC (permalink / raw)
To: netdev, Stephen Hemminger; +Cc: David Ahern
In-Reply-To: <39256a189709ec195fd97da736ee5b003a49f298.1561989640.git.aclaudi@redhat.com>
On Mon, Jul 1, 2019 at 4:05 PM Andrea Claudi <aclaudi@redhat.com> wrote:
>
> URL for netem page on sources section points to a no more existent
> resource. Fix this using the correct URL.
>
> Fixes: cd72dcf13c8a4 ("netem: add man-page")
> Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
> ---
> man/man8/tc-netem.8 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/man8/tc-netem.8 b/man/man8/tc-netem.8
> index 111109cf042f0..5a08a406a4a7b 100644
> --- a/man/man8/tc-netem.8
> +++ b/man/man8/tc-netem.8
> @@ -219,7 +219,7 @@ April 2005
> (http://devresources.linux-foundation.org/shemminger/netem/LCA2005_paper.pdf)
>
> .IP " 2. " 4
> -Netem page from Linux foundation, (http://www.linuxfoundation.org/en/Net:Netem)
> +Netem page from Linux foundation, (https://wiki.linuxfoundation.org/networking/netem)
>
> .IP " 3. " 4
> Salsano S., Ludovici F., Ordine A., "Definition of a general and intuitive loss
> --
> 2.20.1
>
Hi Stephen,
I noticed that the link to your LCA 2005 paper is wrong, too (it
actually redirects to the home page of the Linux Foundation Wiki). If
you provide me the correct URL, I will happily send a v2 of this patch
fixing that, too.
Regards,
Andrea
^ permalink raw reply
* [PATCH] net:gue.h:Fix shifting signed 32-bit value by 31 bits problem
From: Vandana BN @ 2019-07-01 14:16 UTC (permalink / raw)
To: David S . Miller , netdev, linux-kernel
Cc: skhan, gregkh, linux-kernel-mentees, Vandana BN
Fix GUE_PFLAG_REMCSUM to use "U" cast to avoid shifting signed
32-bit value by 31 bits problem.
Signed-off-by: Vandana BN <bnvandana@gmail.com>
---
include/net/gue.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/gue.h b/include/net/gue.h
index fdad41469b65..3a6595bfa641 100644
--- a/include/net/gue.h
+++ b/include/net/gue.h
@@ -60,7 +60,7 @@ struct guehdr {
/* Private flags in the private option extension */
-#define GUE_PFLAG_REMCSUM htonl(1 << 31)
+#define GUE_PFLAG_REMCSUM htonl(1U << 31)
#define GUE_PLEN_REMCSUM 4
#define GUE_PFLAGS_ALL (GUE_PFLAG_REMCSUM)
--
2.17.1
^ permalink raw reply related
* Re: [RFC iproute2] netns: add mounting state file for each netns
From: Nicolas Dichtel @ 2019-07-01 14:17 UTC (permalink / raw)
To: Matteo Croce; +Cc: netdev, Alexander Aring
In-Reply-To: <CAGnkfhz92SA7_kbARMzTqj3sTE3pgE=FEOXzFQxX6m=cemJUkg@mail.gmail.com>
Le 01/07/2019 à 15:50, Matteo Croce a écrit :
> On Mon, Jul 1, 2019 at 2:38 PM Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>>
>> Le 30/06/2019 à 21:29, Matteo Croce a écrit :
>>> When ip creates a netns, there is a small time interval between the
>>> placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc.
>>>
>>> Add a temporary file named .mounting-$netns which gets deleted after the
>>> bind mount, so watching for delete event matching the .mounting-* name
>>> will notify watchers only after the bind mount has been done.
>> Probably a naive question, but why creating those '.mounting-$netns' files in
>> the directory where netns are stored? Why not another directory, something like
>> /var/run/netns-monitor/?
>>
>>
>> Regards,
>> Nicolas
>
> Yes, would work too. But ideally I'd wait for the mount inotify notifications.
>
Yes, I agree.
^ permalink raw reply
* Re: iwl_mvm_add_new_dqa_stream_wk BUG in lib/list_debug.c:56
From: Skyler Hawthorne @ 2019-07-01 14:34 UTC (permalink / raw)
To: Marc Haber, linux-kernel, linux-wireless, netdev
In-Reply-To: <20190625130317.GB31363@torres.zugschlus.de>
Hello, I'm also still experiencing this issue on 5.1.15. It's making it
very difficult to use my work laptop in my office, since it has many
access points and frequently has to reauthenticate. I hit this bug 1-3
times per day, and the only way to fix it is a hard shutdown. Has there
been any effort to identify and/or fix the cause?
--
Skyler
On Tue, 2019-06-25 at 15:03 +0200, Marc Haber wrote:
> On Sun, Jun 02, 2019 at 03:48:42PM +0200, Marc Haber wrote:
> > On Thu, May 30, 2019 at 10:12:57AM +0200, Marc Haber wrote:
> > > on my primary notebook, a Lenovo X260, with an Intel Wireless
> > > 8260
> > > (8086:24f3), running Debian unstable, I have started to see
> > > network
> > > hangs since upgrading to kernel 5.1. In this situation, I cannot
> > > restart Network-Manager (the call just hangs), I can log out of
> > > X, but
> > > the system does not cleanly shut down and I need to Magic SysRq
> > > myself
> > > out of the running system. This happens about once every two
> > > days.
> >
> > The issue is also present in 5.1.5 and 5.1.6.
>
> Almost a month later, 5.1.15 still crashes about twice a day on my
> Notebook. The error message seems pretty clear to me, how can I go on
> from there and may be identify a line number outside of a library?
>
> Greetings
> Marc
>
>
^ permalink raw reply
* Re: [PATCH v3] ss: introduce switch to print exact value of data rates
From: David Ahern @ 2019-07-01 14:51 UTC (permalink / raw)
To: Tomasz Torcz; +Cc: netdev
In-Reply-To: <20190701115242.25960-1-tomasz.torcz@nordea.com>
On 7/1/19 5:52 AM, Tomasz Torcz wrote:
> Introduce -X/--exact switch to disable human-friendly printing
> of data rates. Without the switch (default), data is presented as MBps/Kbps.
>
> Signed-off-by: Tomasz Torcz <tomasz.torcz@nordea.com>
> ---
> man/man8/ss.8 | 3 +++
> misc/ss.c | 12 ++++++++++--
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> Changes in v3:
> - updated ss man page with new option
>
ss now has Numeric option which can be used for this as well if we
broaden the meaning to be 'raw numbers over human readable'.
^ permalink raw reply
* Re: [PATCH 1/2] samples: pktgen: add some helper functions for port parsing
From: Jesper Dangaard Brouer @ 2019-07-01 14:51 UTC (permalink / raw)
To: Daniel T. Lee; +Cc: David S . Miller, netdev, brouer, Robert Olsson
In-Reply-To: <20190629133358.8251-1-danieltimlee@gmail.com>
On Sat, 29 Jun 2019 22:33:57 +0900
"Daniel T. Lee" <danieltimlee@gmail.com> wrote:
> This commit adds port parsing and port validate helper function to parse
> single or range of port(s) from a given string. (e.g. 1234, 443-444)
>
> Helpers will be used in prior to set target port(s) in samples/pktgen.
>
> Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
> ---
> samples/pktgen/functions.sh | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
Nice bash shellcode with use of array variables.
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
> diff --git a/samples/pktgen/functions.sh b/samples/pktgen/functions.sh
> index f8bb3cd0f4ce..4af4046d71be 100644
> --- a/samples/pktgen/functions.sh
> +++ b/samples/pktgen/functions.sh
> @@ -162,3 +162,37 @@ function get_node_cpus()
>
> echo $node_cpu_list
> }
> +
> +# Given a single or range of port(s), return minimum and maximum port number.
> +function parse_ports()
> +{
> + local port_str=$1
> + local port_list
> + local min_port
> + local max_port
> +
> + IFS="-" read -ra port_list <<< $port_str
> +
> + min_port=${port_list[0]}
> + max_port=${port_list[1]:-$min_port}
> +
> + echo $min_port $max_port
> +}
> +
> +# Given a minimum and maximum port, verify port number.
> +function validate_ports()
> +{
> + local min_port=$1
> + local max_port=$2
> +
> + # 0 < port < 65536
> + if [[ $min_port -gt 0 && $min_port -lt 65536 ]]; then
> + if [[ $max_port -gt 0 && $max_port -lt 65536 ]]; then
> + if [[ $min_port -le $max_port ]]; then
> + return 0
> + fi
> + fi
> + fi
> +
> + err 5 "Invalid port(s): $min_port-$max_port"
> +}
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
^ permalink raw reply
* Re: [PATCH v2 1/3] vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock
From: Stefan Hajnoczi @ 2019-07-01 14:54 UTC (permalink / raw)
To: Stefano Garzarella
Cc: netdev, kvm, Michael S. Tsirkin, linux-kernel, virtualization,
Stefan Hajnoczi, David S. Miller
In-Reply-To: <20190628123659.139576-2-sgarzare@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]
On Fri, Jun 28, 2019 at 02:36:57PM +0200, Stefano Garzarella wrote:
> Some callbacks used by the upper layers can run while we are in the
> .remove(). A potential use-after-free can happen, because we free
> the_virtio_vsock without knowing if the callbacks are over or not.
>
> To solve this issue we move the assignment of the_virtio_vsock at the
> end of .probe(), when we finished all the initialization, and at the
> beginning of .remove(), before to release resources.
> For the same reason, we do the same also for the vdev->priv.
>
> We use RCU to be sure that all callbacks that use the_virtio_vsock
> ended before freeing it. This is not required for callbacks that
> use vdev->priv, because after the vdev->config->del_vqs() we are sure
> that they are ended and will no longer be invoked.
->del_vqs() is only called at the very end, did you forget to move it
earlier?
In particular, the virtqueue handler callbacks schedule a workqueue.
The work functions use container_of() to get vsock. We need to be sure
that the work item isn't freed along with vsock while the work item is
still pending.
How do we know that the virtqueue handler is never called in such a way
that it sees vsock != NULL (there is no explicit memory barrier on the
read side) and then schedules a work item after flush_work() has run?
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH 00/11] XDP unaligned chunk placement support
From: Laatz, Kevin @ 2019-07-01 14:58 UTC (permalink / raw)
To: Jonathan Lemon
Cc: Jakub Kicinski, netdev, ast, daniel, bjorn.topel, magnus.karlsson,
bpf, intel-wired-lan, bruce.richardson, ciara.loftus
In-Reply-To: <BAE24CBF-416D-4665-B2C9-CE1F5EAE28FF@gmail.com>
On 28/06/2019 21:29, Jonathan Lemon wrote:
> On 28 Jun 2019, at 9:19, Laatz, Kevin wrote:
>> On 27/06/2019 22:25, Jakub Kicinski wrote:
>>> I think that's very limiting. What is the challenge in providing
>>> aligned addresses, exactly?
>> The challenges are two-fold:
>> 1) it prevents using arbitrary buffer sizes, which will be an issue
>> supporting e.g. jumbo frames in future.
>> 2) higher level user-space frameworks which may want to use AF_XDP,
>> such as DPDK, do not currently support having buffers with 'fixed'
>> alignment.
>> The reason that DPDK uses arbitrary placement is that:
>> - it would stop things working on certain NICs which need the
>> actual writable space specified in units of 1k - therefore we need 2k
>> + metadata space.
>> - we place padding between buffers to avoid constantly
>> hitting the same memory channels when accessing memory.
>> - it allows the application to choose the actual buffer size
>> it wants to use.
>> We make use of the above to allow us to speed up processing
>> significantly and also reduce the packet buffer memory size.
>>
>> Not having arbitrary buffer alignment also means an AF_XDP driver
>> for DPDK cannot be a drop-in replacement for existing drivers in
>> those frameworks. Even with a new capability to allow an arbitrary
>> buffer alignment, existing apps will need to be modified to use that
>> new capability.
>
> Since all buffers in the umem are the same chunk size, the original
> buffer
> address can be recalculated with some multiply/shift math. However,
> this is
> more expensive than just a mask operation.
Yes, we can do this.
Another option we have is to add a socket option for querying the
metadata length from the driver (assuming it doesn't vary per packet).
We can use that information to get back the original address using
subtraction.
Alternatively, we can change the Rx descriptor format to include the
metadata length. We could do this in a couple of ways, for example,
rather than returning the address at the start of the packet, instead
return the buffer address that was passed in, and adding another 16-bit
field to specify the start of the packet offset with that buffer. Id
using 16-bits of descriptor space is not desirable, an alternative could
be to limit umem sizes to e.g. 2^48 bits (256 terabytes should be
enough, right :-) ) and use the remaining 16 bits of the address as a
packet offset. Other variations on these approaches are obviously
possible too.
^ permalink raw reply
* Re: [PATCH] hinic: reduce rss_init stack usage
From: Arnd Bergmann @ 2019-07-01 15:03 UTC (permalink / raw)
To: David Miller
Cc: Aviad Krawczyk, xuechaojing, Jesse Brandeburg, zhaochen6,
Eric Dumazet, Dann Frazier, Networking, Linux Kernel Mailing List
In-Reply-To: <20190628.093215.173840298920978641.davem@davemloft.net>
On Fri, Jun 28, 2019 at 6:32 PM David Miller <davem@davemloft.net> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Fri, 28 Jun 2019 12:31:44 +0200
>
> > On 32-bit architectures, putting an array of 256 u32 values on the
> > stack uses more space than the warning limit:
> >
> > drivers/net/ethernet/huawei/hinic/hinic_main.c: In function 'hinic_rss_init':
> > drivers/net/ethernet/huawei/hinic/hinic_main.c:286:1: error: the frame size of 1068 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
> >
> > I considered changing the code to use u8 values here, since that's
> > all the hardware supports, but dynamically allocating the array is
> > a more isolated fix here.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Applied to net-next.
Thanks
> Arnd, please make it clear what tree you are targetting in the
> future.
Sorry about missing this again. I usually remember but sometimes
one slips through when I send a lot of patches for different subsystems
at once.
Arnd
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox