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 CE422A0C60; Fri, 5 Nov 2021 08:27:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5659040689; Fri, 5 Nov 2021 08:27:22 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9F82540151 for ; Fri, 5 Nov 2021 08:27:20 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1A50Rq3s024578; Fri, 5 Nov 2021 00:27:20 -0700 Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3c4t3gsdma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Nov 2021 00:27:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i6FSmg3f6M9Smj6OfhKjzMRqTz7aNQsFn7Tstxre3v3Z8IlwdVCLueD+IuN4V8VYWl1/s+P+fz2ZcxeETd4ZpuvOJkVYlQYcxG6lgSwfFXyRE4NmICJTALHSzzLwNWNv8+PhyrdVBzUIvWl5ogmbEuGW3ndo8mg5k1STe1Rkb9HLtAEtZiW17dIg69QAhUE/HFOLa3e9WYOzMldHB4EtbyJMRD48e9Fk8BcFcR2do6PFiBFycOUxWWQGFss5nIi4pZBoI2HhVrjlkAEKX8Llbgjy98QQ79l/jF9AQaE7JgEuWPTRnv1EGCATlW5AIgIwRQMM017XB9GcJsDuE9yI4g== 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=lfPfXy80wokZ6BrPLMch4UgBOATHQmS29HXiBk4n2WM=; b=KFyCnSNoQWsR943Lrd8i8kVQg3Lix+NFu4Q1g/jr0OY6Vr2+SzMYiIernNcTVLk0xh43FDzFCCHUUUHHTrG+s3PseGK/zlubgt+CyL1RJbjLCawd4vW+hS0h31dIGUni5WG3Oup44hfm6aaIIl/sF1f/VrbLzZ0hyb8m3AXk4VeYmS/pDBoMhajBxWD67d29qeFcy1bB+VxtZGBzKcrftl4bVtbO7atUJr/zA+2Qc87buBzVQQXoNue2BTSv6gX4ttCa/fp/9sO1DU8xoqOMmjGLBQKGeMHkZa/WiyYOXQhrGxO6rGxaKkzzQlv1QgSxp14K3OHdBnQ6ySeU2qo4cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lfPfXy80wokZ6BrPLMch4UgBOATHQmS29HXiBk4n2WM=; b=OX5C/tbZNrimty11oeRuABNuFY/88J+OKF/UeowNYNaupuJhKd+ZVBvGr1RztALTmnp8tzW5v86C+CwHmMbJilazYMcTwuUII4gIJWk/Dnrlz5xk1Qru5kA9rLFZG+lFmpyZoWr0PZraJCTiKOXzHCS907hmk7TkYL0URvow/1k= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by PH0PR18MB3942.namprd18.prod.outlook.com (2603:10b6:510:28::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Fri, 5 Nov 2021 07:27:17 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::6012:f5c4:8b1b:5289]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::6012:f5c4:8b1b:5289%8]) with mapi id 15.20.4669.013; Fri, 5 Nov 2021 07:27:17 +0000 From: Pavan Nikhilesh Bhagavatula To: "Walsh, Conor" , Jerin Jacob Kollanukkaran CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/3] examples/l3fwd: print port bdf when adding routes Thread-Index: AQHXuJLWORn98dd4SE+qm2wZYIDyRavzXFiAgAFfbkA= Date: Fri, 5 Nov 2021 07:27:17 +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: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7596275c-d4f1-47f8-7fe7-08d9a02db263 x-ms-traffictypediagnostic: PH0PR18MB3942: 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: f/UzMZ5K0wNN/9FkJZF0mLAR+9m7aoDtzUYuLKQt+hlBc0uiMu50RSHFfwXG9SE4jTaQgo+UHYrIdF1EISLEnbhCQTFsUoqM0142r7W4aPTwZPZoZHPZuHTp+8bjnSEWuuQqKFN2xrYqKJ5YsLVbK92Op3In6ZRKahNV4ltdM6JNi+W9gMw/xMip1K/dqU5ecrXH+7iGEWTotrvLFNHUKe5sNBYn3BJy+GsbnnF6cuxVrQUU0eI6B5hhuFoY0c+jex7RS2HQhansKCBUzcDHmGGQA7U6YIJX8e3wECNo8AHvIbUka5yWekBHNyiCcNFddlT31bvg8VLYPfMnpDpuMuulSbUOYOCHlp2Z27d8dOqRMQS3fdGzR0m2mpXNDftLttTYhvSIlOd0srGQFudu3cyJEH7Ch/qL8wqI3nYMyshkAhrYXjFbsVTTfHlYwz3ZB7NQXVMm5H11AbH2KvhRyNGoLdDeLriB+1UneAWUko4ynqrImGqqk54weTMywYbrr/wyXtkQTxCMoyoxn6PCOitWnbYsnscwf/1om1nL+wwTmSmVA3dGE3mH4ivbE3dBeNJyJoqNcSpKKMcSTc+KDlW7GOgSfCJrSBgIRvQHMMVWiDeE1CncBH9aaJvRkP/co2pXvyHV2MJ1QzQ2jlhtgw1JkLZEH+5LL7APNzePOc83Jbeveo6wX8B6lL+uFJFLReDH474eYvx4i540gPYezA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(66476007)(66556008)(9686003)(55016002)(76116006)(122000001)(5660300002)(66946007)(66446008)(64756008)(38100700002)(52536014)(86362001)(38070700005)(83380400001)(33656002)(110136005)(7696005)(71200400001)(8936002)(2906002)(316002)(4326008)(8676002)(6636002)(53546011)(26005)(508600001)(6506007)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?W3nkkpEcd2iP4KhMC6d4GqBuSCLbihIGQ1RkecNNgt0ZAg6dpTI8K0Dm/eBv?= =?us-ascii?Q?mjRNaBXBKyujOoow5RQdv4+lnjwqewEg6wH67hmfWJUYUAehlRc1M7q6KLj2?= =?us-ascii?Q?XlM2ZTsVWz7zBiI9aVkslybuMFgT6kZLD153bCOere03/YEQqDhyyzxftgLE?= =?us-ascii?Q?fTiQJY7cQRxIzjenY8tKhK3ZewrPIZTulvijvlq22qRP+Eg/bBEEdLPRgDXp?= =?us-ascii?Q?4J4rv47JPYpn+R6oq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ascii?Q?o/4irKWk1El5hh9pOE2K74XtqB88AS1JYwYm/u86Q2mwK46T8DNwqPAW+NBv?= =?us-ascii?Q?R701jzXxCBvKXWaH8JWmv/6Ssoa1LApkoLi9shIImK2Cz7Mp0ekrUNdYEhso?= =?us-ascii?Q?NiWo0tNmwQabWDVT/UAvQyn1qnD1TfmWZKayQ2cTnw2cgLHm0a/Lml560ghx?= =?us-ascii?Q?sQwADQI4TcqOQmj39OIiKPzy6MQtW6RupVxKDkOe54m6GSnMoME1eH2ly3po?= =?us-ascii?Q?voIr1ImP9Zm2S6Lk2lr8SX7NhcZoKMZYaMwG7yMfL8RS+UV+JddFtWH7C+O0?= =?us-ascii?Q?FkmAvUuGyn6BVpARycffLxpC6vUgwLpaCuxetddPTY3+POocrb112DJyuIJP?= =?us-ascii?Q?Y38bhYPjyX39ylMGfqo0/29BO9BQO2oqpAMDzE3NyCSzNChYmAJhskeN019B?= =?us-ascii?Q?QPUHHoqc1Be4BAlejisI7hqp3SEOXzkId0vjmEkG64/w+bGav0n700UFA48V?= =?us-ascii?Q?zqsuXCH0bbvEvekFkJ7HoJOfyuMYpmZAh5jujrVsppPFWpl2HMW8sdWMr3vl?= =?us-ascii?Q?vHViQQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7596275c-d4f1-47f8-7fe7-08d9a02db263 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2021 07:27:17.4651 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PVqCueJ6No/mhX+ieDy4PbMv23iTPoaeflRgqQ4pcqvxpK3FRnWeSeggTZBqRlZrSz3LEuKL+cjMuZvwOj4cKJVTQOW6c26BhFmH4mK0rk0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB3942 X-Proofpoint-ORIG-GUID: JWR4v-qs886jnGRYUkxUXNzgpSSBImyx X-Proofpoint-GUID: JWR4v-qs886jnGRYUkxUXNzgpSSBImyx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-05_01,2021-11-03_01,2020-04-07_01 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 >> >> From: Pavan Nikhilesh >> >> 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. >> >> Signed-off-by: Pavan Nikhilesh >> --- >> examples/l3fwd/l3fwd_fib.c | 16 ++++++++++------ >> examples/l3fwd/l3fwd_lpm.c | 9 ++++++--- >> 2 files changed, 16 insertions(+), 9 deletions(-) >> >> 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) >> >> /* 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; >> >> /* Skip unused ports. */ >> @@ -446,6 +447,8 @@ setup_fib(const int socketid) >> enabled_port_mask) =3D=3D 0) >> continue; >> >> + > 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) >> >> 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) >> >> /* 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; >> >> /* skip unused ports */ >> @@ -458,6 +459,8 @@ setup_lpm(const int socketid) >> enabled_port_mask) =3D=3D 0) >> continue; >> >> + > 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) >> } >> >> 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); >> } >> >> /* create the LPM6 table */ > >Hi Pavan, > >If this is to be added it should probably print the BDF for the IPv6 route= s >as well as the IPv4 routes for consistency. >Otherwise I think this is a good addition. Sure, I will add it in the next version. > >Thanks, >Conor. Thanks, Pavan.