From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700068.outbound.protection.outlook.com [40.107.70.68]) by dpdk.org (Postfix) with ESMTP id A84F43195 for ; Tue, 2 Oct 2018 11:53:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DHelfmUj/grv+DcyDbJ0Oq+x1NUK/J3Nt97hhCDN1Jc=; b=ZDwwqzj4FjKkOuPrvFjuS3qYQjnvD1lrU0cXXvS5cQnvL2jr2ieCqKupGKzvLaG9A+my3Ro/UMVMN+qVA1zyw7Hq0dB4cDOOFyfdVO6Xkfz26ivdTRqt5pLCwuug0d0sRzlDip/cR++uONA+jGKvrvBJ7BD8rGiJ6cDdX+VSYNI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by DM6PR07MB5004.namprd07.prod.outlook.com (2603:10b6:5:25::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.20; Tue, 2 Oct 2018 09:52:59 +0000 Date: Tue, 2 Oct 2018 15:22:40 +0530 From: Jerin Jacob To: Ferruh Yigit Cc: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Thomas Monjalon , Andrew Rybchenko , Olivier Matz , dev@dpdk.org, shahafs@mellanox.com Message-ID: <20181002095238.GA26866@jerin> References: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> <20180913134707.23698-4-jerin.jacob@caviumnetworks.com> <13368ba5-599c-792a-23b5-9b8832083c18@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13368ba5-599c-792a-23b5-9b8832083c18@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BM1PR01CA0077.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::17) To DM6PR07MB5004.namprd07.prod.outlook.com (2603:10b6:5:25::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3249381b-e661-4616-c59a-08d6284cd869 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB5004; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5004; 3:UeHU4tX+53hoYMi0+HqMOah7uqUEe918Tvzy17uZ90xmcln2kDjYFkHBY77FLQBxIUUirvSqRxl545nbJcEa9P9gucGEmnz/3j5gC69CFCa8wtGwDQ766DOx2prwAA4JOGJ6yRq5HcdLuYpcuTsIDvmaiqhv7Osz5IGyh92ktZngHMGSWEONcdWIkKdBXqQhKpgr4T9Cpp/1AcN3DnWXNadEJDQ0y2WRY0Qe12dTGIHvHPV4pcYw862tkiodsDCQ; 25:ak3r5V+xuBfVN4o2uweNkj+1PBBSeNQYkSH8BfY7tZV3AA99dGRN/j0Ks0XArOw5bPXyUO5LRl2IBA7dFKVzaqKCXjK8uAL6bP005KsHOHjbQjaNfR/C1907TlJxHQEH+o3j1PU057WoD0jZn6mvXrah5YvnDIB3puAQ52vXsHd2mHKf3YreSDmSemj6uqVd64H90DHSChXk0C9nABxAiRSNnrW7wGoWadxuZUN8dsz9JsxFpKDgw0BzQewn1CDbJdYwXnasQ5shV4CyQpg/6lzMGq773/eAdyb3+3V/kO2aJnURpqE3yak2kuGP2Ry0uiODD0lZ1hQ+rCFEYMtRPQ==; 31:bIDxb3G17y71RVjp/guPzz+YSC1qMyJdrTEUMwZDVHj/iUsWCeO2GBU/QDOUfH4HJKMcXq727M9C6k1lb182gPtZoXHho87lZUU01ee19Gzh0U4Aicll3X4mCz7XZCfsZsG9ojAlGCdRKp3U8jUajQqXiOE7Om2m1JDcYQmIz3uXKVMy5PhVktQ26jb2+bFChsDg9j5YIYzGFcWY1s1KyT/PiH+xSE0AC6ovJPtlOLM= X-MS-TrafficTypeDiagnostic: DM6PR07MB5004: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5004; 20:0auzymDfskAs9eFy1BnbEJgVR8Y5kqmRvOEYa0dBw6noDN6qOB7osNghho4WCMABTaDJQQU70LADowXiM21GKtYZz/sogKHJz+TGH1i68jIBV6ircssoxMLUXUJntJRRPrgCtbjHNigOZzwc1MLocJP3gW5hOsumzU9k6btrnGV7DUt7FOabf706QsehVvvtEWcNpDOHvCYaHYJb3XCoomegJuLE0lpo4KNHUlsMBwyUM83ptGPct5FiCjI+2s831t64pSj7avQuVrEptk6uTzo08T4n2EiQJdauTFj7taaOBKKW+yDDw33dM/pvEcbfMNtojSLWtYjoJxCHaLyz4/xCAEChzmuhT03IYY/ScuS2cmJhYySjCK58/yj58kMLFr0kFheil+G7ZxpQN1wAbdgUe6AZzcwR6T4Mt795Fz1jnm/K/dt95OuAG/swBliANJYeD9WLLRRF9vJTIc8zrcabMhy8sxnbWzesiBBP933rf8/6n29a/MAs480qdmKE8x3FOX4EVT4nqBguQkqLm0WTjfPARYS+jVQtffjmv3dGFKD7SohRObeIdwHiW7xAxuYfL3vpGbMP4AHVG/mvKiCfvxV6nlEJQXk2M/qVpFE=; 4:XHNae5llLJDPxy8QE/3IvJCgjIYzR96D5uJ6vBLQFy/eJ3f1tb8O9kT8N1d63GDuFbEZ7cJ434uZte4z9vQa1+Ui7x5+JsR31579jOIQxAoYQQRdkCE3SAeAG8AA+crGC9R+8EgBta2fHXclQSsnEu+1PIl2g+sCVuIhhkWS+ueVfmL4KbTirjqsVuAoNA5Y2b7ErIv0KOZYSArvRM00oowMfFRmmWWXpvLerkff7lI6Z60eYdUcib9mEKurqKxT/6KjgPQsu4q1mALzAn+ZKWkUQDRt8j0xqZzTiOOKIOvvqTqhmyyB0ZlZ2PNQa0M9 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231355)(944501410)(4982022)(52105095)(93006095)(149066)(150057)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(201708071742011)(7699051); SRVR:DM6PR07MB5004; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB5004; X-Forefront-PRVS: 0813C68E65 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(136003)(39860400002)(396003)(13464003)(199004)(189003)(229853002)(4326008)(44832011)(26005)(6116002)(186003)(23726003)(72206003)(6246003)(3846002)(42882007)(14444005)(16526019)(1076002)(476003)(966005)(956004)(486006)(478600001)(105586002)(316002)(33656002)(446003)(106356001)(16586007)(33896004)(7416002)(54906003)(386003)(8936002)(11346002)(58126008)(66066001)(55236004)(8676002)(25786009)(76176011)(47776003)(50466002)(52116002)(97736004)(33716001)(5660300001)(53936002)(81166006)(305945005)(7736002)(6666003)(55016002)(2906002)(81156014)(68736007)(6496006)(6916009)(53546011)(9686003)(6306002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB5004; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB5004; 23:P+VaXv577QX2RzlFmOG8DBNcCs9n2wtlsE3GQFGqG?= =?us-ascii?Q?t//8DRG04gSXWxmTns2was7g3dSNWDOMKfFC+IDIp8Q7I5hwv8O1Iyf47425?= =?us-ascii?Q?3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cX2OX0T03v8P7LYtPpFxt8ubWXs/VX4/Y53KEG+bpn2esJH3W2n1zSb3NQMxrTIe3RytzIgXWsVY6qIMPZx6WVFEBY7zmszAfFzDwy3r5Bf58g0DQ66TsIpNThDB0aX+32tDWNtQ2ULO8055IGYRGLxpp4QzzxKQur6ALCJaKLPtfKz/6qfUngyUi3lqLnBEmR+Qz9EFRWItUOmPeIW5vqlPr8v4KKfHzEJJc5plQOE6llcZAfq/2AMUX17lTEUDE1811ky9wbdk6NCO0WfMzfYos2H0ZV+5LpkEOV0qv1gJc+jmCr9u7hJyKTxwDchUEIGM+SUrxLw/pEYwzjduvet5YwZ9Kzs4jh2P9Wb+WxA2Ja0s4hUgGOAunYgiUsBOhUZ4AXHgXpQpXJv8yGX04i8kVlAxpw==; 5:o85Tl4L/aYjUNKv3aT0335IARdbgWmRrriQPb9Zn5Ba0mAeg0aoVmP9syu1b3Xulr+vjwxrMbVDPDnYIGSmTVYDBuy+K7MJqhEn/MJYFFqlkog/MqPGKjnEGrmxKnnp6KW3kuUvPjSDSWL14cJ4jB1AJRrEg7tgqPU9fisFwOCY=; 7:gKTmkSwpX1WKgBXutg6uliwuuqZaFUaeC0+D2huQl+gHQgNAU3J+sePlP3znZ3dbbwDeNxPvJpG0l8tbU4W1C30vVB6H2UisDCUBV1N/J4wyUQCO5Oqd3XzpKHT81KDdy8R/5nOtFai3Z3E1IS8+S6KELQ2V+93qXojTewvDAMoxM621J9B0Bt/7rdVwrj3xjBGXQvwei1cU5ZjIxxhOCisp322O+Mk7zASjSP7sxgNoYBlce+eX/wo09gpvRUk4 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2018 09:52:59.3097 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3249381b-e661-4616-c59a-08d6284cd869 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB5004 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: Tue, 02 Oct 2018 09:53:06 -0000 -----Original Message----- > Date: Mon, 1 Oct 2018 14:45:39 +0100 > From: Ferruh Yigit > To: Jerin Jacob , Wenzhuo Lu > , Jingjing Wu , Bernard > Iremonger , John McNamara > , Marko Kovacevic , > Thomas Monjalon , Andrew Rybchenko > , Olivier Matz > CC: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 4/4] ethdev: add Tx offload outer L4 > checksum definitions > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.9.1 > > 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? + Shahaf I checked the details. It is for "csumonly.c" forward engine to select various Tx checksum in HW or SW(provide fallback SW implementation) for testing purpose. If I need to implement this support for this release, I will reduce the scope to DEV_TX_OFFLOAD_OUTER_UDP_CKSUM and DEV_RX_OFFLOAD_OUTER_UDP_CKSUM. Since there is NO real world non encrypted TCP/SCTP based tunnel protocols(Based on http://patches.dpdk.org/patch/44692/ discussions) I will limit the offload definition only to DEV_?X_OFFLOAD_OUTER_UDP_CKSUM and associated test code in "csumonly.c" forward engine in v2. Thoughts? I will split 1/4 and 2/4 as separate patch series and and rework 3/4 and 4/4 as separate series to make forward progress. > And I am not sure why those functions seems only concerned about Tx csum offloads. It does check for errors in Rx checksum too. See rx_bad_ip_csum, rx_bad_l4_csum