From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 71D15A0530; Wed, 12 Feb 2020 07:02:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5699C262E; Wed, 12 Feb 2020 07:02:33 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150050.outbound.protection.outlook.com [40.107.15.50]) by dpdk.org (Postfix) with ESMTP id 446CB2629 for ; Wed, 12 Feb 2020 07:02:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BlPrrFlNFpSqOLIyKKWkPlUdrLsJlqW/jbDKnIkqgFY=; b=CYevCNHVDJziXyM8d/irua1JgXiciZ+nlNSROa3uESW0e/z6MriLHmDPBB8IgqxSCZN4nAx3BOctoHOsT/JC0sumuICNFsZlSAQhMVKtNeRuR0fXHYRpHDhPuDRlT6M68/YG5Jqs6d11vf1Fmy2Jr0xJNMnQHDtIZPaOy5K2JGA= Received: from VI1PR08CA0258.eurprd08.prod.outlook.com (2603:10a6:803:dc::31) by VI1PR08MB3022.eurprd08.prod.outlook.com (2603:10a6:803:41::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.28; Wed, 12 Feb 2020 06:02:29 +0000 Received: from AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::205) by VI1PR08CA0258.outlook.office365.com (2603:10a6:803:dc::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.23 via Frontend Transport; Wed, 12 Feb 2020 06:02:28 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT039.mail.protection.outlook.com (10.152.17.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18 via Frontend Transport; Wed, 12 Feb 2020 06:02:28 +0000 Received: ("Tessian outbound 62d9cfe08e54:v42"); Wed, 12 Feb 2020 06:02:28 +0000 X-CR-MTA-TID: 64aa7808 Received: from a410971a7bfa.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EB47679C-9DE1-45C2-8167-CCFB227376EA.1; Wed, 12 Feb 2020 06:02:23 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a410971a7bfa.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 12 Feb 2020 06:02:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MXhtwG6N0t8GSzefAJF7aWLy0MAxmewSbp5nVhHX57ZL5Igv1PLIreThe/iS82+FK3li+CsFhcPRV6EHvWbax9hU1wS5kNT18kSfHQGYHfzRFtHxrgVHU/NC3UoK+E+COOTunNNv+AuUwXeTtbQpSqMwp1Gk5+d5/woJ/qiYNs+QcL/pDoCQMXRkaf3A+fjn+FYTUDN0Hz4S30A4lAJAhQycUktTaCU4Oy26t/abg4vD+XnjieM/EPZPJx8AQZmhGLxfRpKQmHDQAaBZbyEIgXWlr5QsZCZ74D3eCMGIhUkuGoRY88xoKAafwr1XZxHWm0EJegwtRtAW71O6AF5fPw== 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=BlPrrFlNFpSqOLIyKKWkPlUdrLsJlqW/jbDKnIkqgFY=; b=aH68xLuGitWtDKavUuVQ56fw6rQN8H/ZI7NxLTX2KWM94ALvhYRJukadEb1sTskE3LAz/SsacBFWAO2d7jZ6H4y/Gk7eSt83ikff/NZkJvfTKkZRly518+hF8qniEWQJTCefi+8g154CBn7zRNWdW1gP+nw0Q9zOaEEGL4dNZhhBOHrkuoWjmuSLK5elRrpcWCA7YbDPPYkPYiPHUbZ+Ok6m770htID6BPSzsNyOWH6qNDEaGKcKWu7hDlok3dtSipxI3rjyMV711RwJDAL2b2+U+PH2zXrAjVJ5eRiPTZPNep9uETOIc61kzARDiYqlpOKwWlwdZcbIJ+DdHamX+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BlPrrFlNFpSqOLIyKKWkPlUdrLsJlqW/jbDKnIkqgFY=; b=CYevCNHVDJziXyM8d/irua1JgXiciZ+nlNSROa3uESW0e/z6MriLHmDPBB8IgqxSCZN4nAx3BOctoHOsT/JC0sumuICNFsZlSAQhMVKtNeRuR0fXHYRpHDhPuDRlT6M68/YG5Jqs6d11vf1Fmy2Jr0xJNMnQHDtIZPaOy5K2JGA= Received: from VI1PR08MB5376.eurprd08.prod.outlook.com (10.255.196.79) by VI1PR08MB3088.eurprd08.prod.outlook.com (52.134.31.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.23; Wed, 12 Feb 2020 06:02:19 +0000 Received: from VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::e080:9698:5896:6837]) by VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::e080:9698:5896:6837%5]) with mapi id 15.20.2707.030; Wed, 12 Feb 2020 06:02:19 +0000 From: Gavin Hu To: Ye Xiaolong CC: "dev@dpdk.org" , nd , "david.marchand@redhat.com" , "thomas@monjalon.net" , "rasland@mellanox.com" , "maxime.coquelin@redhat.com" , "tiwei.bie@intel.com" , "matan@mellanox.com" , "shahafs@mellanox.com" , "viacheslavo@mellanox.com" , "arybchenko@solarflare.com" , "stephen@networkplumber.org" , "hemant.agrawal@nxp.com" , "jerinj@marvell.com" , "pbhagavatula@marvell.com" , Honnappa Nagarahalli , Ruifeng Wang , Phil Yang , Joyce Kong , Steve Capper , nd Thread-Topic: [dpdk-dev] [PATCH v3] net/i40e: relaxed barrier in the tx fastpath Thread-Index: AQHV3ocIyXwuMAwnUEmwK1Nx2EWbcqgVQ/6AgAHSpdA= Date: Wed, 12 Feb 2020 06:02:19 +0000 Message-ID: References: <1571758074-16445-1-git-send-email-gavin.hu@arm.com> <20200208134808.212027-1-gavin.hu@arm.com> <20200211021109.GH80720@intel.com> In-Reply-To: <20200211021109.GH80720@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: e4a4c455-157c-4ef4-8537-7b444a878732.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 73cf520b-965e-4c85-c81a-08d7af81241a X-MS-TrafficTypeDiagnostic: VI1PR08MB3088:|VI1PR08MB3088:|VI1PR08MB3022: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:6430;OLM:6430; x-forefront-prvs: 0311124FA9 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(136003)(346002)(376002)(366004)(396003)(39860400002)(199004)(189003)(71200400001)(7696005)(6916009)(33656002)(186003)(4326008)(2906002)(9686003)(54906003)(316002)(55016002)(81156014)(6506007)(55236004)(53546011)(26005)(478600001)(8676002)(66446008)(8936002)(52536014)(5660300002)(7416002)(966005)(66556008)(86362001)(66476007)(64756008)(81166006)(76116006)(66946007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3088; H:VI1PR08MB5376.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: dMKwDtJagW6TyH0j96ngBmYymeJ6bdpWcaaPU3xRlYGVcIOJ00ZMEdy3f8MkZBfD0pCTtpaONgToQerlAGM025sQi1K6JoqhDSIQhcWslHIZxxaHkopvQvIuk/9+dvA+qzO+63kDU4Le6FnQ3WE5BUy/2ICW6tTjuqByGFBs+FsX5OUsCTrgs42agVVqxFoBdbsOWi4dYcNkOdlPTHgy4UJUNLGsK/Q6vmp+2KHNnqt3UTktJwhgvDMdIEMwFoYCvHja6159DkfiqZ8T+LHww6Rbioo5ALdSoO2ygxVheSMBKPWTmohvF20Fa6ZMLvmTxjkDppWLebmOjh/G2H0hznwC5CowL7iJHDceiCU7yarR7xVrsnqT9Z2wf0EebIWmnt06cSqgWWyIDo3YZ50WgkrJnQsS9TnIIBXP/0uTkh9yUq/lceOn+PhfzyjCH0QLs2T1lOQWUT/FRIZttdc8LPiXZ54nab+yXOerB23056LGd4wQYjTFuRf5pzNX9JwCF6fjLhGs1bxxWmF7VvqYiA== x-ms-exchange-antispam-messagedata: 8kvb689F7aeEcOgCTM2tp3U8FEHvxoq4xGCnH4wQMjhLB+0Fe5h7Mh6ymXhaW1btEZtZJa0kS7gFANQiskLTd/WdlqbxPZu/2lM5spUuowGVpIgoPNpYeAFdbRCxWfSzs1b0ITzxhwCNNm+fLjui6Q== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3088 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(376002)(346002)(396003)(136003)(39860400002)(199004)(189003)(86362001)(8936002)(33656002)(6506007)(53546011)(186003)(5660300002)(54906003)(26005)(52536014)(70206006)(70586007)(81166006)(8676002)(9686003)(81156014)(36906005)(6862004)(4326008)(356004)(7696005)(55016002)(2906002)(336012)(26826003)(966005)(316002)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3022; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: b88bee94-94af-4e97-5962-08d7af811eb3 X-Forefront-PRVS: 0311124FA9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /8LLirs84oxCr4dCSZpvoUDgMQ4XX6AciFBiudNdiF6n1sGcKXoE66lT7X1q2lo0HERLFKx2jKIlmew0Zxue92XBHrz5YTN2YWoA6w7lass8T/0m2lYQc37m2mMbcA2I1buth3isZ3EfJSAxnSh6BJkF51LIsGPoYfTG3fDS9nkX7NEiIpP209+fs3cMFMy9XwU2+4GGfB2I5/YLVqm8CSfkX5qREpuTraW5Ad9ZybX4P1wiEe1f/Az9s+p6v1c6Kqo4Q+F19Vq/fl6IsTPK023YrqRe5axELYdeAZmlt0LxgGWsWseYuSm5S/VKR1nDpdRtD/gZiBJAOcM0VOMeQdEaGXsRh6KbdSifZx7AwA6cI/dDFGa0vSXkLz7wipA6oEuztG5pQd78FerMY+zQ/X7wNDBgSSCMshKytzKxwCpM3RYCIJ1SGiFUNFs1fEiD3cYukOEGA4q7BPZOgmqOl/EC42kmlL1NRfFqB5lWifNV1bOn3ysKYS7Z0HIH16UvqL0lurFQNTP5JY0XaVkrHA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2020 06:02:28.6520 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73cf520b-965e-4c85-c81a-08d7af81241a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3022 Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: relaxed barrier in the tx fastpath 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Xiaolong, Just sent v4 for this, thanks for reminding! Best Regards, Gavin > -----Original Message----- > From: Ye Xiaolong > Sent: Tuesday, February 11, 2020 10:11 AM > To: Gavin Hu > Cc: dev@dpdk.org; nd ; david.marchand@redhat.com; > thomas@monjalon.net; rasland@mellanox.com; > maxime.coquelin@redhat.com; tiwei.bie@intel.com; matan@mellanox.com; > shahafs@mellanox.com; viacheslavo@mellanox.com; > arybchenko@solarflare.com; stephen@networkplumber.org; > hemant.agrawal@nxp.com; jerinj@marvell.com; > pbhagavatula@marvell.com; Honnappa Nagarahalli > ; Ruifeng Wang > ; Phil Yang ; Joyce Kong > ; Steve Capper > Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: relaxed barrier in the tx > fastpath >=20 > Hi, Gavin >=20 > Please help add the Fixes tag and cc stable. >=20 > Thanks, > Xiaolong >=20 > On 02/08, Gavin Hu wrote: > >To keep ordering of mixed accesses, rte_cio is sufficient. > >The rte_io barrier is overkill.[1] > > > >[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9 > >qf0Kpn89EMdGDajepKoZQ@mail.gmail.com > > > >Signed-off-by: Gavin Hu > >--- > >V3: > >- optimize the barriers in the fast path only, leave as it is for the > > barriers in the slow path and control path > >- drop the virtio patches from the list as they are in the control path > >- it makes more sense to relax the barrier in the fast path, at the PMD = level. > > relaxing the fundamental rte_io_x barriers APIs requires scrutinizatio= ns > for > > each PMDs which use the barriers directly or indirectly. > >V2: > >- remove virtio_pci_read/write64 APIs definitions, they are not needed a= nd > generate compiling errors like " error: unused function 'virtio_pci_write= 64' [- > Werror,-Wunused-function]" > >- update the reference link to kernel source code > >--- > > drivers/net/i40e/i40e_rxtx.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > >index fd1ae80da..8c0f7cc67 100644 > >--- a/drivers/net/i40e/i40e_rxtx.c > >+++ b/drivers/net/i40e/i40e_rxtx.c > >@@ -1248,7 +1248,8 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf > **tx_pkts, uint16_t nb_pkts) > > (unsigned) txq->port_id, (unsigned) txq->queue_id, > > (unsigned) tx_id, (unsigned) nb_tx); > > > >- I40E_PCI_REG_WRITE(txq->qtx_tail, tx_id); > >+ rte_cio_wmb(); > >+ I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id); > > txq->tx_tail =3D tx_id; > > > > return nb_tx; > >-- > >2.17.1 > >