From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 51908A0579; Thu, 8 Apr 2021 14:16:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B37E140F4A; Thu, 8 Apr 2021 14:16:30 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id EDC6E40138 for ; Thu, 8 Apr 2021 14:16:28 +0200 (CEST) IronPort-SDR: 2eAHY5eyJALmQ+km3XZDDpv/bbd3pbNL8M8PMtmhmXNCFZixfhuDIeu4QfEZXn8WBV+d39khKv ZfGX93kTupsA== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="173000807" X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="173000807" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 05:16:26 -0700 IronPort-SDR: cR5UIznxufF2sJNc2tbCcyanr8zwu3FYm5JW3DDnxckJAY22ppr2DN7Iu/lbYGzghROhT6EYj2 IntUwhs3Tk3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="458803828" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga001.jf.intel.com with ESMTP; 08 Apr 2021 05:16:26 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 8 Apr 2021 05:16:26 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Thu, 8 Apr 2021 05:16:26 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.42) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Thu, 8 Apr 2021 05:16:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PqaEETfjBvBfH7cto+ZwVx6iWqcvT6zdRIrdnvldsceZhqYOEUxM8yhrpuQtDumLS2cM4MezASoui7sgH5yUKxM/LEAHKRjfrfSax7RvLYaY8XCWyRz8bChzAUcunsw3MffYusGFkvBakrqhlan2moJx7dOtiMrrHfjqUWQB46m0TQlQWfX4tZNzuBX14nkSHrBAyDK5ZKzLGxjW5qPt3Z8zzDMpvePuSh7b9SI+Oy/49YcfauZVfNJkBQL9vGv83rYka4lodxtQlT9uFJVDA06SFTAUuY5Y+EHAhv0Tscan/0rGJsoc8PqyqP+8Co18bYvyRm+zcn7+hN5Ggz0lCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mQlnQnqUztWUXxSrwZ466YjZ8qb9mhti6knYRp/viGA=; b=aSZSgtKEVheF75ZyF1huOXuGjgilNpPVfUWxKpHNBRMXIN+niS1XVPMQ9zFFcMdxjNyH7nmNoqmiGXwpIOuX9Usb3FYxWFT8xWn/iCVp4dRPl+rwbOiBFXDRyWcAkhRgBHLVMevlQHwvmShK1Q5rKlXnpepv2Nr3KTsgVJDUlrpShHINh6kNKWQDvb5ZO3I6DJOfiP9VVJtbOF3r7WwXjoOGOysDlhvJF5ZXhEOOJp7TIdPxHHL1kVK1mZP647AUCvcyUVFM9Mo4nuQD6WW/ZIpe/TKpOcc73htYbENaBE04TiLP48lC+JtyIHreTVsfQK4YNHNLUYft3uEu+2aSFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mQlnQnqUztWUXxSrwZ466YjZ8qb9mhti6knYRp/viGA=; b=Rvzp07ArHJCyjuI7c632ZZyc3LGX4zeyks8cDF+MqeHELO5aJNIeCJFYtmO/VFJw55y5osMrhvVJ5lkJcWE9liuxs7LegtQ1ekKdMS3cbHcj8Qwh1tbGdmL1Eczi8HSmgbibpEIXO9FiuHALXz9WONEkgo0g7D+rV6+XB2hi7mI= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.27; Thu, 8 Apr 2021 12:16:24 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::3182:6da2:8c64:f07a]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::3182:6da2:8c64:f07a%3]) with mapi id 15.20.3999.034; Thu, 8 Apr 2021 12:16:24 +0000 From: "Ananyev, Konstantin" To: Flavio Leitner , Olivier Matz CC: David Marchand , "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "i.maximets@ovn.org" , "Wiles, Keith" Thread-Topic: [dpdk-dev] [PATCH 2/5] net/tap: do not touch Tx offload flags Thread-Index: AQHXJt0sk+CBwGAapUuwHZClqUYAZaqph9OAgAC/woCAAD13AIAACmdA Date: Thu, 8 Apr 2021 12:16:24 +0000 Message-ID: References: <20210401095243.18211-1-david.marchand@redhat.com> <20210401095243.18211-3-david.marchand@redhat.com> <20210408074159.GQ1650@platinum> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: sysclose.org; dkim=none (message not signed) header.d=none;sysclose.org; dmarc=none action=none header.from=intel.com; x-originating-ip: [109.255.184.192] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 67fed159-e6c0-4910-cde1-08d8fa8820f2 x-ms-traffictypediagnostic: DM6PR11MB4491: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: C89GTIbrSo/Y7fypLTGnVlOaMRgP8wLoIulYaplIPrqMYVIBC+l89emk6fiIJpUlmYCe6/PSDhYRbPkjZJuKMc5x2CGmb6ANZ95iC18qL78KrBE5YAmwUeyTkw5jxXkNt0VpjsW/+sDryed9n6lzotNuh+2dxMvCBvIxgUJ4zjq1zr8/x4cPrczxaMBwO+J8pQbekhKReGSH99tGIjg7idpa7txnacwMWBP0BgdtArhe9jKl3LvVi3ZtZuATrpr2dlgwmR1jVRmKY31VxgvhGtmOU37b3OLjm1KJuHnRqJxKkbSaFTE6aTlIRSSJ6VXvMKAzE75m79EVozhe5moB8eNNo78WzP2XUSWsEbOA+RbAn4jANMtgotNQgdcnHOoLsmTjNYL1+IL6OV7PFK0/4DBLobdzQzXNgV/gd7f/aZOJwIxC2KzxtArTtPDxX26C6cyqicGSTLLb/qvN2561FUwIDELAposOIsCB7vz3BINzhwqsQx0Q9hxL56ZK2AOVPl8+y3U+3x+D773Z9UgirfsBxBfHP97THgiXvFdlPXq5CJNGl/guHZFQyj0tsGdu5OOCdy7/GIhKAlijOuHdYn+o6KOLYhEeMWaz1OAe/MUTaBSXTYC7vJLDUcEzIlKkvVGk6n1AZoSkJDv/g6qskHHzRuOI7fhStny1SA1+C6g= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(39860400002)(366004)(346002)(136003)(376002)(55236004)(4326008)(26005)(6506007)(76116006)(83380400001)(66446008)(9686003)(71200400001)(478600001)(110136005)(66556008)(66476007)(2906002)(86362001)(52536014)(55016002)(33656002)(8936002)(54906003)(38100700001)(8676002)(66946007)(186003)(5660300002)(107886003)(316002)(64756008)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?XU8K1n1dl2MhlWtoLRKt1htgTCpH4mVby9Rd3gEpgGTXivzdgix9pQLAWSv+?= =?us-ascii?Q?ZxsxJ7G3A2u7RsRurUICULLzleWo3JiPOPeWL65wT1miDH9kpBshpjGcDjm4?= =?us-ascii?Q?77kPaVvHog2p/PhitaS2+Yi6keLhUEUFbOF6TmE3p5WyLV5y6UWGqgUqAcMb?= =?us-ascii?Q?PFmRw05regrNDnsncOuisjCZZ04EnGHAYkwI4T1NcHs87Ur0RV39ixEPLgyz?= =?us-ascii?Q?xj6u//zih974xdNl4X2XdDYhuuwulFa+RqXMrtMe/sFUFOg7w5Gs6xRRlWKA?= =?us-ascii?Q?VEi5OqzwS1/StMNY+NqSo8KXStJn1pPgAnHi4lWeJnpRHXJZsbkXr4lriK+U?= =?us-ascii?Q?zah+6PRrcpZPAmHbCsBcNmCI4vIeqybNLYex3EQ0itGmLlw4/BTRTad+Szmd?= =?us-ascii?Q?Nlfnk8Sn/V6MxQfbZ3NcrMMhmp3323SxQvFQ3o2rSBPah4YlsHLc2nnQk6mA?= =?us-ascii?Q?jFQb5TLbjcUzbYwNJ1EX+fRRrkm2P7J7sSN//nAVfAx8UCYKQAc0yFwrlZSd?= =?us-ascii?Q?ccftgt7DaUGJAwxAc/qcbJVACtJWKih+P0V0ym/ZXDZug/h3QjRZf9GnsOse?= =?us-ascii?Q?DK0ZHECbdp9tjtBgHq8kUw1BKSFzbhU09WCjuOKiusRmqWOLzxGiPhS+uq6h?= =?us-ascii?Q?TlDFdW7gU/tuTCNMPx6VqJn05dBwK3ETVXc/TQkUyUEJvTuKiHT2n5eMG32F?= =?us-ascii?Q?smvHehj38xo9cZU1RE0tl+bYDGUUMitdYcTRNBZUqSv+I42jUXIkuCnVNapM?= =?us-ascii?Q?O/A6c1ZbsaLfcsSdIy5rGDG5c9V3Nj95Os3YJFjibqQonYpuUdcbaq5YzcuT?= =?us-ascii?Q?kT0wErjxYre048VpSqcjVbdBxUWs1tAQEo+QpxNcd4bnOse6+POFieqqGjsR?= =?us-ascii?Q?91iaZ7VspgDObMWLTyJbS+WxotJhQje8qSfAiHOamM+RFGrtzrFv4ZZANOy1?= =?us-ascii?Q?Rg0k9E4ddFsTJAxGLkJ4zS2TE11lqEXXMSHLEOjkrtozkqXahjJbrS+WjAiH?= =?us-ascii?Q?tAvj7jo+tKUjBVADRm0aeicT4gOj5mkZyQmXien0xx6Anqlsihqm0PUvHRHs?= =?us-ascii?Q?S3VNYtNn0Zpa6bCVOfDsYaKd5IdpR8UcwbOrN31uo3iZJo5LURqa6IKXX47q?= =?us-ascii?Q?H1eYiDt/xfE4t7NewkXV7CzO69lBKKJ2lJNahs/EscF6RGOJB5VqGJahQ2aT?= =?us-ascii?Q?fmobvm9uNnRhllSfhgfvlgLl3EJQF0b2UbIMSN59T/5ldbcdCoAbQapVpjcz?= =?us-ascii?Q?llY79NuPBwfNSPQos6cexttma03wjkSRMaz2bvZwUU20ZTHzua9UU2lu6ZDf?= =?us-ascii?Q?z1AyBKEI1OL3R70b321CeR4j?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67fed159-e6c0-4910-cde1-08d8fa8820f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2021 12:16:24.6575 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vJ0bbopygsW14SW3r8F6pFAI+qNih2DHDlxOkMOA0s+gq9D6a4jUXXt+gY4xczgSiFMmw53rd2tfJfm4dX4w6+q9iQFSia5sbq1/RWw2vEE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4491 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/5] net/tap: do not touch Tx offload flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 > On Thu, Apr 08, 2021 at 09:41:59AM +0200, Olivier Matz wrote: > > On Wed, Apr 07, 2021 at 05:15:39PM -0300, Flavio Leitner wrote: > > > On Thu, Apr 01, 2021 at 11:52:40AM +0200, David Marchand wrote: > > > > Tx offload flags are of the application responsibility. > > > > Leave the mbuf alone and check for TSO where needed. > > > > > > > > Signed-off-by: David Marchand > > > > --- > > > > > > The patch looks good, but maybe a better approach would be > > > to change the documentation to require the TCP_CKSUM flag > > > when TCP_SEG is used, otherwise this flag adjusting needs > > > to be replicated every time TCP_SEG is used. > > > > > > The above could break existing applications, so perhaps doing > > > something like below would be better and backwards compatible? > > > Then we can remove those places tweaking the flags completely. > > > > As a first step, I suggest to document that: > > - applications must set TCP_CKSUM when setting TCP_SEG >=20 > That's what I suggest above. >=20 > > - pmds must suppose that TCP_CKSUM is set when TCP_SEG is set >=20 > But that keeps the problem of implying the TCP_CKSUM flag in > various places. >=20 > > This is clearer that what we have today, and I think it does not break > > anything. This will guide apps in the correct direction, facilitating > > an eventual future PMD change. > > > > > diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mb= uf_core.h > > > index c17dc95c5..6a0c2cdd9 100644 > > > --- a/lib/librte_mbuf/rte_mbuf_core.h > > > +++ b/lib/librte_mbuf/rte_mbuf_core.h > > > @@ -298,7 +298,7 @@ extern "C" { > > > * - if it's IPv4, set the PKT_TX_IP_CKSUM flag > > > * - fill the mbuf offload information: l2_len, l3_len, l4_len, tso= _segsz > > > */ > > > -#define PKT_TX_TCP_SEG (1ULL << 50) > > > +#define PKT_TX_TCP_SEG (1ULL << 50) | PKT_TX_TCP_CKSUM I think that would be an ABI breakage. > > > > > > /** TX IEEE1588 packet to timestamp. */ > > > #define PKT_TX_IEEE1588_TMST (1ULL << 51) > > > > I'm afraid some applications or drivers use extended bit manipulations > > to do the conversion from/to another domain (like hardware descriptors > > or application-specific flags). They may expect this constant to be a > > uniq flag. >=20 > Interesting, do you have an example? Because each flag still has an > separate meaning. =20