From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [PATCH v4 2/4] ethdev: add Tx offload outer UDP checksum definition Date: Tue, 9 Oct 2018 13:06:14 +0300 Message-ID: <0486d0f7-4f9f-08e4-e6ca-b314e2e80e1e@solarflare.com> References: <20181003181657.32236-1-jerin.jacob@caviumnetworks.com> <20181008160953.32510-1-jerin.jacob@caviumnetworks.com> <20181008160953.32510-2-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: To: Jerin Jacob , Wenzhuo Lu , Jingjing Wu , "Bernard Iremonger" , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit , Olivier Matz Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id B10C57CCA for ; Tue, 9 Oct 2018 12:07:05 +0200 (CEST) In-Reply-To: <20181008160953.32510-2-jerin.jacob@caviumnetworks.com> Content-Language: en-GB List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/8/18 7:09 PM, Jerin Jacob wrote: > Introduced DEV_TX_OFFLOAD_OUTER_UDP_CKSUM offload flags and > PKT_TX_OUTER_UDP_CKSUM mbuf ol_flags to enable Tx outer UDP > checksum offload. > > To use hardware Tx outer UDP checksum offload, the user needs to, > > - enable following in mbuf: > a) fill outer_l2_len and outer_l3_len in mbuf > b) set the PKT_TX_OUTER_UDP_CKSUM flag > c) set the flag PKT_TX_OUTER_IPV4 or PKT_TX_OUTER_IPV6 > > - configure DEV_TX_OFFLOAD_OUTER_UDP_CKSUM offload flags in slow path > > Signed-off-by: Jerin Jacob One question below Reviewed-by: Andrew Rybchenko > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index a453ec008..61e6fca4d 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -200,6 +200,9 @@ extern "C" { > > /* add new TX flags here */ > > +/**< Outer UDP cksum of TX pkt. computed by NIC. */ Description for the block which includes PKT_TX_UDP_CKSUM has "the user need to"... IMHO, it would be very useful to have similar description here as well. > +#define PKT_TX_OUTER_UDP_CKSUM (1ULL << 41) > + > /** > * UDP Fragmentation Offload flag. This flag is used for enabling UDP > * fragmentation in SW or in HW. When use UFO, mbuf->tso_segsz is used > @@ -367,7 +370,8 @@ extern "C" { > PKT_TX_TUNNEL_MASK | \ > PKT_TX_MACSEC | \ > PKT_TX_SEC_OFFLOAD | \ > - PKT_TX_UDP_SEG) > + PKT_TX_UDP_SEG | \ > + PKT_TX_OUTER_UDP_CKSUM) > > /** > * Mbuf having an external buffer attached. shinfo in mbuf must be filled.