[PATCH v9 09/14] net/idpf: add support for Rx/Tx offloading

Xing, Beilei beilei.xing at intel.com
Mon Oct 24 15:26:33 CEST 2022


> > +
> > +/* Translate the rx descriptor status and error fields to pkt flags
> > +*/ static inline uint64_t idpf_rxd_to_pkt_flags(uint16_t
> > +status_error) {
> > +	uint64_t flags = 0;
> > +
> > +	if (unlikely(!(status_error &
> BIT(VIRTCHNL2_RX_FLEX_DESC_STATUS0_L3L4P_S))))
> > +		return flags;
> > +
> > +	if (likely((status_error & IDPF_RX_FLEX_DESC_STATUS0_XSUM_S) ==
> 0)) {
> > +		flags |= (RTE_MBUF_F_RX_IP_CKSUM_GOOD |
> 
> Strictly speaking description of the
> RTE_MBUF_F_RX_IP_CKSUM_GOOD says that IP checksum in the patcket is
> valid, but there is no checksum in IPv6 header.
> So, we can't say that it is valid for IPv6...

Hi Andrew, 
Almost all the comments are addressed in V11, please help to review. Thanks.
Here, since device just writes back 0 or 1 in descriptor, can’t distinguish Ipv4 or IPv6, we set RTE_MBUF_F_RX_IP_CKSUM_GOOD here. It follows ice or iavf implementation.
BTW, there's no common code in common/idpf currently, only base folder, there'll be some comment codes shared by idpf and a new PMD in next release.

> 
> > +			  RTE_MBUF_F_RX_L4_CKSUM_GOOD);
> > +		return flags;
> > +	}
> > +
> > +	if (unlikely(status_error &


More information about the dev mailing list