1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 /* Copyright (C) 2018 Netronome Systems, Inc */ 3 /* Copyright (C) 2021 Corigine, Inc */ 4 5 #include <net/xfrm.h> 6 7 #include "../nfp_net.h" 8 #include "nfd3.h" 9 10 void nfp_nfd3_ipsec_tx(struct nfp_nfd3_tx_desc *txd, struct sk_buff *skb) 11 { 12 struct xfrm_state *x = xfrm_input_state(skb); 13 14 if (x->xso.dev && (x->xso.dev->features & NETIF_F_HW_ESP_TX_CSUM)) { 15 txd->flags |= NFD3_DESC_TX_CSUM | NFD3_DESC_TX_IP4_CSUM | 16 NFD3_DESC_TX_TCP_CSUM | NFD3_DESC_TX_UDP_CSUM; 17 } 18 } 19