]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
cxgb4: handle 4-tuple PEDIT to NAT mode translation
authorHerat Ramani <herat@chelsio.com>
Tue, 13 Oct 2020 09:31:29 +0000 (15:01 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:48:31 +0000 (14:48 +0100)
commitf730fb42f9d4bd861728d3466e9b64f4a7749f6a
tree1b59ebbe90683824f860d828c4098fc51e7d7e09
parent5f1a1e1801c4962b5c0bf8fbf0df52f775c37372
cxgb4: handle 4-tuple PEDIT to NAT mode translation

BugLink: https://bugs.launchpad.net/bugs/1902115
[ Upstream commit 2ef813b8f405db3f72202b6fcae40a628ab80a53 ]

The 4-tuple NAT offload via PEDIT always overwrites all the 4-tuple
fields even if they had not been explicitly enabled. If any fields in
the 4-tuple are not enabled, then the hardware overwrites the
disabled fields with zeros, instead of ignoring them.

So, add a parser that can translate the enabled 4-tuple PEDIT fields
to one of the NAT mode combinations supported by the hardware and
hence avoid overwriting disabled fields to 0. Any rule with
unsupported NAT mode combination is rejected.

Signed-off-by: Herat Ramani <herat@chelsio.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h