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 13600A3160 for ; Fri, 11 Oct 2019 11:37:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D20311EAB1; Fri, 11 Oct 2019 11:37:38 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00087.outbound.protection.outlook.com [40.107.0.87]) by dpdk.org (Postfix) with ESMTP id 100471EAA5 for ; Fri, 11 Oct 2019 11:37:37 +0200 (CEST) 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=KUjWV1a6EZoS8Q9NkZLo8s5H8BLLtc+jjmopG8i4PBA=; b=5M6kHhr+LIlik0VkUZc4L2LjOtsTxs8I0ySik4hzkR6mZ/EXhhZe3IKTAIoBS9wc4nsxHDG0Y+9KxH5z3aydiZivjHa2xAv33VuAifIRbAiXWPEnGXYB4zs425EmcygKAybPlpNdAzUXoPMDlhX7H/d8sc5PT9HspqdgA3Ue9ss= Received: from AM4PR08CA0075.eurprd08.prod.outlook.com (2603:10a6:205:2::46) by VI1PR0801MB1935.eurprd08.prod.outlook.com (2603:10a6:800:87::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.21; Fri, 11 Oct 2019 09:37:34 +0000 Received: from VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::209) by AM4PR08CA0075.outlook.office365.com (2603:10a6:205:2::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2347.21 via Frontend Transport; Fri, 11 Oct 2019 09:37:34 +0000 Authentication-Results: spf=temperror (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=none action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT043.mail.protection.outlook.com (10.152.19.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2305.15 via Frontend Transport; Fri, 11 Oct 2019 09:37:32 +0000 Received: ("Tessian outbound 927f2cdd66cc:v33"); Fri, 11 Oct 2019 09:37:30 +0000 X-CR-MTA-TID: 64aa7808 Received: from 65bea4303c29.2 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.14.56]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 475C79A0-C0E8-4728-AE83-17100731108A.1; Fri, 11 Oct 2019 09:37:25 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2056.outbound.protection.outlook.com [104.47.14.56]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 65bea4303c29.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 11 Oct 2019 09:37:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dTfVg5C9cba6Mp9HEnFu1rJVmDW6iRH1r4NS9QI/RIX7C0n0nQXEul4E91wjPkURkn/33YTwjKfE+XMDNzA1W6VXJVF+jqsNEYsldnuDDKA+Ftlj3WLE0Qk5DryvhKSf/uisxOp4vQEH5VOpuBW7Qr/rdTQoxs3ZjfwOlyS4CQHBdqOK39EW58gEnOyFpctKvT6HSAc2JWJnRdjA/fbfdJSpt0kFvFz49vVWZktTh6DRxakBJvv05ZxAum08qv2mJuSB7bPkmv57HkY4mLQS8MWdQkvWCapj+HqL1aSlRR+Sfoj7xy73pjrZpMo1RHPwooRCvdec5P5qkbVWKllMJg== 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=KUjWV1a6EZoS8Q9NkZLo8s5H8BLLtc+jjmopG8i4PBA=; b=F5DN3iPR0866FX1eirxwdSNZEHYh9vO3znIyWtHDo4byBk/3xRzgVLRouBp3ofRUWV6EfETrJrcPS9jWelkLtuzKjIgkzgYKq+W7qG6wkXy6Ihlg48IKPPa5K0JM1+32eqK+GNhezBVL4A3saxvoaZpD6MspE0CJ0/XFfpHM3NwQ6leFTpbUiKUpwiaPgGDFjFvejyEGF8WlSS1H0+nywOcvngAbdTkkvQw2mcuQd9IZdy3QM6gUl3HdZxquNzIpn/Zqb7wntq0Wt3fAxYk/r3pjm8jcEPTXK7Ep5waQcTmAF3CRNaU/euk4ngPO9Jcd9+W3+zyRYAK3mta5+s+Jrw== 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=KUjWV1a6EZoS8Q9NkZLo8s5H8BLLtc+jjmopG8i4PBA=; b=5M6kHhr+LIlik0VkUZc4L2LjOtsTxs8I0ySik4hzkR6mZ/EXhhZe3IKTAIoBS9wc4nsxHDG0Y+9KxH5z3aydiZivjHa2xAv33VuAifIRbAiXWPEnGXYB4zs425EmcygKAybPlpNdAzUXoPMDlhX7H/d8sc5PT9HspqdgA3Ue9ss= Received: from VI1PR08MB5376.eurprd08.prod.outlook.com (52.133.244.200) by VI1PR08MB3567.eurprd08.prod.outlook.com (20.177.61.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.18; Fri, 11 Oct 2019 09:37:23 +0000 Received: from VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::f8ea:be13:4728:f5fc]) by VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::f8ea:be13:4728:f5fc%4]) with mapi id 15.20.2347.016; Fri, 11 Oct 2019 09:37:23 +0000 From: "Gavin Hu (Arm Technology China)" To: Xiaoyun wang , "ferruh.yigit@intel.com" CC: "dev@dpdk.org" , "xuanziyang2@huawei.com" , "shahar.belkar@huawei.com" , "luoxianjun@huawei.com" , "tanya.brokhman@huawei.com" , "zhouguoyang@huawei.com" , Honnappa Nagarahalli , "Joyce Kong (Arm Technology China)" , nd , nd Thread-Topic: [dpdk-dev] [PATCH v4 01/19] net/hinic/base: add mbox command channel for SRIOV Thread-Index: AQHVf3hwVap0EYWskk2fBtpJxWN4o6dVKL6Q Date: Fri, 11 Oct 2019 09:37:23 +0000 Message-ID: References: <3af55481f2d4102e230c371a2eed56fdb527e444.1570718029.git.cloud.wangxiaoyun@huawei.com> In-Reply-To: <3af55481f2d4102e230c371a2eed56fdb527e444.1570718029.git.cloud.wangxiaoyun@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 263e7104-f14f-47aa-8e89-1991139cc4b0.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-Correlation-Id: 0b9563f2-dc0e-4d80-7e27-08d74e2ea41e X-MS-Office365-Filtering-HT: Tenant X-MS-TrafficTypeDiagnostic: VI1PR08MB3567:|VI1PR08MB3567:|VI1PR0801MB1935: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; x-forefront-prvs: 0187F3EA14 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(346002)(376002)(366004)(39860400002)(199004)(189003)(13464003)(7736002)(71190400001)(305945005)(71200400001)(3846002)(478600001)(74316002)(6116002)(54906003)(110136005)(2906002)(6246003)(316002)(25786009)(33656002)(76116006)(26005)(64756008)(66446008)(186003)(66946007)(66476007)(66556008)(86362001)(7696005)(5660300002)(102836004)(6506007)(53546011)(55236004)(11346002)(8936002)(446003)(4326008)(2501003)(76176011)(486006)(9686003)(6436002)(476003)(99286004)(256004)(14444005)(14454004)(81156014)(81166006)(52536014)(55016002)(66066001)(229853002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3567; 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: TQ4mpark+zuRIsj3OZrVAVtv8HuARN0n4LWOxN7b62QVjVjH6fYuyeefDZQ5EYKQpKjkV2hSvwvYGEJswFupIbuJ8Uuz1NVfoEQs96fAtZer3L+qMCiB6W2ji9+4RKB1bRySTAryx2IqawfOC3oC7lMAygtPPgnNsT3fFJUfvNdOhKiDKiH2S9Ys59nEc3EZCorBmUlfURzyetHkFoBil9PZqQrvfVroa7jDoC0ga+UKiiq+4udwMBPQnEaIos3VCaHhyZa2gqjqyFWczmpFpszJn/6QvPsvDVXYNL/qD0PBGq+CV15Ju5k08wAt88teB/rHRmF+5JkQ/dJ+C2dTeAXrookf0iZbLhMo07EA6/UvR2YCboaV5spzMVR2pqAnz0Q/kcetfgi7r7UrYKHRrMhkeIm3KvVNGgq9/ddhk9I= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3567 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT043.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)(136003)(396003)(346002)(39860400002)(189003)(199004)(13464003)(22756006)(486006)(14444005)(63350400001)(47776003)(74316002)(126002)(66066001)(99286004)(7696005)(33656002)(102836004)(76176011)(6506007)(53546011)(97756001)(7736002)(81156014)(86362001)(81166006)(186003)(336012)(356004)(8936002)(8746002)(305945005)(26005)(55016002)(54906003)(110136005)(26826003)(4326008)(316002)(5660300002)(46406003)(478600001)(3846002)(6116002)(76130400001)(23726003)(70586007)(9686003)(52536014)(2906002)(2501003)(446003)(11346002)(476003)(229853002)(36906005)(6246003)(50466002)(25786009)(70206006)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1935; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:TempError; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 9f2b631b-5505-401c-0077-08d74e2e9edc NoDisclaimer: True X-Forefront-PRVS: 0187F3EA14 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mTviHpWAJOev7u2kR2A55H7x6U27AA6nZUbqczvXF3YL68UM8kX1CSlgZhtYQesW9Vz+QuONvBhUVitaQbOBw9Fq5Nav37h2wEUSv0v+UklbbQVZdoxfNNcv/Rxu7myc31y/WEWppVftjQE/tA2qq3YZr+1LrkHGeemsWZUgOEFS2Q/USB9oA7u17qJE6RZwcUO3hD94VjEPuMp2KElyXN7AgHUt2pe4iTMy11gXzFuJk9OPWvBs2z+SJwPLTBJiugvW2bVL1QX7jKDmOiZZP/1XYff7YvxQdiB3TgPz2TNwN14zoGTpzXT53dIJompLD4BM0tKiQD9nByyFEGwjiup0iBuMXLICGAWQEfA6ZbW3LwuPeK2y/Dn7ICWAgwurLjwuu8AsLOayEf9+WSaFu9hFIQ1pfPQ+LKAe5FNx7sM= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2019 09:37:32.4087 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0b9563f2-dc0e-4d80-7e27-08d74e2ea41e 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: VI1PR0801MB1935 Subject: Re: [dpdk-dev] [PATCH v4 01/19] net/hinic/base: add mbox command channel for SRIOV 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 Xiaoyun, Please pay attention to the coding style issue, and some other inline comme= nts. For the bit operation functions, we are consolidating the bit operations fu= nctions into a common eal API family, when it is ready, the cpu_to_be32 and vice versa APIs scattered here and there can be replace= d with the common one. This can largely reduce code duplications. The work was started and is ongoing, I do= n't intend to block the proceeding of your patches,=20 Just keep an eye on it and please do the replacement after the common bit A= PIs are accepted. /Gavin > -----Original Message----- > From: dev On Behalf Of Xiaoyun wang > Sent: Thursday, October 10, 2019 10:52 PM > To: ferruh.yigit@intel.com > Cc: dev@dpdk.org; xuanziyang2@huawei.com; shahar.belkar@huawei.com; > luoxianjun@huawei.com; tanya.brokhman@huawei.com; > zhouguoyang@huawei.com; Xiaoyun wang > > Subject: [dpdk-dev] [PATCH v4 01/19] net/hinic/base: add mbox command > channel for SRIOV >=20 > Add mbox command channel for SR-IOV, which is used to > communicate between VF and VF, VF and PF. This patch > introduces data structures, initialization, interfaces > and commands of mbox channel. >=20 > Signed-off-by: Xiaoyun wang > --- > doc/guides/nics/features/hinic.ini | 1 + > doc/guides/nics/hinic.rst | 1 + > drivers/net/hinic/Makefile | 1 + > drivers/net/hinic/base/hinic_compat.h | 36 +- > drivers/net/hinic/base/hinic_pmd_hwdev.h | 5 +- > drivers/net/hinic/base/hinic_pmd_mbox.c | 937 > +++++++++++++++++++++++++++++++ > drivers/net/hinic/base/hinic_pmd_mbox.h | 93 +++ > drivers/net/hinic/base/meson.build | 1 + > 8 files changed, 1070 insertions(+), 5 deletions(-) > create mode 100644 drivers/net/hinic/base/hinic_pmd_mbox.c > create mode 100644 drivers/net/hinic/base/hinic_pmd_mbox.h >=20 > diff --git a/doc/guides/nics/features/hinic.ini > b/doc/guides/nics/features/hinic.ini > index fe063d6..c858411 100644 > --- a/doc/guides/nics/features/hinic.ini > +++ b/doc/guides/nics/features/hinic.ini > @@ -19,6 +19,7 @@ RSS hash =3D Y > RSS key update =3D Y > RSS reta update =3D Y > Inner RSS =3D Y > +SR-IOV =3D Y > CRC offload =3D Y > L3 checksum offload =3D Y > L4 checksum offload =3D Y > diff --git a/doc/guides/nics/hinic.rst b/doc/guides/nics/hinic.rst > index c9329bc..c3ce101 100644 > --- a/doc/guides/nics/hinic.rst > +++ b/doc/guides/nics/hinic.rst > @@ -24,6 +24,7 @@ Features > - Link state information > - Link flow control > - Scattered and gather for TX and RX > +- SR-IOV - Partially supported at this point, VFIO only >=20 > Prerequisites > ------------- > diff --git a/drivers/net/hinic/Makefile b/drivers/net/hinic/Makefile > index 42b4a78..20a338e 100644 > --- a/drivers/net/hinic/Makefile > +++ b/drivers/net/hinic/Makefile > @@ -59,6 +59,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) +=3D > hinic_pmd_mgmt.c > SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) +=3D hinic_pmd_niccfg.c > SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) +=3D hinic_pmd_nicio.c > SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) +=3D hinic_pmd_wq.c > +SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) +=3D hinic_pmd_mbox.c >=20 > SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) +=3D hinic_pmd_ethdev.c > SRCS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) +=3D hinic_pmd_rx.c > diff --git a/drivers/net/hinic/base/hinic_compat.h > b/drivers/net/hinic/base/hinic_compat.h > index f599947..fe26aad 100644 > --- a/drivers/net/hinic/base/hinic_compat.h > +++ b/drivers/net/hinic/base/hinic_compat.h > @@ -121,9 +121,7 @@ static inline int hinic_test_bit(int nr, volatile uns= igned > long *addr) > { > int res; >=20 > - rte_mb(); Why is the barrier removed?=20 If the barrier is moved outside, it should also be reflected in the commit = log, as this is a critical change.=20 /Gavin > res =3D ((*addr) & (1UL << nr)) !=3D 0; > - rte_mb(); Ditto. > return res; > } >=20