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 18907A00BE; Fri, 11 Feb 2022 04:38:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1270410E5; Fri, 11 Feb 2022 04:38:51 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60043.outbound.protection.outlook.com [40.107.6.43]) by mails.dpdk.org (Postfix) with ESMTP id 81F3B40DF5 for ; Fri, 11 Feb 2022 04:38:50 +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=srtXRAimBdKRaO8xDArmvWAwxYDynCXbGElwRTQ/2og=; b=ax8ZAa3RN2yP+xgAAXdixSUmcbf6Xm94g0w2/T7YxaJUyIAKJkhsUzhdJGMYlc0Y17HsI3SOFoasrfhwInu7sptgG0uGGK4d5npk3XLg8yKDq58VWS4pC2qaCPUAirpH4kTcmy8E2BOdo8n2lx3Ffy165Si0L/A2G5eFmp4JpFA= Received: from AS9PR0301CA0033.eurprd03.prod.outlook.com (2603:10a6:20b:469::20) by AM6PR08MB4998.eurprd08.prod.outlook.com (2603:10a6:20b:e1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 11 Feb 2022 03:38:47 +0000 Received: from AM5EUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:469:cafe::53) by AS9PR0301CA0033.outlook.office365.com (2603:10a6:20b:469::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.19 via Frontend Transport; Fri, 11 Feb 2022 03:38:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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 AM5EUR03FT038.mail.protection.outlook.com (10.152.17.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Fri, 11 Feb 2022 03:38:47 +0000 Received: ("Tessian outbound 63bb5eb69ee8:v113"); Fri, 11 Feb 2022 03:38:47 +0000 X-CR-MTA-TID: 64aa7808 Received: from b76caddab587.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3F6036B8-6555-47F7-A697-154064AFFCD2.1; Fri, 11 Feb 2022 03:38:37 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b76caddab587.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 11 Feb 2022 03:38:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EEZGlvsvN3Ddi8j7DmiSyE0fiDWGTIR3WJZzSDQN0dWTf74wAnwJ4bC4BxSTzYk1sEtUgxVK3ipyULb43eCmazNisJSbLNoJFaF13PZIg7KtLnqoWSLPxy1ZERDisZFD73lT5A2m7VpzQCriZAhfbxapRrFTiS+e4JHtJ1YBdFHpDZriWWuHBRozFioOg4RFYPtqWrJWmoVqiSGGwpFDndBNqUzlhIjiK/Oa4mzU7Ek8EfwTZlnweUKnK0szTrY9eiTZXrD4VjcMmXA4qDMN0z5U23BqzGrt9dy0+dLOqaMeX349EEXEjcOnLbRJiR/Gl0WzNZ9i+I37iP456mVzlA== 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=srtXRAimBdKRaO8xDArmvWAwxYDynCXbGElwRTQ/2og=; b=Dx+G0L3Gi/rbRi+I57sip/rlN00hSe29lO9zZxNEEj1yUOlpz+F5snpar7NSgM2s+ybNQBjpl06SfLWWH3ZSu+vxASXJNjqQIplX4NI4+3KFCsBNg3R9bfxLkxz7mE0SiqBOi9iaFBMnr6/JW1zOwt48AYtWCBMqFisHC+1kR3l8MbCYsEsGLEQQjYEpmo3bjM09pdcTGWa6HCJ9OfPKiyTGoOcEwOUi9RXXUIJ+yKEBu7zwmPou6Clstv4vbD+O0yWl5Mvebgkotozqo4WECKBtTdYT/uXd63U5qKD//xFvolmIIZcTMnwTUsGp+QdEZ5/W4xlAz9/HCQER8Dy7qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=srtXRAimBdKRaO8xDArmvWAwxYDynCXbGElwRTQ/2og=; b=ax8ZAa3RN2yP+xgAAXdixSUmcbf6Xm94g0w2/T7YxaJUyIAKJkhsUzhdJGMYlc0Y17HsI3SOFoasrfhwInu7sptgG0uGGK4d5npk3XLg8yKDq58VWS4pC2qaCPUAirpH4kTcmy8E2BOdo8n2lx3Ffy165Si0L/A2G5eFmp4JpFA= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB8PR08MB5148.eurprd08.prod.outlook.com (2603:10a6:10:e5::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 11 Feb 2022 03:38:34 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::6d04:5964:7813:4891]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::6d04:5964:7813:4891%4]) with mapi id 15.20.4951.018; Fri, 11 Feb 2022 03:38:33 +0000 From: Honnappa Nagarahalli To: Stephen Hemminger CC: "dev@dpdk.org" , "lijuan.tu@intel.com" , "juraj.linkes@pantheon.tech" , "ohilyard@iol.unh.edu" , "david.marchand@redhat.com" , "thomas@monjalon.net" , "jerinj@marvell.com" , "bruce.richardson@intel.com" , Kathleen Capella , nd , Ruifeng Wang , nd Subject: RE: [PATCH v2 2/2] examples/l3fwd: make RX and TX queue size configurable Thread-Topic: [PATCH v2 2/2] examples/l3fwd: make RX and TX queue size configurable Thread-Index: AQHYHt4OIXQZDBFwf02+JN7UvwQMHqyNiCaAgAAqxQA= Date: Fri, 11 Feb 2022 03:38:33 +0000 Message-ID: References: <20220202060403.118301-1-honnappa.nagarahalli@arm.com> <20220211002607.80058-1-honnappa.nagarahalli@arm.com> <20220211002607.80058-2-honnappa.nagarahalli@arm.com> <20220210170147.08c43652@hermes.local> In-Reply-To: <20220210170147.08c43652@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 063A75EFCEF83A4A9C7FB52BE69CA2B7.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: 194792e1-6982-4dc4-d8bb-08d9ed10032e x-ms-traffictypediagnostic: DB8PR08MB5148:EE_|AM5EUR03FT038:EE_|AM6PR08MB4998:EE_ x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:4502;OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Y+aSqEZn1SoKiq5KUE+OzGdp2lefkLYu7NpxtxoahsGZcNQoJx8yip5S15NiAvjIE6GJhwW27DW9EOpGGgTuYMzLaNbqGdifrMCSwRNET+QfuqO6cao2zv+mCnl2z7IKXpG5SgUsKlIFTnQfogfihrfAhPgPSXfAr0uObpk2hn1pG4WpEDaNNWCAJNZR1pIAWHOH62Uc+aEDOKMRo1sdcKAMzjbZtT4Yp2XbKvmQAstSWUeUN8joxBUk/Uu8ILwRB8aKtyYeR0h+UBqEoLCwgZr7KQCNGc1UbclAxGlmeHMDpShh81jFFbPobuhFUx5hfkmtQqmlrWAzbGJlZ9thPJaE10Xj7MaSGx5FUmeHeJWaDpkMah8/0eFx6fHr7w61GvSsirZZxWpa5ZgjToIUTwZS2ak6didqHM1kYj5yxofBcWZh+CIrGBVKBrhF0YddOV4rzADlrHv5yphwZ9cBhiSTXNWlX569WdzUzDP+Xyo70wKEis5QxR1RTEOwQO/uE3g1RjFy8ESZFFiryvUjIuiXLELMA5/e4kczF0rqUbuqk8apP7r7MuoBCYwcp7FYNxjDH3QplSyHI1gLk6XSecAdnkRX0QFJFL171ebEPyJ7xhV4aeU9/OUgBwJ04Q/mAzV/+5FLDlBV+XhdA2bzc/dIi1SxFoIg0EOOP1FlYO921FOf4uYK3/8NPpUmGC9xZ82wMAJPxxCaQAUhKTciQA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(38100700002)(26005)(316002)(38070700005)(508600001)(71200400001)(5660300002)(122000001)(83380400001)(8936002)(9686003)(2906002)(186003)(52536014)(7696005)(6506007)(66446008)(55016003)(4326008)(66476007)(86362001)(66946007)(76116006)(66556008)(8676002)(54906003)(6916009)(64756008)(33656002); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5148 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT038.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9bdfb52f-9b46-4299-4288-08d9ed0ffacf X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GSfGXr+80p/o09n6ysnUy7vLht9sI2NUA5vBh45GbxR94+x2kssGBkrjZ0hUqqp5cr+A8qZ0DYIOoaIWadCpd7+P1acIjXx64f45ivxG7LjgT6v/YH5YaKUKsHoZQZLyEgwl+JD1HKzHIdnzHweQq/QsegZNaP5DfjKm0bRkT7cs1qQQjibz7vrAh9tEFyn1yQG/dHXvBckALhYXxabygdbqczkRJknlUmkOVRRv56L46jjEYQtt1iaDXcBL97dcbbGeLWjZdUKrdvzMAkqrU+tnwxEtNBhfcUjdXlq48oZoyivi/DtbB/jNY8SMDtzUg1eCUnKioZtaBrlfuiY85hMOn/21ig6pSMcYdKVy4U5DdzciPRZXzWr1UtmHyoz2eloX9RJcrvOMiZHYfuHYF3C75w7m9r0f1RAMK807rG9NqFXa9VjH72P9kY62W8dzf4zYtRyLOPsYUsLvxChQNivddg7m0zy0DGNPxItRpT8cs71WK1GqlYyeMnw68/k/EICIZs9Hs1tiUJB6jCMtSERmc1DRdA70z1iY69NNgtWkpGKQxM7cKLJbWgjYDxa33LtS9qSjX1kE//o6mVA1pZX0vU5ekbWof8JVVj9amQWgNnbHoeBUz3UsK+VJL2LYiRCzV8xVVx8jxsJSVO6jxFsV6flofcMjjC8gtS2Us2XvEvS9nCCbtkfvBebhdaF9 X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(9686003)(4326008)(6862004)(8936002)(6506007)(47076005)(8676002)(7696005)(82310400004)(2906002)(26005)(186003)(40460700003)(36860700001)(86362001)(70586007)(5660300002)(83380400001)(70206006)(336012)(316002)(33656002)(356005)(55016003)(508600001)(54906003)(52536014)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 03:38:47.7672 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 194792e1-6982-4dc4-d8bb-08d9ed10032e 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-AuthSource: AM5EUR03FT038.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4998 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 >=20 > On Fri, 11 Feb 2022 00:26:07 +0000 > Honnappa Nagarahalli wrote: >=20 > > +static void > > +parse_rx_queue_size(const char *rx_queue_size_arg) { > > + char *end =3D NULL; > > + uint32_t rx_queue_size; > > + > > + /* parse decimal string */ > > + rx_queue_size =3D strtoul(rx_queue_size_arg, &end, 10); > > + if ((rx_queue_size_arg[0] =3D=3D '\0') || (end =3D=3D NULL) || (*end = !=3D '\0')) > > + return; > > + > > + if (rx_queue_size =3D=3D 0) > > + return; > > + > > + nb_rxd =3D rx_queue_size; > > +} > > + > > +static void > > +parse_tx_queue_size(const char *tx_queue_size_arg) { > > + char *end =3D NULL; > > + uint32_t tx_queue_size; > > + > > + /* parse decimal string */ > > + tx_queue_size =3D strtoul(tx_queue_size_arg, &end, 10); > > + if ((tx_queue_size_arg[0] =3D=3D '\0') || (end =3D=3D NULL) || (*end = !=3D '\0')) > > + return; > > + > > + if (tx_queue_size =3D=3D 0) > > + return; > > + > > + nb_txd =3D tx_queue_size; >=20 > These are duplications of the same function, just different result. Agreed, make sense to combine > Also programs should test for invalid queue size which is currently limit= ed to 16 > bits by rte_eth_dev_configure >=20 > static void > parse_queue_size(const char *size_arg, uint32_t *size_ret) { > unsigned long result; > char *end; >=20 > result =3D strtoul(size_arg, &end, 0); > if (size_arg[0] =3D=3D '\0' || *end !=3D '\0' || result > UINT16_MAX) > rte_exit(EXIT_FAILURE, "Invalid queue size '%s'\n", size_arg); > *size_ret =3D result; > }