• Jacob Keller's avatar
    i40e: fix reported mask for ntuple filters · 40339af3
    Jacob Keller authored
    In commit 36777d9f ("i40e: check current configured input set when
    adding ntuple filters") some code was added to report the input set
    mask for a given filter when reporting it to the user.
    
    This code is necessary so that the reported filter correctly displays
    that it is or is not masking certain fields.
    
    Unfortunately the code was incorrect. Development error accidentally
    swapped the mask values for the IPv4 addresses with the L4 port numbers.
    The port numbers are only 16bits wide while IPv4 addresses are 32 bits.
    Unfortunately we assigned only 16 bits to the IPv4 address masks.
    Additionally we assigned 32bit value 0xFFFFFFF to the TCP port numbers.
    This second part does not matter as the value would be truncated to
    16bits regardless, but it is unnecessary.
    
    Fix the reported masks to properly report that the entire field is
    masked.
    
    Fixes: 36777d9f ("i40e: check current configured input set when adding ntuple filters")
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    40339af3
i40e_ethtool.c 143 KB