rxclass: Make output for RSS context action explicit

Currently `ethtool -n` prints out misleading output if the action for an
ntuple rule is to redirect to an RSS context. For example:

    # ethtool -X eth0 hfunc toeplitz context new start 24 equal 8
    New RSS context is 1

    # ethtool -N eth0 flow-type ip6 dst-ip $IP6 context 1
    Added rule with ID 0

    # ethtool -n eth0 rule 0
    Filter: 0
            Rule Type: Raw IPv6
            Src IP addr: :: mask: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
            Dest IP addr: <redacted> mask: ::
            Traffic Class: 0x0 mask: 0xff
            Protocol: 0 mask: 0xff
            L4 bytes: 0x0 mask: 0xffffffff
            RSS Context ID: 1
            Action: Direct to queue 0

The above output suggests that the HW will direct to queue 0 where in
reality queue 0 is just the base offset from which the redirection table
lookup in the RSS context is added to.

Fix by making output more clear. Also suppress base offset queue for the
common case of 0. Example of new output:

    # ./ethtool -n eth0 rule 0
    Filter: 0
            Rule Type: Raw IPv6
            Src IP addr: :: mask: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
            Dest IP addr: <redacted> mask: ::
            Traffic Class: 0x0 mask: 0xff
            Protocol: 0 mask: 0xff
            L4 bytes: 0x0 mask: 0xffffffff
            Action: Direct to RSS Context 1

Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Tested-by: Joe Damato <jdamato@fastly.com>
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
1 file changed