diff options
| author | Adrian Moreno <[email protected]> | 2023-08-01 21:22:23 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2023-08-03 13:05:41 +0000 |
| commit | 9f1179fbbd84d5269f57659152e24bd4b03fd095 (patch) | |
| tree | 7dd4b368ab4ff5c74440475d672cfd611792f24f /tools/testing/selftests/net/openvswitch/openvswitch.sh | |
| parent | selftests: openvswitch: add an initial flow programming case (diff) | |
| download | kernel-9f1179fbbd84d5269f57659152e24bd4b03fd095.tar.gz kernel-9f1179fbbd84d5269f57659152e24bd4b03fd095.zip | |
selftests: openvswitch: support key masks
The default value for the mask actually depends on the value (e.g: if
the value is non-null, the default is full-mask), so change the convert
functions to accept the full, possibly masked string and let them figure
out how to parse the different values.
Also, implement size-aware int parsing.
With this patch we can now express flows such as the following:
"eth(src=0a:ca:fe:ca:fe:0a/ff:ff:00:00:ff:00)"
"eth(src=0a:ca:fe:ca:fe:0a)" -> mask = ff:ff:ff:ff:ff:ff
"ipv4(src=192.168.1.1)" -> mask = 255.255.255.255
"ipv4(src=192.168.1.1/24)"
"ipv4(src=192.168.1.1/255.255.255.0)"
"tcp(src=8080)" -> mask = 0xffff
"tcp(src=8080/0xf0f0)"
Signed-off-by: Adrian Moreno <[email protected]>
Acked-by: Aaron Conole <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/openvswitch/openvswitch.sh')
0 files changed, 0 insertions, 0 deletions
