From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-eopbgr710045.outbound.protection.outlook.com [40.107.71.45]) by dpdk.org (Postfix) with ESMTP id AE13F4F91 for ; Mon, 8 Oct 2018 13:55:46 +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=zX9S2tOjhncTBLmD4Np1BwhgfHRc61ALa65wElUEPjQ=; b=ECZMfQXdv1q9NV99uUMWsV678PeqD4NlDIj6Mfk2vR1iSQLXyQlkOeu8E/AHPekoUpofRdGrjXcjJsW+kR8jTRv93t66229O0aV6ncgmyKtSN+YF6RlbI50yZK2hrjm5ALfJERydylMAzFVod/+D/WyCJUq++gLRE0FyV8dK+7U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.167.112.78) by SN6PR07MB5006.namprd07.prod.outlook.com (2603:10b6:805:ac::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.21; Mon, 8 Oct 2018 11:55:39 +0000 Date: Mon, 8 Oct 2018 17:25:26 +0530 From: Jerin Jacob To: Ferruh Yigit Cc: Thomas Monjalon , "Ananyev, Konstantin" , Andrew Rybchenko , "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" , "Mcnamara, John" , "Kovacevic, Marko" , Olivier Matz , "dev@dpdk.org" , "shahafs@mellanox.com" , "didier.pallard@6wind.com" Message-ID: <20181008115524.GB28968@jerin> References: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> <601d2413-e148-73c4-e7a5-59f09bd02451@intel.com> <20181008082421.GA3554@jerin> <2218090.RkeNvosNi6@xps> <20181008093741.GA11081@jerin> 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: [122.167.112.78] X-ClientProxiedBy: SG2PR01CA0126.apcprd01.prod.exchangelabs.com (2603:1096:4:40::30) To SN6PR07MB5006.namprd07.prod.outlook.com (2603:10b6:805:ac::32) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b86bb4de-77e9-47ca-559b-08d62d14f9f2 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5006; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5006; 3:vkURX/zuJ5MeJOAZRgZlRaY72zTGGiRC1A2tEiaETQSvkW5f1C4pQyfsQ7gA4UQhcdNhjE3nCfpXDJzf9b65AT5hZ7TX0vqJRuFFQe/lug1fYLRkC+cAjK5gBj27F6bu+ZlgZn5/c3d83Mjk3TBCW/1gqWE7cxKhszZqdYqowXiE+TfcALHx2Ryta49Gt/62aAfVHzGuHuDrQzYxgbyUCAzo44xcBp/7MLTigVyF/3PJ7JNScHPZOs3/G2mPDA6H; 25:nsglVSQokQMgW2H0B/2fpWSdbT8zC3TqLfcUJmiAygxEKtwn60TZAdIt9kndyGvk6zF/zQB8EMhZ11lFPXyqgGUjcvx8VYEv+B3uxoVHIHuLJugYiRpDsDwb8LHIR9p5yR1DadUQKgzv7nUjD7pH8Q/d0eA3P/XevR2oyJDmqI6YH6WJAGRTUfLenJnXHweBYfB/oluE0e2K6XsrYaKyURD8x0G4inEOzFmNyvxRyLRXhSuT1iVodeNez7kvp+J0tx8TnpMqWKHuWF06gbigiIxb5UvFM6g3uWS2/X084CjCo4yXBQuPxISmo2KJkCjaXSSBuVrcjRC8uzR7GggCGQ==; 31:9cLQfJmDvOR5JooVLLqiZ8STh0zalaTUQLGqw26z/W0PTk5lz00Q/emhsFdar7X/OBeAmmFMKCmW9YaAnCjcmoownglCNMCOI0vwiWYHZ40BHUq4l2aA6WLCdKrnajS8l9S2S7ZLj4RrDJIYgmiUib2XLz+QOZDs+1UDfduUflpPWl51k8UHBhpHBrkVwoJn89HDBbqVZ0riLFlF7QJTwRwXHWVrFSj6RYU+s4ivotM= X-MS-TrafficTypeDiagnostic: SN6PR07MB5006: X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5006; 20:Tmg8yjPLlycHOwiWA3+iWEpXJlnPLP7HpFjv9IsPuxAhlb+26ELKjMjOVeWqya/S887ZhybvTYtknYHH76gyDL+Xy/AsXLi3kFC366UVxj32ZwHDDQMQq52DRQ+VQz5bAabwP2l8u4XuPi2tYPvKrCMUivLjLv6G9YSew95uX8brc0vI2UyW1K7PqJ9IYE71gItZEevMtJO0bT5grNq7j2YbwLtP9Wiq1rWHJifr/101AM0ahUjVrE67O57ihn0xEe17N+GrSg8IUkfe24sj4KNR6BMQplY3jplouDR9ZhVvzt2c4HXmi0YES74isoxGCRW1C1VGKZ+mMzVhMwDZ3vzjggBxEquLOXr77Wf4pTjyr6Vujau445P49z1pAbvGGRREBjCd5w6fnE6BHPTvoHF8JJQ1VX9VQjFYSO0VkvnOlTm7M+llKbaO+l++3YWK7OlJoGOmEZhDcvNQyRWJOIXGPoumtSm02O9nPlDh/Zwggo6S02CB7AFtjFy2M6I3TzLp4rRUpZNR8EY2J97eCmsZliaUPdaANJjF5UW9jvKSgbPiYhrtyKbyYmTZLH180Opcyzvv+F1L+Z4ljvtGna9riVWxkkeaNSboJA2lPhM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699)(211171220733660); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(93006095)(10201501046)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051); SRVR:SN6PR07MB5006; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5006; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5006; 4:gKoL4lEttffbuA7h1HiqWeTgyywF6d6Sm3AbqVdPChSRKU/Tb5Eq2YGzaAYByiAve8cr8uNEMSB42u/wTgCG2q8tHucqTf+LCqGvubSyRMSMP7bm5JkFCrG0EX80gvGiCvx5JVd4Uh83rBCG//p2aIe+NFQxp5bNSr6V1ScfTjI4cwg9JidsJWxO+MhczwExM1cGOyOUZK3hG9bfUPqSQdJ1RCW4c8hfq6xuApSfMlzICaV32JxBR6go+AoHDm9b87If2DhWItg74mCqQya4csn/ZrSW2GqWIFTLWTwR8oAGcyFPVGVDAR99R5jfzUHDkd7eMp7UHJGGzy5Mp03N5eBjKT3wjMW2ucozWFwIARc= X-Forefront-PRVS: 081904387B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(396003)(376002)(366004)(136003)(189003)(199004)(13464003)(57704003)(47776003)(33716001)(6116002)(81156014)(105586002)(53936002)(4326008)(8676002)(6916009)(6666003)(106356001)(14444005)(54906003)(5660300001)(66066001)(93886005)(229853002)(2906002)(6246003)(58126008)(1076002)(81166006)(25786009)(3846002)(68736007)(55016002)(8936002)(9686003)(23726003)(6496006)(53546011)(44832011)(42882007)(26005)(446003)(72206003)(50466002)(76176011)(52116002)(7736002)(305945005)(476003)(11346002)(486006)(33896004)(33656002)(386003)(956004)(7416002)(478600001)(16586007)(316002)(97736004)(16526019)(186003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5006; 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; SN6PR07MB5006; 23:k9M0Yo4s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UFeVesT4/+WVpdE= X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5006; 6:whJfU4mCgFbj6O1irJBPsxRsRMULfbUpsou0cGjNorJDgVR+1hiFvvZokaPc6fdEyRxkITue1m4XMJ1URO+aP8S1bW+D/eIAqebs5iNYzP+f0rakTkIWz62ng2R9hY9JLoH+DCbGMuKYyTC+Ky/gx4esqi9maOnqIgWrTwcxlYYQ3jPRJZeHfsyk0KDTeaIe6KyupthuZzkKsnz6J5VhRBgchsLkO0nfSl0FPhg0NN1MydptMyo2MgB4Qncxk769BuY4Mxo6z6pwci2o7WgeZ8miP1pjT9VKVJFN3wFlHgqZlJhpNcE/a287hgkCDavmPjEoMPUetz/YovtYJoxKLMtoNpMLPv8HnDtjxs9p20tDlan5svNVl7/CqIMyOVOe4wwSGQK9QSp4F4J8teF9dA5qcv7KqB5nbBvMVQK0rRTyjrpMcTquMultRSTc70eu94lnGztgJio9TJnoW2eCaA==; 5:98FuPLFuav5fWVGquRS4dZ/ra9BVVJYIkbo+EaFMU6QTbqRU0Umx/MJA0S0ogvsJAjkLY00Ewsym4r6RP+sPI8URbS7dWDHLbsG81B46EY+y0YS0F2IZerHkZoSVkjCjguRaMUH2+ejSDfxKDvJssPWMTE+yluNPZJc8R4Fya30=; 7:oMIU8jmY39OPBzcH6lHRT5a0HRF/WabShBHGRtwgDPn57kjCmklzJWqwOqy4YWLYqgApFM84O55fSEJK0AvgR+ADpjZplek/j+3KRvjwAfQi/RdJX0abaxb9d7pf4Cj5n3pwFsMtUfZzwGMrpEPoTEY1YdapdC2xfGsVYFzgoABMYwo6JW5afFhlMvZULrYgg8WEyBz3HXSu3zpHD/k4FhKrENAG/IZHqQM3D/xc3IiRtBHG6hQwEopf3Ujuw14F SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2018 11:55:39.0664 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b86bb4de-77e9-47ca-559b-08d62d14f9f2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5006 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: Mon, 08 Oct 2018 11:55:47 -0000 -----Original Message----- > Date: Mon, 8 Oct 2018 11:53:01 +0100 > From: Ferruh Yigit > To: Jerin Jacob , Thomas Monjalon > > CC: "Ananyev, Konstantin" , Andrew Rybchenko > , "Lu, Wenzhuo" , "Wu, > Jingjing" , "Iremonger, Bernard" > , "Mcnamara, John" , > "Kovacevic, Marko" , Olivier Matz > , "dev@dpdk.org" , > "shahafs@mellanox.com" , "didier.pallard@6wind.com" > > Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: add Rx offload outer UDP > checksum definition > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.9.1 > > On 10/8/2018 10:37 AM, Jerin Jacob wrote: > > -----Original Message----- > >> Date: Mon, 08 Oct 2018 11:04:51 +0200 > >> From: Thomas Monjalon > >> To: Jerin Jacob , Ferruh Yigit > >> , "Ananyev, Konstantin" > >> > >> Cc: Andrew Rybchenko , "Lu, Wenzhuo" > >> , "Wu, Jingjing" , > >> "Iremonger, Bernard" , "Mcnamara, John" > >> , "Kovacevic, Marko" , > >> Olivier Matz , "dev@dpdk.org" , > >> "shahafs@mellanox.com" , "didier.pallard@6wind.com" > >> > >> Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: add Rx offload outer UDP > >> checksum definition > >> > >> 08/10/2018 10:24, Jerin Jacob: > >>> From: Ferruh Yigit > >>>> On 10/6/2018 1:18 PM, Ananyev, Konstantin wrote: > >>>>> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > >>>>>> From: Thomas Monjalon > >>>>>>> However, we should re-visit the flag PKT_RX_EIP_CKSUM_BAD. > >>>>>> > >>>>>> Do we need to block this patch due to the exiting PKT_RX_EIP_CKSUM_BAD > >>>>>> definition? > >>>>>> > >>>>>> I already added the author of the PKT_RX_EIP_CKSUM_BAD flag and ethdev and mbuf > >>>>>> maintainers in this list. So what else I need make forward progress > >>>>>> on this patch? > >>>>>> > >>>>>> I think, the definition of PKT_RX_EIP_CKSUM_BAD based on HW capability. It > >>>>>> is safe to assume that ALL HW can support CKSUM BAD if the feature is > >>>>>> available and hence it is more portable. > >>>>> > >>>>> Yes, as I remember PKT_RX_EIP_CKSUM_BAD is based on DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM. > >>>> > >>>> Switching to two bit won't reduce the portability, HW supports only reporting > >>>> CKSUM_BAD can set BAD || UNKNOWN. > >>> > >>> UNKNOWN is not a bit. It is represented as 0. It spec has 2 bit, then > >>> driver need to report GOOD as well. > >>> > >>> Same applies for PKT_RX_EL4_CKSUM as well. > >>> > >>>> > >>>> And I think patch is not blocked by PKT_RX_EIP_CKSUM_BAD, it can be changed > >>>> separately, for this patch question is can we represent PKT_RX_EL4_CKSUM_* with > >>>> two bits, to have BAD/GOOD/UNKNOWN? > >> > >> Yes, exact. > >> > >> PKT_RX_EIP_CKSUM_BAD must be left aside. > >> We should just avoid taking it as a reference. > >> And we can reconsider its definition later. > > > > OK. > > > > IMO, Using 2 bit scheme for tunneled checksum has following performance > > issue from driver side. > > > > Driver need to mark the packet as GOOD. All the HW can support > > detection of BAD. That not necessary mean GOOD in case of tunnel packet, > > so driver has to detect the packet is tunneled and packet is not BAD > > then mark GOOD. > > Yes UNKNOWN is not a bit, but a state, why don't use it? Why driver has to check > it is GOOD? The application is going to check is it GOOD or not. Not the driver, Right? My concern was, If application starts dropping the packet instead checking the BAD, if it checks == !GOOD. > > 0x0 => UNKNOWN > 0x1 => BAD > 0x2 => GOOD > 0x3 => ? (invalid perhaps) > > HW that supports detecting good packets can set BAD || GOOD state, HW can detect > only BAD packet can set BAD || UNKNOWN state. > > If BAD is not set, there is an ambiguity of state, lets clarify it in lower > level, if it is UNKNOWN, let application know it is UNKNOWN. OK. How about the following then? /** * Mask of bits used to determine the status of outer RX L4 checksum. * - PKT_RX_EL4_CKSUM_UNKNOWN: no information about the outer RX L4 checksum * - PKT_RX_EL4_CKSUM_BAD: the outer L4 checksum in the packet is wrong * - PKT_RX_EL4_CKSUM_GOOD: the outer L4 checksum in the packet is valid * - PKT_RX_EL4_CKSUM_INVALID: invalid outer L4 checksum state. * * The detection of PKT_RX_EL4_CKSUM_GOOD shall be based on the given * HW capability, At minimum, the PMD should support * PKT_RX_EL4_CKSUM_UNKNOWN and PKT_RX_EL4_CKSUM_BAD states * if the offload is available. */ #define PKT_RX_EL4_CKSUM_MASK ((1ULL << 21) | (1ULL << 22)) #define PKT_RX_IP_CKSUM_UNKNOWN 0 #define PKT_RX_IP_CKSUM_BAD (1ULL << 21) #define PKT_RX_IP_CKSUM_GOOD (1ULL << 22) #define PKT_RX_IP_CKSUM_INVALID ((1ULL << 21) | (1ULL << 22))