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 6D15FA0548; Thu, 4 Nov 2021 11:28:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CCCC411B6; Thu, 4 Nov 2021 11:28:50 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id B23A541144 for ; Thu, 4 Nov 2021 11:28:48 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="230397607" X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="230397607" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 03:28:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="729250182" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 04 Nov 2021 03:28:47 -0700 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.2242.12; Thu, 4 Nov 2021 03:28:46 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.2242.12; Thu, 4 Nov 2021 03:28:46 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 4 Nov 2021 03:28:46 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.48) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 4 Nov 2021 03:28:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TMkZkXKss6UzYvzsHjVLaYFZw1Ix5PHPRZl+D4c9vubU/eC8bVUOATiuqnY4Vmozk3VSQmiyoHtEQbDb8m+BUHN3v9IJtvg75jc9HshQsS4oUCawU2ZponWbSJ6DBIlqCjvGAw0fOzfLEjCsjC/T1aiW6DX4uCtaewM63NH1dUx9dzEXRoIy9Gbo3n67ic7NwxENAXsZXJ98C9yySvGlEoxuJ5Jn1pjSwWAfdotoiHbhcBvtIEy2GZYoBt204tVY8oamVTSKnLErpJc722NncKJNuAXSqa7hDHSCUby5S5x5K3aC8FeJfb0jvLR0iKZYUbCnB7D+C09IpDy8fMsBUg== 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=ZbUe6QcWzFUlFeh7iIZAUfWa6Ai9AmxIoYdXEZwlPSo=; b=GkzbShgU5x/djWt18dHSHQ7uPg4cZFNfkB51xZIyHy9wODC0ug8I8QbcIyJ1f06DWznyKhi4EtoxdIasFW1vuwVq4ZTb2PZ7s3nhxTI1v9LrBi7Gbl3IeJTiijm4sPLicQH5ObeScSbGd8DlTpuKuJ1OAu3Qjq1flt6A7+jPvwDXhntgKo3K9YmucBY2dLbwJkIk8d+dnpxqPH7m+vcheKkue+A7tBEB6rizm/UUBP0rKMoenHmqy5yoxSopQ1ZYb8YAj7hOc49mFQ3Y+4PPaUlT/NiFxzMJGHZPwHM+850LE9x02FmxHb50tA/88CaSMfwPEaiN5gMxyffonAUo+Q== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZbUe6QcWzFUlFeh7iIZAUfWa6Ai9AmxIoYdXEZwlPSo=; b=MHscXY6IvwXQwxlMxFUisfIojkKkJMDGjt7Y1GITCPJ56tjyDJiyAFJfuBNHvD6HAUbZWjQUWrTQ6Zq7IFzuhY9ydBhp8lvTjTqeBSnryCWIuQES/cA+3nXTINBDippXjyp4mtS55h3OK45y04gGfeJq3TYSuyaL03V4V+3hg5Y= Received: from PH0PR11MB5207.namprd11.prod.outlook.com (2603:10b6:510:32::15) by PH0PR11MB5045.namprd11.prod.outlook.com (2603:10b6:510:3f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Thu, 4 Nov 2021 10:28:45 +0000 Received: from PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::f076:f51c:9101:b0ff]) by PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::f076:f51c:9101:b0ff%8]) with mapi id 15.20.4669.013; Thu, 4 Nov 2021 10:28:45 +0000 From: "Walsh, Conor" To: "pbhagavatula@marvell.com" , "jerinj@marvell.com" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/3] examples/l3fwd: print port bdf when adding routes Thread-Index: AQHXuJMcK1Z1WeQDY0eV+uNLJJT6zqvzVk2g Date: Thu, 4 Nov 2021 10:28:45 +0000 Message-ID: References: <20200802181631.691-1-pbhagavatula@marvell.com> <20211003201110.10448-1-pbhagavatula@marvell.com> <20211003201110.10448-2-pbhagavatula@marvell.com> In-Reply-To: <20211003201110.10448-2-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b4f50e1c-a2c3-4060-d958-08d99f7de1ab x-ms-traffictypediagnostic: PH0PR11MB5045: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1850; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +pzoB+0MF2fFD5AUz5qYzLElh2ECDKqBqwOTJg8/kMx+0lXIASvlkxo/NlmJFqAu0Aq1COwdx7qz4zU5rphF3Q30W/Cp9f7WXfMolg+mmdncupqwmeKdjLSpqjVnTaZzL/pMt+vP/1L+gaAmCdzSNTTsObmDIEeg4F4/BWD+mAu1l3X7aMDGWJzd21F1xBg2KLBIfoqQXqTaaAaGzGnbp5pwQUY+HUeHIbOMVGeKbEP3KkVnMHxqAX+jaH5anIWsP77WeEuBNpxQVdBIFcJp5H+sxFDCebKSdrn1sYfpTGayMxQSqbgdrR0J78ehwPpVryQxDDib1Szw3ccCz7ovBsdgrlzqUbbCO1sl4raRoAio+hP48yEs1avgWWxFxKtNnKEJ8rvGonYsrBSyh/o6kWciLQRmWVRLm/5/lPn8ClR6OXSJlkosKWp50wfFmpDifgRwcBPyKk9sq244Lfoy51y8wpORe4JizRjZaL7ZTSgBRba1+g/fIbOpiVueOByBufHa1Ok8JEDjdEIZBEaW2acqcRtqFC25TahtCOJFTI4OGHn2njPOyfVYRZiQswHn6Zs4XsUrfXvCAFBUt0wPUte3WkJjypiGWwyEgqbnAfJy3RxuprGcIONdrQH50TNi8GNEnNWnAcozdobu0oVOk+WOc8Y1uCo6x6L4qiIcMIBQ0nIA873M2S9QzLf5wWc3D7L+yWLG/wYqEa8bvhsHAQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5207.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(9686003)(55016002)(316002)(71200400001)(82960400001)(76116006)(66946007)(8936002)(122000001)(186003)(38100700002)(66446008)(64756008)(38070700005)(66556008)(66476007)(4326008)(7696005)(6506007)(2906002)(86362001)(53546011)(8676002)(5660300002)(33656002)(26005)(83380400001)(52536014)(110136005)(508600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?plN81wnhq3Y0v21MS+BR531YC8NpxL5+8RAarb3W6hA0hA5VF3SVOCPTdWfS?= =?us-ascii?Q?Q56il5BVkcm1T1l792Rj4C5Se95yeaUbxhvDqXIURp0O5BCmMLYG1577Qa6u?= =?us-ascii?Q?fr5Ha+xFSMdRUJ0Krsw7Hde8Fw7DmaTPaH7tsaYEfeWcC6qtXVUZz3v4R5w5?= =?us-ascii?Q?pHgfVwb+KJQ03kSZR1pj5F+/CEpvU6ySORTGWkFAG8kSbLLOHTBHMf3PgzO7?= =?us-ascii?Q?MhWLDncKo4iwBnspgCFSJ3Fm3Bq04t95uwg6RINKhyo1U+Lfd3CdD+7FpYbI?= =?us-ascii?Q?CMZPniRKMPSQ95fvu9fJ4C+OnnaKlcCNTUFdDlTWoFpZRpmCyNWSWtWIkLxo?= =?us-ascii?Q?xbBhedJFFu2tXBwgZ/LKgQhGZ0DzGh/DrffzXPnh+BKH7JmxbJG8Z64FkDWt?= =?us-ascii?Q?2RdI7i8gVqbWMim7DjqcQ0GrGTTfKM6tALqxiF0SkjPq/nTmRWPrwbohcQe5?= =?us-ascii?Q?jGiOKxIe7wlK+wPYPD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N?= =?us-ascii?Q?u+XXj2mgG+FJxAEcsJYsPbEzFf04k+I+XPokMJrJbcSC7yuMiAtSoJIUZZNJ?= =?us-ascii?Q?FVz8IURTSxXbXdlZu8qm/iKFN92eG83DSB9YwDQuQAaQNLsGACLjOszXSlde?= =?us-ascii?Q?uzgwaSxjg9zonAff8oftKsODS0jnXvV9RqdqapAjtptIYZpDJp6oM4Mtn9pP?= =?us-ascii?Q?COTQNROr/mGMI4WvL1+dyBkvLrQ9F1BZ2f/Z7vx/QYg/NtRaJ2K6yObwygcq?= =?us-ascii?Q?qBO31WpOx7yO6xgy7HJbR/o=3D?= 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: PH0PR11MB5207.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4f50e1c-a2c3-4060-d958-08d99f7de1ab X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2021 10:28:45.4803 (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: VHfLBQPPYK5aDf8ZjvXG+Kox1l5l5hZCz9cM7ps9drvQrpGDP4a1TOXgd+BhvWXxF9SVYuSPMVkV9OWAnd4SNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5045 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/3] examples/l3fwd: print port bdf when adding routes 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 Sender: "dev" > From: dev On Behalf Of > pbhagavatula@marvell.com > Sent: Sunday 3 October 2021 21:11 > To: jerinj@marvell.com > Cc: dev@dpdk.org; Pavan Nikhilesh > Subject: [dpdk-dev] [PATCH 2/3] examples/l3fwd: print port bdf when > adding routes >=20 > From: Pavan Nikhilesh >=20 > Since the number of Ethernet ports have gone up, print the pci bdf along > with the routes. > This is also helpful for cases where allow listing order is not honored. >=20 > Signed-off-by: Pavan Nikhilesh > --- > examples/l3fwd/l3fwd_fib.c | 16 ++++++++++------ > examples/l3fwd/l3fwd_lpm.c | 9 ++++++--- > 2 files changed, 16 insertions(+), 9 deletions(-) >=20 > diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c > index f8d6a3ac39..cc6054ca44 100644 > --- a/examples/l3fwd/l3fwd_fib.c > +++ b/examples/l3fwd/l3fwd_fib.c > @@ -439,6 +439,7 @@ setup_fib(const int socketid) >=20 > /* Populate the fib ipv4 table. */ > for (i =3D 0; i < RTE_DIM(ipv4_l3fwd_route_array); i++) { > + struct rte_eth_dev_info dev_info; > struct in_addr in; >=20 > /* Skip unused ports. */ > @@ -446,6 +447,8 @@ setup_fib(const int socketid) > enabled_port_mask) =3D=3D 0) > continue; >=20 > + rte_eth_dev_info_get(ipv4_l3fwd_route_array[i].if_out, > + &dev_info); > ret =3D rte_fib_add(ipv4_l3fwd_fib_lookup_struct[socketid], > ipv4_l3fwd_route_array[i].ip, > ipv4_l3fwd_route_array[i].depth, > @@ -459,13 +462,14 @@ setup_fib(const int socketid) >=20 > in.s_addr =3D htonl(ipv4_l3fwd_route_array[i].ip); > if (inet_ntop(AF_INET, &in, abuf, sizeof(abuf)) !=3D NULL) { > - printf("FIB: Adding route %s / %d (%d)\n", > - abuf, > - ipv4_l3fwd_route_array[i].depth, > - ipv4_l3fwd_route_array[i].if_out); > + printf("FIB: Adding route %s / %d (%d) [%s]\n", abuf, > + ipv4_l3fwd_route_array[i].depth, > + ipv4_l3fwd_route_array[i].if_out, > + dev_info.device->name); > } else { > - printf("FIB: IPv4 route added to port %d\n", > - ipv4_l3fwd_route_array[i].if_out); > + printf("FIB: IPv4 route added to port %d [%s]\n", > + ipv4_l3fwd_route_array[i].if_out, > + dev_info.device->name); > } > } > /* >8 End of setup fib. */ > diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c > index 7200160164..582911c622 100644 > --- a/examples/l3fwd/l3fwd_lpm.c > +++ b/examples/l3fwd/l3fwd_lpm.c > @@ -451,6 +451,7 @@ setup_lpm(const int socketid) >=20 > /* populate the LPM table */ > for (i =3D 0; i < RTE_DIM(ipv4_l3fwd_route_array); i++) { > + struct rte_eth_dev_info dev_info; > struct in_addr in; >=20 > /* skip unused ports */ > @@ -458,6 +459,8 @@ setup_lpm(const int socketid) > enabled_port_mask) =3D=3D 0) > continue; >=20 > + rte_eth_dev_info_get(ipv4_l3fwd_route_array[i].if_out, > + &dev_info); > ret =3D rte_lpm_add(ipv4_l3fwd_lpm_lookup_struct[socketid], > ipv4_l3fwd_route_array[i].ip, > ipv4_l3fwd_route_array[i].depth, > @@ -470,10 +473,10 @@ setup_lpm(const int socketid) > } >=20 > in.s_addr =3D htonl(ipv4_l3fwd_route_array[i].ip); > - printf("LPM: Adding route %s / %d (%d)\n", > + printf("LPM: Adding route %s / %d (%d) [%s]\n", > inet_ntop(AF_INET, &in, abuf, sizeof(abuf)), > - ipv4_l3fwd_route_array[i].depth, > - ipv4_l3fwd_route_array[i].if_out); > + ipv4_l3fwd_route_array[i].depth, > + ipv4_l3fwd_route_array[i].if_out, dev_info.device- > >name); > } >=20 > /* create the LPM6 table */ Hi Pavan, If this is to be added it should probably print the BDF for the IPv6 routes= as well as the IPv4 routes for consistency. Otherwise I think this is a good addition. Thanks, Conor.