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 637F7A0562; Mon, 3 May 2021 19:38:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50E6C40150; Mon, 3 May 2021 19:38:23 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2052.outbound.protection.outlook.com [40.107.237.52]) by mails.dpdk.org (Postfix) with ESMTP id 0965F4014E for ; Mon, 3 May 2021 19:38:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aSCVPZHI/H1ERdgNDh9lMFAcc7JmsIg+F7P3m66rJikuW47TqRJtKmJFTGYDLOXVs2IHSy7jBZMvBrvjb0AN9vtSev1gxqpjZ21NkJltlFdZ71Jjp/I161hLA42BLuNoDXZKq0+MRlfiKE+res6YgAE9Ij2xDr35sMfmRqKByKVRFmUhUEK6pjKlJwVT0tRhMDfQOOQ983ex1SqThDtBlN3cAdfAvicvRu3yflnu9hL1vS7vcMVYZLtE9nreum5HHHgokjpn68JpQ3fcenbWC5uaJBryHFBvvfVi6wX9ZqTCfCGD7drnREcAJUTN3DmfQSu2DckePAauESScR6IINg== 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-SenderADCheck; bh=1KPzBCJBKPgbIlHBUv+6Ng0adwDhWq0rlUHjTHsE+nw=; b=N2Dl0qWkX/fjcKOQm3aKwzTwD9vw5pq+GzNf2/208F/qUkpROAycDO9amGkA/OpRqodjfFaMBai+EeP/Owc4KeYKuf5RCSh7g7uu4/zfo6DaGNxLDNf6/GTnNL5POf38YmY5pQcGFyCgul4DoqzRcqSnOyMuAkX/vmKygq95cq4Og2IUo8+51sfNjwN702Q0FsaMxrK/AuTpZpVCrJhv+VjtPJBqrgkFT/txteaMRqH2dHTeIDAIoC7v7ScJJq1Vrnp9h2Y/ogw446GVH41etidSgJ5cGA4A4LdLc8wj5pdNAbir/GNQQSHt0ZD/lsAaJWPF6Cy9G042yh05YfiU9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1KPzBCJBKPgbIlHBUv+6Ng0adwDhWq0rlUHjTHsE+nw=; b=NMXox32xnpTCZxcKKVGQFucwv/Uc0ppYBfFvy5igTBfruxh8MPLX+8IFPXQ8XVwpoqpUlIcwkmff1OPJO4VfwX+iEvuelQeITwSLgjgc2MAmt3KvtWuV0fJGiYH47czBSCrAk/Ht+r0maHRMqgfXnaqged7MFnpkAQeDxmWLTNqGFqOm3rjTwD0OOCU60p29VSFCRGe9gKxYWc8Fyrq4e4q3ieTnkKvg+lSoWqtTROmhptIT6GQX81TISapYYPkJcFl3RoEdeoiQD4Rdd3hxGqsgCbYADmv9m00uxvJPaP4QD3iy9p7dorH7Xuac7ai5qHyLQP/UqjI422DeLb2yAw== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5375.namprd12.prod.outlook.com (2603:10b6:5:39a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.39; Mon, 3 May 2021 17:38:21 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::70df:ef1e:d98c:ce4]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::70df:ef1e:d98c:ce4%6]) with mapi id 15.20.4087.044; Mon, 3 May 2021 17:38:21 +0000 From: Tal Shnaiderman To: Jie Zhou , "dev@dpdk.org" CC: "dmitry.kozliuk@gmail.com" , "xiaoyun.li@intel.com" , "roretzla@microsoft.com" , "pallavi.kadam@intel.com" , NBU-Contact-Thomas Monjalon , "bruce.richardson@intel.com" , "ferruh.yigit@intel.com" , "konstantin.ananyev@intel.com" Thread-Topic: [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type Thread-Index: AQHXPemiAAoVgAXU1k6fXsyBahMqU6rR/6Vg Date: Mon, 3 May 2021 17:38:21 +0000 Message-ID: References: <1619553721-5220-1-git-send-email-jizh@linux.microsoft.com> <1619805162-10684-1-git-send-email-jizh@linux.microsoft.com> <1619805162-10684-7-git-send-email-jizh@linux.microsoft.com> In-Reply-To: <1619805162-10684-7-git-send-email-jizh@linux.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [5.29.16.219] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e05ab04c-bc2a-4fe2-de91-08d90e5a3ece x-ms-traffictypediagnostic: DM4PR12MB5375: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2512; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T5OKkM91TTtC3kZKddeBu1l1uRcmrDd6s+BOvMFhzQqd7JymkIKDZ0NCYW9598OybL7UM7dAri7eOyVo+zAm1KS4bCD04Wp2C4WHn3zrLNZETHNkVUoL4QVYRBfRsgis1kkWLIhzbq58cs1WfLXrP+9vKe/9uMXowbP6AZO88WY+SjnRpj2hDOKHKuTLjz1UPip2b97gV9aFR7jrRo9eHiTKlGWuC/SNYKceEgbl/01uc+vBnLX3WK0oBz54AjDTHzMOL1MvaMG1YKEvpULUZxi5nOsR4FYIY2nZ2TvVETCxM60sXsHR91zGEVIYk+Qb1Wa1b5VqXO3YS/dnV9LXUMNVfh7MqJypQq8pZXdiU+G7yavJqjmy4kbUIrAOmnbSaKwpAP0DM33g+ZuS/22QjPsiKlFRbBvoVJ/mldaK7pAZRqIhfpeDSdQEmlAdMZb13lIGY7X4su47RvVyxK/Ix3HCI1Q0jyyMwmQF7S61DR+WqwiZxdE8ny+8GuDWVG/ECY12ljjS8Fj3tOdulNcF0lqp19wjactdPexCbUmUrDOPbVsq+RDaiO94AHjtxKwHKq6w3QmSZoS3TIIGoqvCkWQeHlD2U317S5SwFjwRfSY= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(136003)(396003)(366004)(66946007)(26005)(76116006)(38100700002)(33656002)(64756008)(6506007)(122000001)(66446008)(66556008)(66476007)(52536014)(71200400001)(83380400001)(4326008)(7416002)(5660300002)(316002)(478600001)(7696005)(8936002)(8676002)(54906003)(2906002)(186003)(86362001)(110136005)(9686003)(55016002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?+xEOIpbW19Gly3/uqujOlqrwK9GQW+D1zeIVqTpEUMrFsQogzdR8TIqT6FTO?= =?us-ascii?Q?B9wk5ys2gVG5jQZTpQ6s7tFzG+HQUC+VXmOVkdbQC4AzC+FbIGsIdCQJpf62?= =?us-ascii?Q?3NwzpmhVsSH8eX39qUFbY/bBQpYdM6XiODSrKNPyibKG20GQl848ynnwwwjq?= =?us-ascii?Q?Quwr4a2AR/QRowfd6QHrZY+Wgb3f6zJHj5zf9CnEGyyE66dW0U9q94M2gwlp?= =?us-ascii?Q?eX7PyyAdeBeUbGo3JF79bSj2MoudUJQQpUZFtOCkk0WI4fztkvwAdgeoKhIt?= =?us-ascii?Q?S41GLnyxvdM670uUUUGk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?us-ascii?Q?HnX5/Hl5hq/QSKbuqUJiNGKWxI2omd3YnAX6hNhfzhKQMr6x26iLCxnC1glI?= =?us-ascii?Q?zLKwQE9nvRHH1YD6yvDRN7+irkT6aa8U9tBS9XZhNVr6AvSUjEGAiVy0V85M?= =?us-ascii?Q?GHA=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e05ab04c-bc2a-4fe2-de91-08d90e5a3ece X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2021 17:38:21.2270 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: c/SugBwBBgkW3Fl9fvqgHq1EZMb6eJHY4P6ckcdrlpxFGk6PsBEti9HRU+LZbEtdNpHRJO1Bs+1Xkje0J+L39A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5375 Subject: Re: [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type 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" > Subject: [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type >=20 I think you should name this patch " app/testpmd: fix parse_fec_mode mislea= ding return type name" Do we need a fixes/CC stable tags here? > External email: Use caution opening links or attachments >=20 >=20 > Fix parse_fec_mode to return fec_capa instead of mode >=20 > Signed-off-by: Jie Zhou > Signed-off-by: Jie Zhou > --- > app/test-pmd/cmdline.c | 6 +++--- > app/test-pmd/config.c | 4 ++-- > app/test-pmd/testpmd.h | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > 12efbc0ca..d804ee233 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed( { > struct cmd_set_port_fec_mode *res =3D parsed_result; > uint16_t port_id =3D res->port_id; > - uint32_t mode; > + uint32_t fec_capa; > int ret; >=20 > - ret =3D parse_fec_mode(res->fec_value, &mode); > + ret =3D parse_fec_mode(res->fec_value, &fec_capa); > if (ret < 0) { > printf("Unknown fec mode: %s for Port %d\n", res->fec_val= ue, > port_id); > return; > } >=20 > - ret =3D rte_eth_fec_set(port_id, mode); > + ret =3D rte_eth_fec_set(port_id, fec_capa); > if (ret =3D=3D -ENOTSUP) { > printf("Function not implemented\n"); > return; > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index > 0e86ed02f..c626d5ce8 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -3549,13 +3549,13 @@ set_tx_pkt_split(const char *name) } >=20 > int > -parse_fec_mode(const char *name, uint32_t *mode) > +parse_fec_mode(const char *name, uint32_t *fec_capa) > { > uint8_t i; >=20 > for (i =3D 0; i < RTE_DIM(fec_mode_name); i++) { > if (strcmp(fec_mode_name[i].name, name) =3D=3D 0) { > - *mode =3D > RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode); > + *fec_capa =3D > + RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode); > return 0; > } > } > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index > 6ca872db8..1d104213b 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -886,7 +886,7 @@ void show_tx_pkt_segments(void); void > set_tx_pkt_times(unsigned int *tx_times); void show_tx_pkt_times(void); > void set_tx_pkt_split(const char *name); -int parse_fec_mode(const char > *name, enum rte_eth_fec_mode *mode); > +int parse_fec_mode(const char *name, uint32_t *fec_capa); > void show_fec_capability(uint32_t num, struct rte_eth_fec_capa > *speed_fec_capa); void set_nb_pkt_per_burst(uint16_t pkt_burst); char > *list_pkt_forwarding_modes(void); > -- > 2.30.0.vfs.0.2