From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 4/4] ethdev: add Tx offload outer L4 checksum definitions Date: Mon, 1 Oct 2018 14:45:39 +0100 Message-ID: <13368ba5-599c-792a-23b5-9b8832083c18@intel.com> References: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> <20180913134707.23698-4-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Jerin Jacob , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Thomas Monjalon , Andrew Rybchenko , Olivier Matz 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) In-Reply-To: <20180913134707.23698-4-jerin.jacob@caviumnetworks.com> Content-Language: en-US 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 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.