Add a 'start N' option when specifying the Rx flow hash indirection table.
Subsystems (2)
PATCH 1/1 Add a 'start N' option when specifying the Rx flow hash indirection table.
When using more than one RSS table, specifying a starting queue for flow distibution makes it easier to specify the set of queues attached to the table. An example:
ethtool -X eth0 context 0 equal 14 # queues 0 .. 13
ethtool -X eth0 context 1 start 14 equal 42 # queues 14 .. 56
ethtool -N eth0 flow-type udp6 dst-port 4242 context 1
Here, context 0 might be handling normal kernel traffic, while context 1 handles AF_XDP traffic.
--- ethtool.8.in | 6 ++++++ ethtool.c | 46 +++++++++++++++++++++++++++++++++------------- test-cmdline.c | 4 ++++ 3 files changed, 43 insertions(+), 13 deletions(-)
ethtool.8.in +6 -0
@@ -297,6 +297,8 @@ ethtool \- query or control network driver and hardware settings .B ethtool \-X|\-\-set\-rxfh\-indir|\-\-rxfh .I devname .RB [ hkey \ \*(MA:\...] +.RB [ start +.IR N ] .RB [\ equal .IR N \ | .BI weight\ W0
@@ -953,6 +955,10 @@ even if a nibble is zero. Sets RSS hash function of the specified network device. List of RSS hash functions which kernel supports is shown as a part of the --show-rxfh command output. .TP +.BI start\ N +For the \fBequal\fR and \fBweight\fR options, sets the starting receive queue +for spreading flows to \fIN\fR. +.TP .BI equal\ N Sets the receive flow hash indirection table to spread flows evenly between the first \fIN\fR receive queues.
ethtool.c +33 -13
104 lines not on this page · raw message
test-cmdline.c +4 -0
@@ -194,7 +194,11 @@ static struct test_case { { 1, "-X devname equal 0" }, { 1, "--set-rxfh-indir devname equal foo" }, { 1, "-X devname equal" }, + { 1, "-X devname start" }, + { 1, "-X devname start 3" }, + { 0, "-X devname start 4 equal 2" }, { 0, "--set-rxfh-indir devname weight 1 2 3 4" }, + { 0, "--set-rxfh-indir devname start 4 weight 1 2 3 4" }, { 0, "--rxfh devname hkey 48:15:6e:bb:d8:bd:6f:b1:a4:c6:7a:c4:76:1c:29:98:da:e1:ae:6c:2e:12:2f:c0:b9:be:61:3d:00:54:35:9e:09:05:c7:d7:93:72:4a:ee" }, { 0, "-X devname hkey 48:15:6e:bb:d8:bd:6f:b1:a4:c6:7a:c4:76:1c:29:98:da:e1:ae:6c:2e:12:2f:c0:b9:be:61:3d:00:54:35:9e:09:05:c7:d7:93:72:4a:ee" }, #if 0
Signature · 1 line
2.21.0.196.g041f5ea1cf
Quoted 11 lines · Jonathan Lemon
When using more than one RSS table, specifying a starting queue for flow distibution makes it easier to specify the set of queues attached to the table. An example:
ethtool -X eth0 context 0 equal 14 # queues 0 .. 13
ethtool -X eth0 context 1 start 14 equal 42 # queues 14 .. 56
ethtool -N eth0 flow-type udp6 dst-port 4242 context 1Here, context 0 might be handling normal kernel traffic, while context 1 handles
AF_XDPtraffic.Signed-off-by Jonathan Lemon <[email protected]>
Quoted 7 lines · Jonathan Lemon
When using more than one RSS table, specifying a starting queue for flow distibution makes it easier to specify the set of queues attached to the table. An example:
ethtool -X eth0 context 0 equal 14 # queues 0 .. 13
ethtool -X eth0 context 1 start 14 equal 42 # queues 14 .. 56
ethtool -N eth0 flow-type udp6 dst-port 4242 context 1
Quoted 5 lines
Here, context 0 might be handling normal kernel traffic, while context 1 handles
AF_XDPtraffic.Signed-off-by Jonathan Lemon <[email protected]>Acked-by Edward Cree <[email protected]>
Queued for next release...
Thanks!
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.