MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sfc_tx_get_offload_mask

Function sfc_tx_get_offload_mask

dpdk/drivers/net/sfc/sfc_tx.c:50–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static uint64_t
51sfc_tx_get_offload_mask(struct sfc_adapter *sa)
52{
53 const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
54 uint64_t no_caps = 0;
55
56 if (!encp->enc_hw_tx_insert_vlan_enabled)
57 no_caps |= RTE_ETH_TX_OFFLOAD_VLAN_INSERT;
58
59 if (!encp->enc_tunnel_encapsulations_supported)
60 no_caps |= RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM;
61
62 if (!sa->tso)
63 no_caps |= RTE_ETH_TX_OFFLOAD_TCP_TSO;
64
65 if (!sa->tso_encap ||
66 (encp->enc_tunnel_encapsulations_supported &
67 (1u << EFX_TUNNEL_PROTOCOL_VXLAN)) == 0)
68 no_caps |= RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO;
69
70 if (!sa->tso_encap ||
71 (encp->enc_tunnel_encapsulations_supported &
72 (1u << EFX_TUNNEL_PROTOCOL_GENEVE)) == 0)
73 no_caps |= RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO;
74
75 return ~no_caps;
76}
77
78uint64_t
79sfc_tx_get_dev_offload_caps(struct sfc_adapter *sa)

Callers 2

Calls 1

efx_nic_cfg_getFunction · 0.85

Tested by

no test coverage detected