DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: John Daley <johndale@cisco.com>
Cc: dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>
Subject: Re: [dpdk-dev] [PATCH] net/enic: set L4 checksum flags for IPv6 packets
Date: Wed, 24 Jan 2018 17:18:37 +0000	[thread overview]
Message-ID: <c277842e-2be3-601a-7171-6afea33a60f6@intel.com> (raw)
In-Reply-To: <20180123010529.17748-1-johndale@cisco.com>

On 1/23/2018 1:05 AM, John Daley wrote:
> From: Hyong Youb Kim <hyonkim@cisco.com>
> 
> enic_cq_rx_to_pkt_flags() currently sets checksum good/bad flags only
> for IPv4.  The hardware actually validates the TCP/UDP checksum of
> IPv6 packets too. Set PKT_RX_L4_CKSUM_{GOOD,BAD} accordingly.
> 
> Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
> Reviewed-by: John Daley <johndale@cisco.com>
> ---
>  drivers/net/enic/enic_rxtx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
> index 98902caa0..8157697a0 100644
> --- a/drivers/net/enic/enic_rxtx.c
> +++ b/drivers/net/enic/enic_rxtx.c
> @@ -185,14 +185,14 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
>  	}
>  
>  	/* checksum flags */
> -	if (mbuf->packet_type & RTE_PTYPE_L3_IPV4) {
> +	if (mbuf->packet_type & (RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L3_IPV6)) {
>  		if (!enic_cq_rx_desc_csum_not_calc(cqrd)) {
>  			uint32_t l4_flags;
>  			l4_flags = mbuf->packet_type & RTE_PTYPE_L4_MASK;
>  
>  			if (enic_cq_rx_desc_ipv4_csum_ok(cqrd))
>  				pkt_flags |= PKT_RX_IP_CKSUM_GOOD;
> -			else
> +			else if (mbuf->packet_type & RTE_PTYPE_L3_IPV4)

This looks like conflicting with commit log.
Is pkt_flags intentionally not set for this case?
If so can you update commit log to say only PKT_RX_IP_CKSUM_GOOD set for ipv6?

>  				pkt_flags |= PKT_RX_IP_CKSUM_BAD;
>  
>  			if (l4_flags == RTE_PTYPE_L4_UDP ||
> 

  parent reply	other threads:[~2018-01-24 17:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23  1:05 John Daley
2018-01-23  1:05 ` [dpdk-dev] [PATCH] net/enic: fix segfault due to static max number of queues John Daley
2018-01-24 17:19   ` Ferruh Yigit
2018-01-23  1:05 ` [dpdk-dev] [PATCH] net/enic: add a Tx prepare handler John Daley
2018-01-24 17:20   ` Ferruh Yigit
2018-01-24 17:18 ` Ferruh Yigit [this message]
2018-01-24 17:30   ` [dpdk-dev] [PATCH] net/enic: set L4 checksum flags for IPv6 packets Hyong Youb Kim
2018-01-24 17:45     ` Ferruh Yigit
2018-01-24 17:48       ` Hyong Youb Kim
2018-01-24 17:48 ` Ferruh Yigit

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=c277842e-2be3-601a-7171-6afea33a60f6@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=hyonkim@cisco.com \
    --cc=johndale@cisco.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).