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 3128241B89; Tue, 31 Jan 2023 06:21:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20D5840EF0; Tue, 31 Jan 2023 06:21:52 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 340E741138 for ; Tue, 31 Jan 2023 06:21:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675142510; x=1706678510; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=IoNfSpGW+to5V3tDrg5vfzVrXDGtkIhde7PNiOJ2BP4=; b=gLGE3AcrhSScg3N1epZ2lzdNhd+JPFbLLscW4gvqKlm0rAl16RWrnndC 1CkN3hzzP0d2zcQ24FAecEOk6IbrbgkDRfN0K/vFBUV7/PIyhJ9KxNeEv Mnp8KCeCJSbyQodk+7GKEUHaTf8dgEhIYZTZAdV9HQCrDcvY30J8nt/PT vEBvfOcDtH/TIbGibOyYZ4OG6HKuOxj0EZiJY7T6KgbvHjIDAmUl55tVB Nbx5iJEcJfh2hKAc2PUAkwdBDVg3RUamAJfKO+WXec+oW+vqQTwkkTEsy 6rDKaNaBQ3RP9KwhbWyxpa2Yw/p4hDNDW87p/dfoaC3owd8Y1aqoPDEA1 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10606"; a="315716212" X-IronPort-AV: E=Sophos;i="5.97,259,1669104000"; d="scan'208";a="315716212" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2023 21:21:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10606"; a="909777736" X-IronPort-AV: E=Sophos;i="5.97,259,1669104000"; d="scan'208";a="909777736" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 30 Jan 2023 21:21:26 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 30 Jan 2023 21:21:25 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 30 Jan 2023 21:21:25 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 30 Jan 2023 21:21:25 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 30 Jan 2023 21:21:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bQhPRmwRJ3/B3bvKYDOppAZ6NESdc9DN90zFV4b3pbqdz1vnOH4cjDJwzW9hwfONqChbg0PsGf3pyEkLGzlOZG9ER2a+7U5PRmd+IP9frTnszq9Q5IBQiGWYAalXdSmTJkLL0C8hmjM4qkSpOLAvUXBcUIUtWUtB8h9xPmGyJfyBR4ezF0tmFRso0OsZjDqhnGqdiU2EEVHAl3F2M1UuG0KksTq6qYT5GF5R8xHzkunSsHg6FuSH2oI1nplz6Ut6bDLMneDYQjP5t7B/K5/+U7CbAL0znnz42zV7lT9fQxu4PVhTwTvDID0hkgN2vMq7m58cHdSnNnpAPdH0ZQ11MA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lUUOKUDD9ZSWKTsQXKIZJSZA4Ua4bVkcWQxz5vn4Dq0=; b=lJsEiZpm73kMNE/Zz3OrqLunVu7iAJSLszPztNH32p6TSyEdjYaC+/nA1xUefDCreBBO0ZWrztoAbaJ+kr5exWlcmj61NEOYN2nqwmdTnqmHNY7XugcWTqDpK5lST4Rml+E5p1GKHgWBt6JboStN8HvegDxjk2a9sABuYuVhltYwQATc4u2lo7Z/69L2Goxj9hh9Saotq73e323AvyytW1kR/xddLHLDYrBzMLQ3BBvxOA6EA1GfxJisLkOGeY+YLorq65bP9mPBy1dsfDJDBxIFngsApt82vkBj5CWdTsg/Ic6Ug6nWhsBUYhDhsB+0lLsngkvu9ET6xPA0xnoDjA== 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 Received: from SN6PR11MB3504.namprd11.prod.outlook.com (2603:10b6:805:d0::17) by SA2PR11MB5050.namprd11.prod.outlook.com (2603:10b6:806:fb::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Tue, 31 Jan 2023 05:21:21 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::c8f8:a3e1:5b23:a9c3]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::c8f8:a3e1:5b23:a9c3%5]) with mapi id 15.20.6043.036; Tue, 31 Jan 2023 05:21:21 +0000 From: "Xia, Chenbo" To: "Coquelin, Maxime" , "dev@dpdk.org" , "david.marchand@redhat.com" , "eperezma@redhat.com" Subject: RE: [PATCH v1 14/21] net/virtio-user: use proper type for number of queue pairs Thread-Topic: [PATCH v1 14/21] net/virtio-user: use proper type for number of queue pairs Thread-Index: AQHZBNRxhhUn/SOElE6WbcMrmgj+eK64XgLg Date: Tue, 31 Jan 2023 05:21:21 +0000 Message-ID: References: <20221130155639.150553-1-maxime.coquelin@redhat.com> <20221130155639.150553-15-maxime.coquelin@redhat.com> In-Reply-To: <20221130155639.150553-15-maxime.coquelin@redhat.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR11MB3504:EE_|SA2PR11MB5050:EE_ x-ms-office365-filtering-correlation-id: 98939722-277d-4082-9d17-08db034afd5e x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wl/SY8LceEZ2Z82vum2Pjtn3MIdgsM8zTMx5nPLYd4HOzLWmbc6IAg5pXVznNTwzk+4tGCXK0AMH99BogpQCmNaIHZbkDF+CSFKS0OKITzKQzY/rrvDAQ+JLDkHgcIAlKKizQp9XnE/n+5YhsIGABZavOjq+/+nFxDtfkUR/0hKcH7XjVrCFBDvCZ2sk+UNuNafjpJDrOJINME13Qkh4Jc1OmOyPDB9wp8F8X+QYtpw1Rf7ggX8A00mM5FUrr+UCwdJIaKevEq92woBoVLsQ7WovVbOs4pXAVipi3hx/Lv9txGlOlkpxC7k9oJL+dPaYrBRtAV+8vh56E1ueDfKU/KiPLqDQkwZPhOL7gTZxLzsJ1TnW2EXgfCplOyNTHdU7mxN3quLW9e5vvOATOQLoIw67ODzfbnvw03yz0sTm2GSlSAA5rTLE9m+SJwEKF3nZI44kgCN1vM9R79p8uEy/5rwrTdkcHsSeJE0iNHnjq1F7wm7X6xAo+AUXWcY/pvzs+usi0uzyFYt3p4rl9jMWJPbDoou7OxdbZWslXd7KmSH/k2dkNqk71XYq8d4YWGfgSbwNi3wEbr8u1Ml5SYLb0ZAKVQJlKMBMwOOn9z/w+pPWlKSI8thKnaLTPwItBY/viAFISGO1gRnc6xUVGT20Cbdex5QHkURPaW2rdpsLX5JehX1FYAbO962HIwA6jknSApnyYiCIaKDnF2ykEFANGQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3504.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(376002)(366004)(136003)(396003)(346002)(39860400002)(451199018)(122000001)(110136005)(71200400001)(7696005)(33656002)(82960400001)(5660300002)(83380400001)(53546011)(55016003)(6506007)(38100700002)(316002)(52536014)(41300700001)(2906002)(86362001)(8936002)(38070700005)(9686003)(26005)(186003)(8676002)(478600001)(76116006)(64756008)(66556008)(66946007)(66476007)(66446008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Ko8Ejp9sZZIV9z00YfhkJ4nmcusiEkWOpFKEd2ubu3f5AjZA/UtVGII9mMlA?= =?us-ascii?Q?EhZJCDLpbTt+Dm+AnP8i6X/PXK+mz300zrROcTpJ+kQpaRGuo+C74JEsVz+C?= =?us-ascii?Q?xznnb57Zm29/6Bc/NE2O9nAHKdSL+JcW6rqwQwyhClYyXV4xN2N+Dg1Ud/sw?= =?us-ascii?Q?VgJARvfLSnVc8nhTA3epoIN+33NGzv0B/5lCrtzZc4y3dPQ7Qsf/1Dhii7dp?= =?us-ascii?Q?jB5m288m7JCCw8AfFU8JJfXH7E0h94Jr5h5RnUY1DeyDhw7Kau1QHMcnq4/m?= =?us-ascii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HD6WbFFjB0ceTE3BKLsoP?= =?us-ascii?Q?TkEtt0AdNkt8/WN16IGcramGu5KZDuN+zCBHgDTo0mLohnJAzbZajwn7a+Rq?= =?us-ascii?Q?O1D78Ulo7e8MNR4RCi/JQKUW4T5vHI3vKSWmgq9OUo2hUMYnkIxVrDZH2xlA?= =?us-ascii?Q?5PDMuHOyrpU7ZI1AbIJkC4ctRnbp8N3mOHe9/+QxEMN28nQdI7ozJT6wGUbB?= =?us-ascii?Q?EeS706lIe/3Tjqib4z9p10rWSb27HwSaa6RvYh8E62u+1crZm5eXdczx4yJY?= =?us-ascii?Q?pSQSuZsFS1CIoHLJIWyCRuwGfrYb0Lk/PqFT4iLEWaDSHYs84sjb2S/ym8Xx?= =?us-ascii?Q?ouii2uTS5HLHxX5rEmWHUqOvAj4flPwxDnRxE3/D9QC16IDKRQCyKTQmq+Al?= =?us-ascii?Q?9TubeElPZ6oCBA3yRymZ1/9SxYwKOANKPlbEh5+j?= 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: SN6PR11MB3504.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98939722-277d-4082-9d17-08db034afd5e X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2023 05:21:21.6044 (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: AFHm6s7oyUXkqAi3H8hvud3evm5dBrcN1uz6y31R8RyJlW7WKz4Ey8ZfpgyniAmVleK3lns4BM5ZXUhMl/Hrkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5050 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Maxime Coquelin > Sent: Wednesday, November 30, 2022 11:57 PM > To: dev@dpdk.org; Xia, Chenbo ; > david.marchand@redhat.com; eperezma@redhat.com > Cc: Maxime Coquelin > Subject: [PATCH v1 14/21] net/virtio-user: use proper type for number of > queue pairs >=20 > The number of queue pairs is specified as a 16 bits > unsigned int in the Virtio specification. >=20 > Signed-off-by: Maxime Coquelin > --- > drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +- > drivers/net/virtio/virtio_user/virtio_user_dev.h | 6 +++--- > drivers/net/virtio/virtio_user_ethdev.c | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c > b/drivers/net/virtio/virtio_user/virtio_user_dev.c > index 873c6aa036..809c9ef442 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c > @@ -553,7 +553,7 @@ virtio_user_dev_setup(struct virtio_user_dev *dev) > 1ULL << VIRTIO_F_RING_PACKED) >=20 > int > -virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues= , > +virtio_user_dev_init(struct virtio_user_dev *dev, char *path, uint16_t > queues, > int cq, int queue_size, const char *mac, char **ifname, > int server, int mrg_rxbuf, int in_order, int packed_vq, > enum virtio_user_backend_type backend_type) > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h > b/drivers/net/virtio/virtio_user/virtio_user_dev.h > index 819f6463ba..3c5453eac0 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.h > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h > @@ -32,8 +32,8 @@ struct virtio_user_dev { > int callfds[VIRTIO_MAX_VIRTQUEUES]; > int kickfds[VIRTIO_MAX_VIRTQUEUES]; > int mac_specified; > - uint32_t max_queue_pairs; > - uint32_t queue_pairs; > + uint16_t max_queue_pairs; > + uint16_t queue_pairs; > uint32_t queue_size; > uint64_t features; /* the negotiated features with driver, > * and will be sync with device > @@ -64,7 +64,7 @@ struct virtio_user_dev { > int virtio_user_dev_set_features(struct virtio_user_dev *dev); > int virtio_user_start_device(struct virtio_user_dev *dev); > int virtio_user_stop_device(struct virtio_user_dev *dev); > -int virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int > queues, > +int virtio_user_dev_init(struct virtio_user_dev *dev, char *path, > uint16_t queues, > int cq, int queue_size, const char *mac, char **ifname, > int server, int mrg_rxbuf, int in_order, > int packed_vq, > diff --git a/drivers/net/virtio/virtio_user_ethdev.c > b/drivers/net/virtio/virtio_user_ethdev.c > index 78b1ed9ace..6ad5896378 100644 > --- a/drivers/net/virtio/virtio_user_ethdev.c > +++ b/drivers/net/virtio/virtio_user_ethdev.c > @@ -655,7 +655,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *vdev) >=20 > dev =3D eth_dev->data->dev_private; > hw =3D &dev->hw; > - if (virtio_user_dev_init(dev, path, queues, cq, > + if (virtio_user_dev_init(dev, path, (uint16_t)queues, cq, > queue_size, mac_addr, &ifname, server_mode, > mrg_rxbuf, in_order, packed_vq, backend_type) < 0) { > PMD_INIT_LOG(ERR, "virtio_user_dev_init fails"); > -- > 2.38.1 Reviewed-by: Chenbo Xia =20