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 3014842BC8 for ; Mon, 29 May 2023 03:41:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2430A4282D; Mon, 29 May 2023 03:41:48 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2125.outbound.protection.outlook.com [40.107.220.125]) by mails.dpdk.org (Postfix) with ESMTP id 42E7B410D7; Mon, 29 May 2023 03:41:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hbLQUhLiOtrf34Co8jeo2MVV+OQ5TCtzgJcXSRi6LmxmLefldzLBSI7PrvgiKs8en1x47LJbgZhr5hwaX9PeeSI0DjrFZsVFq4q0vvw4bcUMkug117KxT/YzKq6FMeoDG1CIfEFNriFMA421vsErBHDs714WJZYCwCUD6VAfQpNelUTtwfWq05cIRG2X111o496/FH+vqehdI78adraNqqhzqHDA/R+xoIoTJolhGD0uehJ2OiXGzDecK8Y4vuRWxSUpsC1gRhfEVaZbN+Sa3rqxYkMnWevtjw7uNVbxWQWuUePodk+o6yHhKTzNsGJRv/upGvINZRNP3SD19ksscg== 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=ImgTiHx3xqm9FnxrNlQaNGnhnqyUOea6n1rspJevopg=; b=UiiA9IAx0JaXlZo7S7gJ6+z6aw2Dkh8q2nl8DD0Tqj0cABW9r/jUFVn5XA4/kanOdAnyOHrEp5VmfXPWozE5dF0otuwvrVKwc+Jwa26Av+VbZCr6s+OZVXTeQyPfyh3vR+PaRvxpqTFTdyQRCB7SqFWdKicUKz+VEDs1Odgi8LGcxODnJgVSNbz+zsFjzYnr1PSh68V87VVyrOVe+zNj25MK6c2SATnsg8vyoCG8JbTC7tnZpirxq9lDfDvLyEhd4wlaDHvrLSRgJvnyz51EGsQ4Eg+FfP9npHFsu8iXag1CKI6N3Ue4xnZwQVgaoEl7loX7Ea9I+1JZbNaBW3V/lg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ImgTiHx3xqm9FnxrNlQaNGnhnqyUOea6n1rspJevopg=; b=WDzC+ZBtfm4mHdTT8Cld/lEZAIMUWZKaFYQ5EFE+ufXSjXo2TdlaXv1+CMv8QlpyXn7WaSzhTuTw+F7NWc4AUaw3oK5pNeGEJvJTnhLj2n3YtWKuo66uVSOMi1XvL4dakw4oVGSSeQcLN65RFbyfvsft3YzqO9H7dhA8VbL78Jo= Received: from BY5PR21MB1394.namprd21.prod.outlook.com (2603:10b6:a03:21c::20) by BY1PR21MB3894.namprd21.prod.outlook.com (2603:10b6:a03:534::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.12; Mon, 29 May 2023 01:41:40 +0000 Received: from BY5PR21MB1394.namprd21.prod.outlook.com ([fe80::b87e:bfdd:fbcc:ff3c]) by BY5PR21MB1394.namprd21.prod.outlook.com ([fe80::b87e:bfdd:fbcc:ff3c%6]) with mapi id 15.20.6477.004; Mon, 29 May 2023 01:41:40 +0000 From: Ajay Sharma To: Stephen Hemminger CC: Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" , Long Li , "stable@dpdk.org" , Ajay Sharma Subject: RE: [EXTERNAL] Re: EXTERNAL] [PATCH ] Add checks for the port capabilties Thread-Topic: [EXTERNAL] Re: EXTERNAL] [PATCH ] Add checks for the port capabilties Thread-Index: AQHZj2fOI4djbSgSZUK9vJcADHRod69r5h6AgASW1nA= Date: Mon, 29 May 2023 01:41:40 +0000 Message-ID: References: <1682653009-19988-1-git-send-email-longli@linuxonhyperv.com> <1683336767-19526-1-git-send-email-longli@linuxonhyperv.com> <20230525203049.638180a6@hermes.local> In-Reply-To: <20230525203049.638180a6@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=01f0b9fd-dd03-4e85-80d8-218663132fb5; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-05-29T01:35:42Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY5PR21MB1394:EE_|BY1PR21MB3894:EE_ x-ms-office365-filtering-correlation-id: a1f71f52-e729-4180-e822-08db5fe5d9b4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wFZFNqo25aFvBgSHGf2PAuer5iK30CXZFAFPsuRkRsWxOOpIqPVjxjUV+BV//BE8W7m748DMOA2mBuZVB3lQTvIueLzax/UEMIrn4rJ/jRkenfDboXHl5cwfgoHqUByoLqzx8TxyxA0+CKt5tvOas2nGrjhFw6lJrI23oU2meUk8UmCMqAulW/bx7MCmTYf0SUE/ORkMhFsLU6WT9uoNyZ+UDl4CCGhnFJdURG4fEhewXpNM/itq+vPWXhQhMpIMqV6ewBetV8UuOdC9DPuYK78txHWZCB/2fYLlomTjrTSTXTlLxU4KNY6hyKNLoc0MaVwscrRw9e305MA/LhtOvQQmZonvVAwFvvy9B3h+MfVF1OxYBij214kmZdBeCZRl30gUjLahEo8H9ejFLeiOFsC0QTQD3O/vi7FplBHOnjAJQAM3p43d5FTTVIidKMW1KvJi/vp3n90Xmsm85eDsADTSDsnPNPnboFuRu00Zf3FgNKT1Zw4rMo3HzXavWD4MXpwDUecGMiWbGS+W6A2QWBLx8K5ticG+flbXAmTR+UTu+GLZr6uTWAEGV4rajx0haOuy5xWWFXCOO7ZmH2irylNxmpGTwbALLZ77w2UYSzJx+Ain9G+XH5W47lVB4pGwJcWT7iCxefanqdLXrPZLF+yvnk2bcT29LjKs4owCtNg= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR21MB1394.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(366004)(136003)(346002)(376002)(396003)(451199021)(5660300002)(8936002)(52536014)(33656002)(8676002)(478600001)(10290500003)(54906003)(7696005)(786003)(71200400001)(316002)(55016003)(38100700002)(41300700001)(64756008)(66476007)(66556008)(76116006)(66946007)(66446008)(6916009)(4326008)(38070700005)(2906002)(82950400001)(82960400001)(186003)(8990500004)(86362001)(83380400001)(122000001)(53546011)(9686003)(107886003)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LchOui45D9F7aDL39mSG89u5Q1Jk/ZScTYKqgCa/ace49j84j5o59U+IvfK6?= =?us-ascii?Q?H3nah6m0qBKV8qi005T7lufui3OKy+aRY1XPNa5zsSHnaFAfz/Ph/BJVf1or?= =?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qDNrBLNXmIfU5calLE5q7xT?= =?us-ascii?Q?okqR5+gIewmlJxmbUtHiBZbovRQgd0IkCZwIBiEPGvI+fu6sj0VKGrEmaggp?= =?us-ascii?Q?5vKe9MusCWB0lh/6AeOjWPJJPb+RezssZ58y+VvJoLkzH6xodIJON3+UEAh2?= =?us-ascii?Q?p3ob5o4pJTvV9FStWTeCbZYdzV6Ir1edadM8KBd5+RNU5t2JeSDYDpw1UMca?= =?us-ascii?Q?j+07AVhhXBuAEGuH5+tOvGuCU7kGUkyvvrQsE0XfMUOfwZKVI/LZeN5x3I6O?= =?us-ascii?Q?WbGP1xcn+n+x4PQiPTOay5gmvBR5B3VPb7WQbyjrBMCYHqWjp1oFn+sVUxxF?= =?us-ascii?Q?HUx1SFmF7uF6tfhgiouVzf6PEmOZwCnFBGlu470jRtq0BFGCnaBj/4IP7vfO?= =?us-ascii?Q?2KJKaXoWartHG0wJT/8JIBNmxUGtjT91x7NFpPggbfRop7uIR+Z4zdOoyMPo?= =?us-ascii?Q?AHk6bgOTkd1aCe6rYI8BBuXeLLAewamyQsTk6bH/JIRrAkYVGxCwlsYFd7PP?= =?us-ascii?Q?KAkMuEGGjVqOPBM=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR21MB1394.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1f71f52-e729-4180-e822-08db5fe5d9b4 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2023 01:41:40.7127 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +a4hrSZiN1Jw4VqSAcjI6YG9mjOXv0UqvZ9NXMTgw2kjBopRxpPYtCMxbUtNSt4ouEATlNfKQGdui1j9fskCsiVS+dARgeRMxP65eDfM5q0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR21MB3894 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org >From 1290db88b8748085c9f09a58b336b8c757442b87 Mon Sep 17 00:00:00 2001 From: Ajay Sharma Date: Sun, 28 May 2023 18:31:59 -0700 Subject: [PATCH] Change USHRT_MAX to UINT16_MAX --- drivers/net/mana/mana.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 3a7e302c86..a39d6798bf 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -292,8 +292,8 @@ mana_dev_info_get(struct rte_eth_dev *dev, dev_info->min_rx_bufsize =3D MIN_RX_BUF_SIZE; dev_info->max_rx_pktlen =3D MAX_FRAME_SIZE; - dev_info->max_rx_queues =3D RTE_MIN(priv->max_rx_queues, USHRT_MAX= ); - dev_info->max_tx_queues =3D RTE_MIN(priv->max_tx_queues, USHRT_MAX= ); + dev_info->max_rx_queues =3D RTE_MIN(priv->max_rx_queues, UINT16_MA= X); + dev_info->max_tx_queues =3D RTE_MIN(priv->max_tx_queues, UINT16_MA= X); dev_info->max_mac_addrs =3D MANA_MAX_MAC_ADDR; @@ -335,17 +335,17 @@ mana_dev_info_get(struct rte_eth_dev *dev, /* Buffer limits */ dev_info->rx_desc_lim.nb_min =3D MIN_BUFFERS_PER_QUEUE; - dev_info->rx_desc_lim.nb_max =3D RTE_MIN(priv->max_rx_desc, USHRT_= MAX); + dev_info->rx_desc_lim.nb_max =3D RTE_MIN(priv->max_rx_desc, UINT16= _MAX); dev_info->rx_desc_lim.nb_align =3D MIN_BUFFERS_PER_QUEUE; - dev_info->rx_desc_lim.nb_seg_max =3D RTE_MIN(priv->max_recv_sge, U= SHRT_MAX); - dev_info->rx_desc_lim.nb_mtu_seg_max =3D RTE_MIN(priv->max_recv_sg= e, USHRT_MAX); + dev_info->rx_desc_lim.nb_seg_max =3D RTE_MIN(priv->max_recv_sge, U= INT16_MAX); + dev_info->rx_desc_lim.nb_mtu_seg_max =3D RTE_MIN(priv->max_recv_sg= e, UINT16_MAX); dev_info->tx_desc_lim.nb_min =3D MIN_BUFFERS_PER_QUEUE; - dev_info->tx_desc_lim.nb_max =3D RTE_MIN(priv->max_tx_desc, USHRT_= MAX); + dev_info->tx_desc_lim.nb_max =3D RTE_MIN(priv->max_tx_desc, UINT16= _MAX); dev_info->tx_desc_lim.nb_align =3D MIN_BUFFERS_PER_QUEUE; - dev_info->tx_desc_lim.nb_seg_max =3D RTE_MIN(priv->max_send_sge, U= SHRT_MAX); - dev_info->rx_desc_lim.nb_mtu_seg_max =3D RTE_MIN(priv->max_recv_sg= e, USHRT_MAX); + dev_info->tx_desc_lim.nb_seg_max =3D RTE_MIN(priv->max_send_sge, U= INT16_MAX); + dev_info->rx_desc_lim.nb_mtu_seg_max =3D RTE_MIN(priv->max_recv_sg= e, UINT16_MAX); /* Speed */ dev_info->speed_capa =3D RTE_ETH_LINK_SPEED_100G; -- 2.25.1 > -----Original Message----- > From: Stephen Hemminger > Sent: Thursday, May 25, 2023 8:31 PM > To: Ajay Sharma > Cc: Ferruh Yigit ; Andrew Rybchenko > ; dev@dpdk.org; Long Li > ; stable@dpdk.org > Subject: [EXTERNAL] Re: EXTERNAL] [PATCH ] Add checks for the port > capabilties >=20 > On Fri, 26 May 2023 00:19:59 +0000 > Ajay Sharma wrote: >=20 > > + dev_info->max_rx_queues =3D RTE_MIN(priv->max_rx_queues, > USHRT_MAX); > > + dev_info->max_tx_queues =3D RTE_MIN(priv->max_tx_queues, > USHRT_MAX); > > + >=20 > Please use UINT16_MAX instead of USHRT_MAX since that is the type of > max_rx_queues. > Both are the same size but best to be consistent.