DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wang, Xiao W" <xiao.w.wang@intel.com>
To: "Chen, Jing D" <jing.d.chen@intel.com>,
	"olivier.matz@6wind.com" <olivier.matz@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/5] net/fm10k: implement new Rx checksum flag
Date: Wed, 31 Aug 2016 08:59:40 +0000	[thread overview]
Message-ID: <B7F2E978279D1D49A3034B7786DACF406C181921@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <4341B239C0EFF9468EE453F9E9F4604D3A2D5F05@SHSMSX104.ccr.corp.intel.com>

Hi Mark,

> -----Original Message-----
> From: Chen, Jing D
> Sent: Monday, August 29, 2016 5:33 PM
> To: Wang, Xiao W <xiao.w.wang@intel.com>; olivier.matz@6wind.com
> Cc: dev@dpdk.org
> Subject: RE: [PATCH 2/5] net/fm10k: implement new Rx checksum flag
> 
> Hi,
> 
> >  uint16_t
> > diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c
> > b/drivers/net/fm10k/fm10k_rxtx_vec.c
> > index 9ea747e..8c08b44 100644
> > --- a/drivers/net/fm10k/fm10k_rxtx_vec.c
> > +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
> > @@ -95,8 +95,10 @@ fm10k_desc_to_olflags_v(__m128i descs[4], struct
> rte_mbuf
> > **rx_pkts)
> >  	const __m128i l3l4cksum_flag = _mm_set_epi8(0, 0, 0, 0,
> >  			0, 0, 0, 0,
> >  			0, 0, 0, 0,
> > -			PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD,
> > -			PKT_RX_IP_CKSUM_BAD, PKT_RX_L4_CKSUM_BAD, 0);
> > +			(PKT_RX_IP_CKSUM_BAD |
> PKT_RX_L4_CKSUM_BAD) >> 1,
> > +			(PKT_RX_IP_CKSUM_BAD |
> PKT_RX_L4_CKSUM_GOOD) >>
> > 1,
> > +			(PKT_RX_IP_CKSUM_GOOD |
> PKT_RX_L4_CKSUM_BAD) >>
> > 1,
> > +			(PKT_RX_IP_CKSUM_GOOD |
> > PKT_RX_L4_CKSUM_GOOD) >> 1);
> 
> Can we define a macro, like "#define RTE_CKSUM_SHIFT 1" to avoid numeric?

Yes, I'll add a macro for this, but since this shift operation isn't commonly used
by other pmds (igb and i40e don't support cksum offload in vector Rx, ixgbe cannot
do this shift due to VLAN offload), I will make it a local macro definition.

> 
> >
> >  	const __m128i rxe_flag = _mm_set_epi8(0, 0, 0, 0,
> >  			0, 0, 0, 0,
> > @@ -139,6 +141,7 @@ fm10k_desc_to_olflags_v(__m128i descs[4], struct
> > rte_mbuf **rx_pkts)
> >  	/* Process L4/L3 checksum error flags */
> >  	cksumflag = _mm_srli_epi16(cksumflag, L3L4EFLAG_SHIFT);
> >  	cksumflag = _mm_shuffle_epi8(l3l4cksum_flag, cksumflag);
> > +	cksumflag = _mm_slli_epi16(cksumflag, 1);
> >  	vtag1 = _mm_or_si128(cksumflag, vtag1);
> >
> >  	vol.dword = _mm_cvtsi128_si64(vtag1);
> > --
> > 1.9.3
> 
> Besides that, just realize we should remove "hw_ip_checksum" check in func
> fm10k_rx_vec_condition_check() since we already support it.
> Can you help to make the change?

Sure, will remove it in V2.

Thanks for the comments,
Xiao

  reply	other threads:[~2016-08-31  8:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 17:48 [dpdk-dev] [PATCH 0/5] " Xiao Wang
2016-08-25 17:48 ` [dpdk-dev] [PATCH 1/5] net/fm10k: add back Rx checksum offload Xiao Wang
2016-08-26  7:27   ` Olivier Matz
2016-08-31  9:02     ` Wang, Xiao W
2016-08-25 17:48 ` [dpdk-dev] [PATCH 2/5] net/fm10k: implement new Rx checksum flag Xiao Wang
2016-08-29  9:32   ` Chen, Jing D
2016-08-31  8:59     ` Wang, Xiao W [this message]
2016-08-25 17:48 ` [dpdk-dev] [PATCH 3/5] net/e1000: " Xiao Wang
2016-08-25 17:48 ` [dpdk-dev] [PATCH 4/5] net/ixgbe: " Xiao Wang
2016-08-26  7:30   ` Olivier Matz
2016-08-31  9:07     ` Wang, Xiao W
2016-08-25 17:48 ` [dpdk-dev] [PATCH 5/5] net/i40e: " Xiao Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B7F2E978279D1D49A3034B7786DACF406C181921@SHSMSX101.ccr.corp.intel.com \
    --to=xiao.w.wang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jing.d.chen@intel.com \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).