]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: fix extracting IP addresses in TC-FLOWER rules
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Fri, 31 Jul 2020 20:53:40 +0000 (02:23 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Aug 2020 22:33:12 +0000 (15:33 -0700)
commit648ebec18ad5488cf8b2995f13c91e14456c5bd1
tree7bbc6cf014e6807bee126c1918c79306ae36f755
parent8d7b98943e4889a90cef7483331cb8be858d83fd
cxgb4: fix extracting IP addresses in TC-FLOWER rules

commit d792768bd5e3 ("cxgb4: add ethtool n-tuple filter insertion")
has removed checking control key for determining IP address types
for TC-FLOWER rules, which causes all the rules being inserted to
hardware to become IPv6 rule type always. So, add back the check
to select the correct IP address type to extract and hence fix the
correct rule type being inserted to hardware.

Also, ethtool_rx_flow_key doesn't have any control key and instead
directly sets the IPv4/IPv6 address keys. So, explicitly set the
IP address type for ethtool n-tuple filters to reuse the same code.

Fixes: d792768bd5e3 ("cxgb4: add ethtool n-tuple filter insertion")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c