/* By default packets are dropped if no descriptors are available */
dev_info->default_rxconf.rx_drop_en = 1;
- dev_info->rx_offload_capa =
- DEV_RX_OFFLOAD_IPV4_CKSUM |
- DEV_RX_OFFLOAD_UDP_CKSUM |
- DEV_RX_OFFLOAD_TCP_CKSUM;
-
- if ((encp->enc_tunnel_encapsulations_supported != 0) &&
- (sa->dp_rx->features & SFC_DP_RX_FEAT_TUNNELS))
- dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM;
+ dev_info->rx_offload_capa = sfc_rx_get_dev_offload_caps(sa);
dev_info->tx_offload_capa =
DEV_TX_OFFLOAD_IPV4_CKSUM |
sfc_ev_qstop(rxq->evq);
}
+uint64_t
+sfc_rx_get_dev_offload_caps(struct sfc_adapter *sa)
+{
+ const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
+ uint64_t caps = 0;
+
+ caps |= DEV_RX_OFFLOAD_IPV4_CKSUM;
+ caps |= DEV_RX_OFFLOAD_UDP_CKSUM;
+ caps |= DEV_RX_OFFLOAD_TCP_CKSUM;
+
+ if (encp->enc_tunnel_encapsulations_supported &&
+ (sa->dp_rx->features & SFC_DP_RX_FEAT_TUNNELS))
+ caps |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM;
+
+ return caps;
+}
+
static int
sfc_rx_qcheck_conf(struct sfc_adapter *sa, unsigned int rxq_max_fill_level,
const struct rte_eth_rxconf *rx_conf)
int sfc_rx_qstart(struct sfc_adapter *sa, unsigned int sw_index);
void sfc_rx_qstop(struct sfc_adapter *sa, unsigned int sw_index);
+uint64_t sfc_rx_get_dev_offload_caps(struct sfc_adapter *sa);
+
void sfc_rx_qflush_done(struct sfc_rxq *rxq);
void sfc_rx_qflush_failed(struct sfc_rxq *rxq);