From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0062.outbound.protection.outlook.com [104.47.36.62]) by dpdk.org (Postfix) with ESMTP id 525562C2B for ; Wed, 3 Oct 2018 09:57:36 +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=tbYf/IxomiBRpYhnu2sGX1lGvG1Iptn1ZbF0Qs2u2XE=; b=aKOmRm1sXXGMJtH3vW4E2gmv80wLrOtgfBF9Thmf0lpNPcJ0smD3JEpvV45e1m+EYB4wmDKSsoDdF0drQ152FN3Nhf8mCC+Y8djJ0Hso3p9EhP6MS30BLpm3kQHCyRWfX6Yy9ABxsPU7uTO+dLc+E2cWidf3haHsDDQ9GZSfRQg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by BYAPR07MB4998.namprd07.prod.outlook.com (2603:10b6:a03:5b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.24; Wed, 3 Oct 2018 07:57:31 +0000 Date: Wed, 3 Oct 2018 13:27:13 +0530 From: Jerin Jacob To: Andrew Rybchenko Cc: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit , Olivier Matz , dev@dpdk.org, shahafs@mellanox.com, "Ananyev, Konstantin" Message-ID: <20181003075712.GA2003@jerin> References: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> <20181002192451.19119-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR0101CA0035.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:c::21) To BYAPR07MB4998.namprd07.prod.outlook.com (2603:10b6:a03:5b::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 412efec6-510b-4266-c5db-08d62905e132 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4998; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4998; 3:f25zOkEAiQ5vjHr0jI2T55WFCc97j1K3913TmoK/vao8HUO0PwYHCcnXDBpN6Z6kK8K3f3W83UmZATaYG/SPp05SGoaPjxmDbWAdNAdViQJKmNn/Uqu78nuOMTBMQVLPLwTSfH00unQI7SkJ3vznc+iYoLd8uX6SvJYGukoMy6665kqOuv7HOYkiN/TRUxoSovV4GfxgQ2RnrkUDI34g/XkTaDEMb7iJ6hQmDsnRX/4LRJd6CHO7rEFH5W05yelZ; 25:Biu3duCyQCqLo7om/3HucQOWa95SlmrxhtbbQsYQl7c4/k394RB5yDq8GCvcxi4IlIUSlZJWaHex9hPKjs+rEQKYg35fPgEDEP+Oq2Ygz2S5Fq9jAy3A2NMVXh8yQEgVzauIrV+es8K+rqkIJ2cSgbGthi52jmueQkjCvW7+R5wt4B66wtRJCHABVkJCV8Gm0IO5Mcmxqdr2gLCFLBWka/8tQoJjMZuXpky0H+U+7Bzg5PcqRU8wsPxOEuPl7gAwK1mvW70L72RqOWJhxvAQoWBPRfvAOdhrVij1lYT2J7t5nR0dqhSoUXch/C55tW+F5SRaUWPUBU/Pt1pgvXf3vg==; 31:boodyPv2NSNi1gi3giqosmLAWzIs9W4WVl0mXlbwoxu8osQ0uHhVB6tSRbMxqblYmgmxeSasZD1qtrLG1DKHQfwRmr68cg4uRlLhO6aIae0sFTQtrvnq7DQeodLaBRGgqrJFFhZb2doGeLZeV4EybobCHXozMI6PpyMmiw825EeHwHrWJe9c5qo17+wV0UdfdIZu3olc2jAd92PLr24FmtY3xLh00eLESDE1Z07p14w= X-MS-TrafficTypeDiagnostic: BYAPR07MB4998: X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4998; 20:UMaSwRNNIYMrRqeDmeruFXvuHHFy+I+f0su14q3W2pbAovnT08U0+QrDHwpSmJ2IWKPpBATeSmY5w7aQpMc4D5DoP3Z7i/+4bC8aa3nI6e7VBBsg5UZEm0mRRmQFuq5GbVcnX3KulOYAgALNl62Npm5E3QzqkeDDZgQcgpA+Z/3Frqi9LY99awOwaNvoqs31e2F3/NfjK44C0ngbLHseTp+knVaK1Q6SGMwp8RxkSq8xRFae69zXOtMqw+ynnGpVYy0baGoPk8Ao5Jp9b49BObQUhkS07T9BeyrsErRHT11Za53JV5/6pD1brlqGwPAviJUDJuAwBK7ZJR/2oyt6rVnfORoglbSWOfXlcANHQUHF01c0maDj4mZ1YWjFd37hxL8PAn/I+DYCVAHgenojyVryJDEPWbiQKxTCX7Ts4d+6nlqLt0EwefKbG4WV3UMe9X8KV7ZDQ97NpruutGaVR3HAtCq3vgcmNe1DOOVCzdvtqlooXmG8SvoHRcfuqoswgsp5VojtpLTjOLC/JiMIeFIKkDcA7JNKgDkjU3cJJuYRW7GzCl2wl9vOQuAfJTilWh1o18lsrj1II199e95j85UTnOEnz12nQiSJU/8WPu8=; 4:/46vAXf6FWVfR6Z7WtFIzQRfkn8p58aOjYd6cZsxytLa6D3pictEa7v1/yWqK5piRjYEnGvq9gNKJENRZStuJCxKjoX/qawhLEygXtx596D5RPhz06fpoGGYoPnWyedm4Yg8MXaB078dswk4qjiMR4RpZd+Vd8h43CfsZ59h5cQG0D/RdX9pH7MZHbfu8ho800JBBbHjcfYiu+EZJJdmk7Sn6tdeaR6MsCHaZTlyG2ifMBboqk5fyGcYUToR73OV6Pi3YaKCrgVjroCbCnflefmrsvfYbFv5soLyP7rhqUBv3cmiNW2vte3czqCrUZRk 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)(3002001)(3231355)(944501410)(4982022)(52105095)(10201501046)(93006095)(149066)(150057)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(201708071742011)(7699051); SRVR:BYAPR07MB4998; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4998; X-Forefront-PRVS: 0814A2C7A3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(346002)(136003)(376002)(366004)(51914003)(199004)(189003)(13464003)(68736007)(14444005)(11346002)(5660300001)(81156014)(81166006)(446003)(8936002)(97736004)(956004)(106356001)(476003)(54906003)(4326008)(5009440100003)(8676002)(2906002)(58126008)(105586002)(229853002)(6246003)(53936002)(478600001)(9686003)(55016002)(72206003)(6306002)(25786009)(966005)(53546011)(7736002)(33896004)(6666003)(6916009)(486006)(47776003)(575784001)(386003)(52116002)(6496006)(42882007)(76176011)(33656002)(6116002)(3846002)(23726003)(16526019)(7416002)(1076002)(33716001)(316002)(50466002)(186003)(26005)(16586007)(305945005)(44832011)(66066001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4998; 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; BYAPR07MB4998; 23:+NnoDm/29oOi9ZNaa6IZiu+mcPnw9A4cHsXrEljJ+?= =?us-ascii?Q?fiv0Zs4intgdYRxv4mEDg5cT2NxIYZIAit2Sug7sA40+/we8W3bPoEG3lIXE?= =?us-ascii?Q?nxqszc7CCqcaFgNm6hj/Nr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GKaMbL+rrDKRw94KMqSgRm9aAUrUEWU/IkNSNEwxhYIDNKpmOG/nbuRxU8syL3Ijjgs9nmm7+1NAIQbNBg5aC6i1f6KxEgz4Oh+wRwD9O7MLgVPwolkqypnbKu1T58LZF1Vsq8cCekSpDPL8Iv+YCtmwtU4/xnL/BZva1tvViJxpPgsbJRwpHne8xpt5FpTRAaGmpVhec/PFphb4ehEu0Ei6UgniaDFQfhzuHNecF3+kIOdVfJ4OHjt5+jfrwgH4zzCQ8Tip/Ux+S6r4jwk2cQbjZtKbOgolud7Rdr1w+k4+nQxwqgJSH/a2L6EkPJn0NnOeTbhvlacOY68DIfEvjOGbXM3yZMoE0LqoeJg57fWbBJPVWoLaEJLdgvmXa4cV5Y3B0oZgBjun0qJ5bSRVntoBEW831Y2xbrGgGj+9Y0M7H9asaSclyayjHGso1Rs6LUOVmP1mbqzvNwMOOk9N4A==; 5:uaAwnRn+mt7GsTKQaYeYBCN63HE70iZpWx7p6Lfuev3PgKY2t6yODrPti41e208UI1cyyi1p/O7fxJtrUZiTJQyev4IXRi6eivt13MzuYVhnKayGmtChkLgFXcsRS/D/YKvXY74+ZI8sRP7U+3VJ4I/GtEghbmY0emscgBY+vmU=; 7:FNknM8j9BaLIQgfA6E+RHDGb5Uob96sQ7K9fn8t4xzASMLieID0XKPEPLUGWwPQk0utMsTMxnIDAcGA0c5dBFhAOr13kVUZHpC6/nmH8Q77IlKJXsk+39cmbis52/dzTBgIM+9t3H3/j+5vvGsZ4I1z1irxQMExgQ9+dFyzDJIuKyabePLUzDg1dRaR9v2d/ZEWTdqLkQJbY9WYtASclLQxfeKiJNMEg/BTYooG/S8GXVIRH/mH/eBWL7gpEOoMO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2018 07:57:31.0843 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 412efec6-510b-4266-c5db-08d62905e132 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4998 Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: add Rx 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: Wed, 03 Oct 2018 07:57:36 -0000 -----Original Message----- > Date: Wed, 3 Oct 2018 10:34:52 +0300 > From: Andrew Rybchenko > To: Jerin Jacob , Wenzhuo Lu > , Jingjing Wu , Bernard > Iremonger , John McNamara > , Marko Kovacevic , > Thomas Monjalon , Ferruh Yigit > , Olivier Matz > CC: dev@dpdk.org, shahafs@mellanox.com, "Ananyev, Konstantin" > > Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: add Rx offload outer UDP > checksum definition > User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 > Thunderbird/60.0 > > > On 10/2/18 10:24 PM, Jerin Jacob wrote: > > Introduced DEV_RX_OFFLOAD_OUTER_UDP_CKSUM Rx offload flag and > PKT_RX_EL4_CKSUM_BAD mbuf ol_flags to detect outer UDP checksum > failure. > > - To use hardware Rx outer UDP checksum offload, the user needs to > configure DEV_RX_OFFLOAD_OUTER_UDP_CKSUM offload flags in slowpath. > > - Driver updates the PKT_RX_EL4_CKSUM_BAD mbuf ol_flag on checksum failure > similar to the outer L3 PKT_RX_EIP_CKSUM_BAD flag. > > Signed-off-by: Jerin Jacob > > 1. I'm not sure that it is OK that mbuf and ethdev changes go in one patch. > It seems typically mbuf changes go separately and mbuf changes should > be applied to main dpdk repo. I don't have strong opinion on this. If there are no other objection, I will split the patch further as mbuf and ethdev as you pointed out. > > 2. I'd like to see thought why single bit is used for outer L2 checksum when > 2 bits (UNKNOWN, BAD, GOOD, NONE) are used for PKT_RX_L4_CKSUM. > May be it is OK, but it would be useful to state explicitly why it is decided > to go this way. I am following the scheme similar to OUTER IP checksum where we have only one bit filed(PKT_RX_EIP_CKSUM_BAD). I will mention in the git commit. > > 3. PKT_RX_L4_CKSUM_MASK description says nothing if it is inner or outer. > May be it is not directly related to changeset, but I think it would be really > useful to clarify it. I will update the comment. > > > Plus one nit below. > > > > --- > > v2: > - Removed DEV_RX_OFFLOAD_OUTER_TCP_CKSUM and DEV_RX_OFFLOAD_OUTER_SCTP_CKSUM > as there is no realworld use case for it. > See: http://patches.dpdk.org/patch/44692/ > > This patch series is depended on http://patches.dpdk.org/patch/45840/ > > -- > app/test-pmd/config.c | 9 +++++++++ > doc/guides/nics/features.rst | 3 +++ > lib/librte_ethdev/rte_ethdev.c | 1 + > lib/librte_ethdev/rte_ethdev.h | 1 + > lib/librte_mbuf/rte_mbuf.c | 2 ++ > lib/librte_mbuf/rte_mbuf.h | 3 +++ > 6 files changed, 19 insertions(+) > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 1adc9b94b..d53c527e5 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -594,6 +594,15 @@ port_offload_cap_display(portid_t port_id) > printf("off\n"); > } > > + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_OUTER_UDP_CKSUM) { > + printf("RX Outer UDP checksum: "); > + if (ports[port_id].dev_conf.rxmode.offloads & > + DEV_RX_OFFLOAD_OUTER_UDP_CKSUM) > + printf("on\n"); > + else > + printf("off\n"); > + } > + > if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_LRO) { > printf("Large receive offload: "); > if (ports[port_id].dev_conf.rxmode.offloads & > diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst > index d42489b6d..2c2959e0b 100644 > --- a/doc/guides/nics/features.rst > +++ b/doc/guides/nics/features.rst > @@ -639,6 +639,9 @@ Inner L4 checksum > > Supports inner packet L4 checksum. > > +* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_OUTER_UDP_CKSUM``. > +* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_EL4_CKSUM_BAD``. > +* **[provides] rte_eth_dev_info**: ``rx_offload_capa,rx_queue_offload_capa:DEV_RX_OFFLOAD_OUTER_UDP_CKSUM``, > > > One more empty line should be added here to have two empty lines between features. OK. Thanks for the review. > > Andrew.