| 48 | } |
| 49 | |
| 50 | static uint64_t |
| 51 | sfc_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 | |
| 78 | uint64_t |
| 79 | sfc_tx_get_dev_offload_caps(struct sfc_adapter *sa) |
no test coverage detected