src/dpdk/drivers/net/mlx4/mlx4_rxtx.c
static inline uint32_t
mlx4_cqe_flags(volatile struct mlx4_cqe *cqe, int csum, int csum_l2tun)
{
	uint32_t flags = 0;

	/*
	 * The relevant bits are in different locations on their
	 * CQE fields therefore we can join them in one 32bit
	 * variable.
	 */
	if (csum)
		flags = (rte_be_to_cpu_32(cqe->status) &
			 MLX4_CQE_STATUS_IPV4_CSUM_OK);
	if (csum_l2tun)
		flags |= (rte_be_to_cpu_32(cqe->vlan_my_qpn) &
			  (MLX4_CQE_L2_TUNNEL |
			   MLX4_CQE_L2_TUNNEL_IPOK |
			   MLX4_CQE_L2_TUNNEL_L4_CSUM |
			   MLX4_CQE_L2_TUNNEL_IPV4));
	return flags;
}
/**
 * Extract checksum information from CQE flags.
 *
 * @param cqe
 *   Pointer to CQE structure.
 * @param csum
 *   Whether Rx checksums are enabled.
 * @param csum_l2tun
 *   Whether Rx L2 tunnel checksums are enabled.
 *
 * @return
 *   CQE checksum information.
 */
Extract checksum information from CQE flags.
@param cqe
Pointer to CQE structure.
@param csum
Whether Rx checksums are enabled.
@param csum_l2tun
Whether Rx L2 tunnel checksums are enabled.

@return
CQE checksum information.
Extract checksum information from CQE flags . @param cqe Pointer to CQE structure . @param csum Whether Rx checksums are enabled . @param csum_l2tun Whether Rx L2 tunnel checksums are enabled . @return CQE checksum information .
static inline uint32_t
mlx4_cqe_flags(volatile struct mlx4_cqe *cqe, int csum, int csum_l2tun)
{
	uint32_t flags = 0;
	if (csum)
		flags = (rte_be_to_cpu_32(cqe->status) &
			 MLX4_CQE_STATUS_IPV4_CSUM_OK);
	if (csum_l2tun)
		flags |= (rte_be_to_cpu_32(cqe->vlan_my_qpn) &
			  (MLX4_CQE_L2_TUNNEL |
			   MLX4_CQE_L2_TUNNEL_IPOK |
			   MLX4_CQE_L2_TUNNEL_L4_CSUM |
			   MLX4_CQE_L2_TUNNEL_IPV4));
	return flags;
}
static inline uint32_t mlx4_cqe_flags ( volatile struct mlx4_cqe * cqe , int csum , int csum_l2tun ) { uint32_t flags = 0 ; if ( csum ) flags = ( rte_be_to_cpu_32 ( cqe -> status ) & MLX4_CQE_STATUS_IPV4_CSUM_OK ) ; if ( csum_l2tun ) flags |= ( rte_be_to_cpu_32 ( cqe -> vlan_my_qpn ) & ( MLX4_CQE_L2_TUNNEL | MLX4_CQE_L2_TUNNEL_IPOK | MLX4_CQE_L2_TUNNEL_L4_CSUM | MLX4_CQE_L2_TUNNEL_IPV4 ) ) ; return flags ; }
Extract checksum information from CQE flags.
Extract checksum information from CQE flags .
/*
	 * The relevant bits are in different locations on their
	 * CQE fields therefore we can join them in one 32bit
	 * variable.
	 */