From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id AC9691B3AB for ; Mon, 1 Oct 2018 15:45:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Oct 2018 06:45:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,327,1534834800"; d="scan'208";a="95443346" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.49]) ([10.237.221.49]) by orsmga001.jf.intel.com with ESMTP; 01 Oct 2018 06:45:40 -0700 To: Jerin Jacob , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Thomas Monjalon , Andrew Rybchenko , Olivier Matz Cc: dev@dpdk.org References: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> <20180913134707.23698-4-jerin.jacob@caviumnetworks.com> From: Ferruh Yigit Openpgp: preference=signencrypt Message-ID: <13368ba5-599c-792a-23b5-9b8832083c18@intel.com> Date: Mon, 1 Oct 2018 14:45:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180913134707.23698-4-jerin.jacob@caviumnetworks.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 4/4] ethdev: add Tx offload outer L4 checksum definitions 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: Mon, 01 Oct 2018 13:45:44 -0000 On 9/13/2018 2:47 PM, Jerin Jacob wrote: > Introduced DEV_TX_OFFLOAD_OUTER_UDP_CKSUM, DEV_TX_OFFLOAD_OUTER_TCP_CKSUM > and DEV_TX_OFFLOAD_OUTER_SCTP_CKSUM offload flags and > > PKT_TX_OUTER_L4_NO_CKSUM, PKT_TX_OUTER_TCP_CKSUM, PKT_TX_OUTER_SCTP_CKSUM > and PKT_TX_OUTER_UDP_CKSUM mbuf ol_flags to enable Tx outer L4 checksum > offload. > > To use hardware Tx outer L4 checksum offload, the user needs to. > # enable following in mbuff: > - fill outer_l2_len and outer_l3_len in mbuf > - set the flags PKT_TX_OUTER_TCP_CKSUM, PKT_TX_OUTER_SCTP_CKSUM or > PKT_TX_OUTER_UDP_CKSUM > - set the flag PKT_TX_OUTER_IPV4 or PKT_TX_OUTER_IPV6 > > # configure DEV_TX_OFFLOAD_OUTER_* offload flags in slow path. > > Signed-off-by: Jerin Jacob > --- > app/test-pmd/config.c | 27 +++++++++++++++++++++++++++ > doc/guides/nics/features.rst | 6 ++++++ > lib/librte_ethdev/rte_ethdev.c | 3 +++ > lib/librte_ethdev/rte_ethdev.h | 6 ++++++ > lib/librte_mbuf/rte_mbuf.c | 5 +++++ > lib/librte_mbuf/rte_mbuf.h | 23 ++++++++++++++++++++++- > 6 files changed, 69 insertions(+), 1 deletion(-) > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 92a177e29..85f832bf0 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -773,6 +773,33 @@ port_offload_cap_display(portid_t port_id) > else > printf("off\n"); > } > + > + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) { > + printf("TX Outer UDP checksum: "); > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) > + printf("on\n"); > + else > + printf("off\n"); > + } > + > + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_OUTER_TCP_CKSUM) { > + printf("TX Outer TCP checksum: "); > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_OUTER_TCP_CKSUM) > + printf("on\n"); > + else > + printf("off\n"); > + } > + > + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_OUTER_SCTP_CKSUM) { > + printf("TX Outer SCTP checksum: "); > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_OUTER_SCTP_CKSUM) > + printf("on\n"); > + else > + printf("off\n"); > + } > } There is also "csum show", "csum set" functions, can you please check that too? And I am not sure why those functions seems only concerned about Tx csum offloads.