From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id A69A2BC0068; Tue, 9 Oct 2018 10:07:03 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 9 Oct 2018 11:06:56 +0100 To: Jerin Jacob , Wenzhuo Lu , Jingjing Wu , "Bernard Iremonger" , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit , Olivier Matz CC: References: <20181003181657.32236-1-jerin.jacob@caviumnetworks.com> <20181008160953.32510-1-jerin.jacob@caviumnetworks.com> <20181008160953.32510-2-jerin.jacob@caviumnetworks.com> From: Andrew Rybchenko Message-ID: <0486d0f7-4f9f-08e4-e6ca-b314e2e80e1e@solarflare.com> Date: Tue, 9 Oct 2018 13:06:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181008160953.32510-2-jerin.jacob@caviumnetworks.com> Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24144.003 X-TM-AS-Result: No-12.837200-8.000000-10 X-TMASE-MatchedRID: +f/wAVSGjugOwH4pD14DsPHkpkyUphL9NU8z+tFJHR0OkJQR4QWbsBUZ IEQ+jNZKGPtCd+WAW3Hgw3pO7BRJ15e8p4eY614fogGd8wIUGIITbU1KYGoQpyJ226y83iQRaUX s6FguVy1fcTZ8crFLksE82ROrxh9cUQBcvRRvU72aq3sWuAmxECseSAhqf1rRJQt1P69Ir/N5YE MWnV9CN9b43CisaVOcDNcXzoy4vM825XOhnouJ5SI9MxSOQ6CSXgqwd9ijktCjC1E/zCEIrwrxO vLvFPZPEeHflL4ZdKr9Vaa04yzrEbCq5jSQSB1nnTqdU4w65WkcDDLReGt4PfmUDxpFogQXo8WM kQWv6iUD0yuKrQIMCAGLeSok4rrZec3QM3secWag6LSz3JTUtmtKUn6T36/0KdcnsW6QbG0uYkL vmOfzyhX6rV1HR1f0aCcYxIcBccpyt0JxWMjcPK12vTMrXKC+2BY8SiOZ3gZ+3BndfXUhXQ== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--12.837200-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24144.003 X-MDID: 1539079624-wSxITbZYz0vD Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v4 2/4] ethdev: add Tx offload outer UDP checksum definition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 10:07:06 -0000 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.