src/dpdk/drivers/net/mlx4/mlx4_ethdev.c
const uint32_t *
mlx4_dev_supported_ptypes_get(struct rte_eth_dev *dev)
{
	static const uint32_t ptypes[] = {
		/* refers to rxq_cq_to_pkt_type() */
		RTE_PTYPE_L2_ETHER,
		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
		RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
		RTE_PTYPE_L4_FRAG,
		RTE_PTYPE_L4_TCP,
		RTE_PTYPE_L4_UDP,
		RTE_PTYPE_UNKNOWN
	};
	static const uint32_t ptypes_l2tun[] = {
		/* refers to rxq_cq_to_pkt_type() */
		RTE_PTYPE_L2_ETHER,
		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
		RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
		RTE_PTYPE_L4_FRAG,
		RTE_PTYPE_L4_TCP,
		RTE_PTYPE_L4_UDP,
		RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN,
		RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN,
		RTE_PTYPE_UNKNOWN
	};
	struct mlx4_priv *priv = dev->data->dev_private;

	if (dev->rx_pkt_burst == mlx4_rx_burst) {
		if (priv->hw_csum_l2tun)
			return ptypes_l2tun;
		else
			return ptypes;
	}
	return NULL;
}
/**
 * DPDK callback to retrieve the received packet types that are recognized
 * by the device.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 *
 * @return
 *   Pointer to an array of recognized packet types if in Rx burst mode,
 *   NULL otherwise.
 */
DPDK callback to retrieve the received packet types that are recognized
by the device.

@param dev
Pointer to Ethernet device structure.

@return
Pointer to an array of recognized packet types if in Rx burst mode,
NULL otherwise.
DPDK callback to retrieve the received packet types that are recognized by the device . @param dev Pointer to Ethernet device structure . @return Pointer to an array of recognized packet types if in Rx burst mode NULL otherwise .
const uint32_t *
mlx4_dev_supported_ptypes_get(struct rte_eth_dev *dev)
{
	static const uint32_t ptypes[] = {
		RTE_PTYPE_L2_ETHER,
		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
		RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
		RTE_PTYPE_L4_FRAG,
		RTE_PTYPE_L4_TCP,
		RTE_PTYPE_L4_UDP,
		RTE_PTYPE_UNKNOWN
	};
	static const uint32_t ptypes_l2tun[] = {
		RTE_PTYPE_L2_ETHER,
		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
		RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
		RTE_PTYPE_L4_FRAG,
		RTE_PTYPE_L4_TCP,
		RTE_PTYPE_L4_UDP,
		RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN,
		RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN,
		RTE_PTYPE_UNKNOWN
	};
	struct mlx4_priv *priv = dev->data->dev_private;
	if (dev->rx_pkt_burst == mlx4_rx_burst) {
		if (priv->hw_csum_l2tun)
			return ptypes_l2tun;
		else
			return ptypes;
	}
	return NULL;
}
const uint32_t * mlx4_dev_supported_ptypes_get ( struct rte_eth_dev * dev ) { static const uint32_t ptypes [ ] = { RTE_PTYPE_L2_ETHER , RTE_PTYPE_L3_IPV4_EXT_UNKNOWN , RTE_PTYPE_L3_IPV6_EXT_UNKNOWN , RTE_PTYPE_L4_FRAG , RTE_PTYPE_L4_TCP , RTE_PTYPE_L4_UDP , RTE_PTYPE_UNKNOWN } ; static const uint32_t ptypes_l2tun [ ] = { RTE_PTYPE_L2_ETHER , RTE_PTYPE_L3_IPV4_EXT_UNKNOWN , RTE_PTYPE_L3_IPV6_EXT_UNKNOWN , RTE_PTYPE_L4_FRAG , RTE_PTYPE_L4_TCP , RTE_PTYPE_L4_UDP , RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN , RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN , RTE_PTYPE_UNKNOWN } ; struct mlx4_priv * priv = dev -> data -> dev_private ; if ( dev -> rx_pkt_burst == mlx4_rx_burst ) { if ( priv -> hw_csum_l2tun ) return ptypes_l2tun ; else return ptypes ; } return NULL ; }
DPDK callback to retrieve the received packet types that are recognized
 by the device.
DPDK callback to retrieve the received packet types that are recognized by the device .
/* refers to rxq_cq_to_pkt_type() */ /* refers to rxq_cq_to_pkt_type() */