diff options
author | Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com> | 2023-08-24 13:28:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-27 07:56:54 +0200 |
commit | 66f728872636e1167aedc5a18be6760083911900 (patch) | |
tree | 55bac13b98dbdf2687d6c0a6e9271feca01ba8c3 /drivers/net/ethernet/sfc/mae.c | |
parent | sfc: add mac source and destination pedit action offload (diff) | |
download | linux-66f728872636e1167aedc5a18be6760083911900.tar.xz linux-66f728872636e1167aedc5a18be6760083911900.zip |
sfc: add decrement ttl by offloading set ipv4 ttl actions
Offload pedit set ipv4 ttl field, where the ttl field has already been
matched and the new value is one less, by translating it to a decrement.
Co-developed-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/mae.c')
-rw-r--r-- | drivers/net/ethernet/sfc/mae.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/mae.c b/drivers/net/ethernet/sfc/mae.c index a7ad7ab8c5f4..c3e2b4a21d10 100644 --- a/drivers/net/ethernet/sfc/mae.c +++ b/drivers/net/ethernet/sfc/mae.c @@ -1291,10 +1291,12 @@ int efx_mae_alloc_action_set(struct efx_nic *efx, struct efx_tc_action_set *act) size_t outlen; int rc; - MCDI_POPULATE_DWORD_3(inbuf, MAE_ACTION_SET_ALLOC_IN_FLAGS, + MCDI_POPULATE_DWORD_4(inbuf, MAE_ACTION_SET_ALLOC_IN_FLAGS, MAE_ACTION_SET_ALLOC_IN_VLAN_PUSH, act->vlan_push, MAE_ACTION_SET_ALLOC_IN_VLAN_POP, act->vlan_pop, - MAE_ACTION_SET_ALLOC_IN_DECAP, act->decap); + MAE_ACTION_SET_ALLOC_IN_DECAP, act->decap, + MAE_ACTION_SET_ALLOC_IN_DO_DECR_IP_TTL, + act->do_ttl_dec); if (act->src_mac) MCDI_SET_DWORD(inbuf, MAE_ACTION_SET_ALLOC_IN_SRC_MAC_ID, |