From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0064.outbound.protection.outlook.com [104.47.36.64]) by dpdk.org (Postfix) with ESMTP id E01279B67 for ; Wed, 3 Oct 2018 19:23:41 +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=CFH60nzMn10B7mch1tGbWwZTvqKznKhGeoUmV0xtcqo=; b=DOV1VKGc4h1mhdPELya3WahqopF5Ty6J8r9+e7jBTUwm99mlPA8pWanIGmkkDn2yfNOaCSSX72v+WDp7FpZtjxVx/5TDHbVoMPJHL73mPuZa+nynSrSF3CATTyoC19n+t36aBG2g3grJPHp0Da0RKdpn5oW2fHaz9T/VOXFiMhI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.201.57.251) by DM6PR07MB5002.namprd07.prod.outlook.com (2603:10b6:5:25::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Wed, 3 Oct 2018 17:13:10 +0000 Date: Wed, 3 Oct 2018 22:42:53 +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: <20181003171252.GA3193@jerin> References: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> <20181002192451.19119-1-jerin.jacob@caviumnetworks.com> <20181003075712.GA2003@jerin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181003075712.GA2003@jerin> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [106.201.57.251] X-ClientProxiedBy: SG2PR03CA0125.apcprd03.prod.outlook.com (2603:1096:4:91::29) To DM6PR07MB5002.namprd07.prod.outlook.com (2603:10b6:5:25::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 320b01e5-a988-4c76-8b54-08d62953817a X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB5002; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 3:66dqpvi/6NBFS0exFCgjyohF3NmbTskl3yMznNQ3Tk2ByMAXqHZtOdox9asbgoeIxS5/2URvZWZwL1XO9AvBs0mC2+S3GW64OoujuLHIOZUQTiqHg3dsrC58IxQ6kRo7H0ffx0RK9RDyeL5wo6q5glbbd5iTx/wA8dEZcpHNJLrkv5eUbuqClWz+yRbYp2eOoEvnJsyDhDkpJ79805gPRV6RhCuBrGMrzXTLiIakJbMGaDEn9JumuPSVspfH1xun; 25:jUPPLWmxqxR8wDHAhSSX+i/8m7LttzUQ9od5gvaXF9RjSpY81l27+zMZZkDI3wYBvkAGoky066bQTHzTCI3CleKwXIfQEr2N92GXq+Mp0Lk645dX0VvrQ5iZWZGJOxzcKXlcfLhQASjNt7YFCyQSDYPSmxbWCvqoBXHqB2nj/dGMPg/js/ZKRid5GMfYLUeSM1mGK8aNIeQ0u2xmwcCQoIdTADwrupgib9MTRBhgnwqiM8WfH7rG9eZLMkcWFulNHr8dHjNZOoIGES2etISJJxA2NiLSNA27XicWYeNX8eGPo21l9raI01bog4oNqiFzvAvVvOyjgTYfIKrmKGZHvg==; 31:0L3FeMgQJykf6o/OtbnsyOzJsgOE7vcCACRjNHJHTYCmAf8gpGtMOzX2VBsucxCjooHjeZjRoMB0PpiyHnwSKOqvne0E7sDoNP4DzuBnHi/LwCmWWwe73rqyDRkATF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EQI7IKqsLB/r+dWeAsdhdgNu3aU7DRueLlGaJonaCMi0NCcd+EB7CeL 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)(8121501046)(5005006)(3002001)(93006095)(10201501046)(3231355)(944501410)(4982022)(52105095)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991048); SRVR:DM6PR07MB5002; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB5002; X-Forefront-PRVS: 0814A2C7A3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(136003)(346002)(366004)(396003)(39860400002)(13464003)(189003)(199004)(51914003)(8936002)(81166006)(25786009)(33656002)(93886005)(33716001)(229853002)(53936002)(9686003)(6496006)(68736007)(55016002)(6306002)(97736004)(106356001)(47776003)(66066001)(14444005)(4326008)(3846002)(316002)(23726003)(6116002)(5660300001)(81156014)(6916009)(6666003)(16526019)(26005)(305945005)(50466002)(186003)(7736002)(446003)(16586007)(11346002)(7416002)(575784001)(476003)(44832011)(76176011)(478600001)(956004)(486006)(8676002)(33896004)(386003)(53546011)(52116002)(55236004)(5009440100003)(1076002)(42882007)(105586002)(72206003)(58126008)(966005)(6246003)(2906002)(54906003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB5002; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB5002; 23:IaLFjkQZ6o/+3OL5aB6V0eiUdTDVxpr+J+SInmOA2?= =?us-ascii?Q?Dy4bVD+g9tEpTot42V5A+/bT+Y8+PbgCPqqYjH3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VjumY0pQhJq5X2REPymlAsHrY2pPpEd23Ty5JCdSpZ0= X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 6:MgB5bdx179ejjqVeTCV/NaIdc9Hyh9KIyXZf3l6iuUYGgSFFrhbqmPhp5gAt7bAAdQ3vIYrpGWxDuTH+w8ZoKixYJsEyfhnX0pHcyE0IMT1lNmsoC+8rA6lwmiTnl/edU+6aT1aBV7mGuIEaXDGRgRknSDn0YB4vCjTJYwl6jE7fB0TPYD5yjCGuBJN/IBXS0rGD1VHq8UmDSYaTiL4FWCIIZX4kanFJhB5yp5Vb23s5g9skq5y+arAa/yhlGW242tUKj3fP+HOg/cWF6q3eVybr5ouYDPLU7iJzWG95lcsTGnVDNzXiRpNOqg1VhQqRCZEwySmZ3pGVQsLZTknNib9qtYtWzF+ysbAyKToXW+ZgZcFrYYpFW5MMYIi43oBelHv0dLgueW7uUTx0RDFjJVkDoMXz0Sc3CWcf4hRfbCo15lJxbKXoc8Ansak65ST1cMq0zN2e2dmK925pUsR2Ww==; 5:bAfwNUVGttNwCoWy2wPtYocQJ4cGWDvg120wuvuwqeNuw4yYdmFVRRmvxEudl4PSewuz3MoSa3VtMlcSfi/SpwDME483RvWxxLhJpL0lwGoMHVjox7ePzKw7VgqQMHCsAdN3WMj1d0gcWQCu3Nf20GO6Icy7Kfad2ixa2x9yraI=; 7:5vbGFrtxPT6joU+LUjr10fYgpACv72ha45XP6WptqGoBXRp6x/otizRa7N+zTR+CRiwr3S0EqGpm+qzNWW8fmTOSQ66gtZFIIVZ7no1CJyJuXnU9rRpZefzmYJE+zbocCeAGgLCdmRBk0D+BOF7Bs68vj2QuP5QW5yEoqjc7LsYYqFuQbIj8RIIoGiuvroclmp7PthFwKIB9OTODJs21g7KsC4LmkVWDQvgEDuNomfa8v3Na2xT8K5pPGrHTvjPU SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2018 17:13:10.7539 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 320b01e5-a988-4c76-8b54-08d62953817a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB5002 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 17:23:42 -0000 -----Original Message----- > 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" > > Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: add Rx offload outer UDP > checksum definition > User-Agent: Mutt/1.10.1 (2018-07-13) > > External Email > > -----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. Hi Andrew, I looked at the other definitions in mbuf.h, according the documentation, If nothing is mentioned it is treated as inner if the packet is tunneled else it is outer most. So I would like avoid confusion by adding "inner" in the exiting PKT_RX_L4_CKSUM_MASK comment. Technically it is not correct to say "inner" if the packet is not tunneled. So I am untouching the exiting 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.