From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6FFA6A052A; Wed, 23 Dec 2020 10:40:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1917ECA97; Wed, 23 Dec 2020 10:40:21 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id AB04C2A62 for ; Wed, 23 Dec 2020 10:40:18 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0BN9UXJB023546 for ; Wed, 23 Dec 2020 01:40:17 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0220; bh=DWTYtJHcwE1nOGCQIC86U7tETVaA3lP17mzj3p7MPUY=; b=Qx5czal5QzP6/D5GzcBa9rWSXoQ/5Nb4Aoa1mkD5YWfV9AaoGNbc8lNUrEht12NpL2RT aXeYM03OBGS22jo+m7DffV9cLQgWtKhh9jldehbhHlddfd5Ud9fHs047QSG9wzuyq3nb ARaVw46k8nwv6pzgyD0mI/1WO0/xvdSyp2Av3nvSX0Nv+bx0mzQmvySdvoN6EGcXyTst wxb92XXwFtBclI4uiKZPw5wv5/9HHrp6eocsw4holbfRqBMpx8bE87lL0z9MkkPUw/1N vfwxxwTJ0SdI2O8BwtlAKEhbXXo82Xh/wfOe3X800mAvy2NMVYHQjkwDfCCYTS6zAP8h pw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 35k0ebds82-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 23 Dec 2020 01:40:17 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Dec 2020 01:40:16 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 23 Dec 2020 01:40:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kMxM66eMjD5kCcP111qEzHFkUOA5rznLd9251Q+peV8GfmzNCQ1zvvGZhsP9ofkUiYj/QeOS/Deko4R/Tc+WI9UarVadQQRlekHv3LMCyDnUnCHOY7Ui3ObPcIGCUE+ZyN4Fu2bcogs92MHez42uL7fTMf8AQbUuti0lPHblFdXEuPOjmUoQtfFKgsCp24RBxr5P9bGdv23sIaFJBi6H/M8mntVBz0rgWvOM2RaoYchFFi/cDfCvH3v6hhTNkjkcvKywA2RaCn+1Kx/jl62/o4hYswJ7/VZmtXSB2nkoATZQhJB22AwBiLAlX7bflX56Z5YM7T9cfY73TNj2FLCLqg== 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=DWTYtJHcwE1nOGCQIC86U7tETVaA3lP17mzj3p7MPUY=; b=iUnEamZVh6YzzkCKbr7Bn8YEz8MfRW2c//jrFO2ortBHLubvY/M0oRLnJlWh7PJDEdI9bNP8GjwBMgUe8qZEd4cyLW4HvcxIKPQmS4dxFuCBbh06m4VdrFc7OCIxbAWmEZwGnE1s9bg5LTog+txJ91o9Y1/+oYPh1CeUFpAeR7nG5j4ETIpVR+fPwFinVZwaxZ5pQS8jLeT2w+c/v62aV24P4tgtODFzDwjYrnu6n2PpbObkiOAGUDdtpEV/FBH6XW9vPaiWcCLsWAiPEcYUWE/QKKRz4U6oB8WIJnuNFRN56OT56oSwegrcfplUoYqOHq8YQq3hQzP1SU4ZTWx8cA== 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=DWTYtJHcwE1nOGCQIC86U7tETVaA3lP17mzj3p7MPUY=; b=FTDkHs7YBJMoLaNs+kgQA7ecTwanfqo0r4e3Ud5O7ugeSat/aKBeXeTH9MTJ3JksAoJO0XW8u/SKA9zg+L91tsJQYZDovg1YibA8X4BqnckGqRh680JxQ+jo4S3dmRmvoQJKLSA1HoDJAcvvMtd93zFwsW18ioEap2QHwvOCeGE= Received: from DM5PR1801MB2058.namprd18.prod.outlook.com (2603:10b6:4:67::31) by DM6PR18MB3603.namprd18.prod.outlook.com (2603:10b6:5:2a5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Wed, 23 Dec 2020 09:40:16 +0000 Received: from DM5PR1801MB2058.namprd18.prod.outlook.com ([fe80::303b:5c79:93c7:b432]) by DM5PR1801MB2058.namprd18.prod.outlook.com ([fe80::303b:5c79:93c7:b432%7]) with mapi id 15.20.3676.033; Wed, 23 Dec 2020 09:40:16 +0000 From: Michael Shamis To: Liron Himi , Jerin Jacob Kollanukkaran CC: "dev@dpdk.org" , Liron Himi Thread-Topic: [dpdk-dev] [PATCH v1 19/38] net/mvpp2: replace 'qos_cfg' with 'cfg' Thread-Index: AQHWyJSPsiP26LPV3UCdu17B0uCF7aoEjgVw Date: Wed, 23 Dec 2020 09:40:15 +0000 Message-ID: References: <20201202101212.4717-1-lironh@marvell.com> <20201202101212.4717-20-lironh@marvell.com> In-Reply-To: <20201202101212.4717-20-lironh@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [83.130.154.133] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cae7addf-ea1e-42c1-dc94-08d8a726c0f9 x-ms-traffictypediagnostic: DM6PR18MB3603: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1rat+Bxw0GxLYVlCjfWJ5pOuF1pAXMo1sKm4p/AiZYen/cOqxBTZPmxYfiGvZXqxvR3VWHlNzSTaypjRNOGTpk3O5dnCWfCPRqKy9PwIvrn2Ju3zXjoiN1whA9SaZVjAK4x7ig8zMnKvsVz9I2lP5QflfHwh7TvD6Ype7t/SMVpGTtX5rtQQe7RwMQ/WOX45vIaOUm0sZ0MMKEy6J8gL9xc+hwHCS7KoDuc9qBIx4jlel32AgzWkv2fJGcpqEMxkVqxo0FXFNAXt2EagOfVM5TJ2vN8bb/34CJs0Jw7KBS9URFgLeIuy1wG1Jx9jGgG0NqW2ME9nhiAOa1FRateuKJGzGZHG49dxlhWPIYELTSM6uP16Na+YcBFquqUl8lCSvV0aoBCT+xKRv0u8GiTNWA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR1801MB2058.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(346002)(366004)(376002)(396003)(66446008)(53546011)(54906003)(66556008)(52536014)(66476007)(66946007)(4326008)(5660300002)(64756008)(107886003)(33656002)(8676002)(9686003)(6506007)(76116006)(55016002)(6636002)(86362001)(71200400001)(478600001)(7696005)(186003)(2906002)(110136005)(316002)(83380400001)(26005)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?EFpd4qbHEmZWw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HrWupUdYQ?= =?us-ascii?Q?d9yc+sdcULiSr/azP4AUt5HR7SCjGX3wkCjnq4UHldnm87v6F4BBJdtKgAhy?= =?us-ascii?Q?P6fVQDUD3bdmEqD+4h7iVhtBljMWF3A2isoON0YpJ6g=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: DM5PR1801MB2058.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cae7addf-ea1e-42c1-dc94-08d8a726c0f9 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2020 09:40:15.9912 (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: txainJdnXRardcaNa88vZGuo+aQc3VntIbJhItptx2GpdDdyxpms9mrLkXBnk3P4hAqYuS6//IE3D/BjXWfybQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB3603 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-23_04:2020-12-21, 2020-12-23 signatures=0 Subject: Re: [dpdk-dev] [PATCH v1 19/38] net/mvpp2: replace 'qos_cfg' with 'cfg' X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Reviewed-by: Michael Shamis -----Original Message----- From: dev On Behalf Of lironh@marvell.com Sent: Wednesday, December 2, 2020 12:12 PM To: Jerin Jacob Kollanukkaran Cc: dev@dpdk.org; Liron Himi Subject: [dpdk-dev] [PATCH v1 19/38] net/mvpp2: replace 'qos_cfg' with 'cfg= ' From: Liron Himi as the config file is not just for 'qos' it is more accurate to replace the name from 'qos_cfg' to 'cfg' Signed-off-by: Liron Himi Reviewed-by: Liron Himi --- drivers/net/mvpp2/mrvl_ethdev.c | 12 ++++++------ drivers/net/mvpp2/mrvl_qos.c | 31 +++++++++++++++---------------- drivers/net/mvpp2/mrvl_qos.h | 13 ++++++------- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethde= v.c index 1be607b61..6bd3b0430 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -696,9 +696,9 @@ mrvl_dev_start(struct rte_eth_dev *dev) priv->pp_id, priv->ppio_id); priv->ppio_params.match =3D match; priv->ppio_params.eth_start_hdr =3D PP2_PPIO_HDR_ETH; - if (mrvl_qos_cfg) + if (mrvl_cfg) priv->ppio_params.eth_start_hdr =3D - mrvl_qos_cfg->port[dev->data->port_id].eth_start_hdr; + mrvl_cfg->port[dev->data->port_id].eth_start_hdr; =20 /* * Calculate the minimum bpool size for refill feature as follows: @@ -794,8 +794,8 @@ mrvl_dev_start(struct rte_eth_dev *dev) } =20 /* For default QoS config, don't start classifier. */ - if (mrvl_qos_cfg && - mrvl_qos_cfg->port[dev->data->port_id].use_global_defaults =3D=3D 0) = { + if (mrvl_cfg && + mrvl_cfg->port[dev->data->port_id].use_global_defaults =3D=3D 0) { ret =3D mrvl_start_qos_mapping(priv); if (ret) { MRVL_LOG(ERR, "Failed to setup QoS mapping"); @@ -3237,7 +3237,7 @@ rte= _pmd_mrvl_probe(struct rte_vdev_device *vdev) * The below system initialization should be done only once, * on the first provided configuration file */ - if (!mrvl_qos_cfg) { + if (!mrvl_cfg) { cfgnum =3D rte_kvargs_count(kvlist, MRVL_CFG_ARG); MRVL_LOG(INFO, "Parsing config file!"); if (cfgnum > 1) { @@ -3245,7 +3245,7 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev) goto out_free_kvlist; } else if (cfgnum =3D=3D 1) { rte_kvargs_process(kvlist, MRVL_CFG_ARG, - mrvl_get_qoscfg, &mrvl_qos_cfg); + mrvl_get_cfg, &mrvl_cfg); } } =20 diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c in= dex 976cb06a8..18cf470dd 100644 --- a/drivers/net/mvpp2/mrvl_qos.c +++ b/drivers/net/mvpp2/mrvl_qos.c @@ -71,8 +71,8 @@ /** Maximum possible value of DSCP. */ #define MAX_DSCP 63 =20 -/** Global QoS configuration. */ -struct mrvl_qos_cfg *mrvl_qos_cfg; +/** Global configuration. */ +struct mrvl_cfg *mrvl_cfg; =20 /** * Convert string to uint32_t with extra checks for result correctness. @@ -104,12 +104,12 @@ get_val_securely(const char *string, uint32_t *val) * @param file Path to the configuration file. * @param port Port number. * @param outq Out queue number. - * @param cfg Pointer to the Marvell QoS configuration structure. + * @param cfg Pointer to the Marvell configuration structure. * @returns 0 in case of success, negative value otherwise. */ static int get_outq_cfg(struct rte_cfgfile *file, int port, int outq, - struct mrvl_qos_cfg *cfg) + struct mrvl_cfg *cfg) { char sec_name[32]; const char *entry; @@ -315,7 +315,7 @@ get_entry_values(const char *entry, uint8_t *tab, */ static int parse_tc_cfg(struct rte_cfgfile *file, int port, int tc, - struct mrvl_qos_cfg *cfg) + struct mrvl_cfg *cfg) { char sec_name[32]; const char *entry; @@ -409,7 +409,7 @@ parse_tc_cfg(struct rte_cfgfile *file, int port, int tc= , */ static int parse_policer(struct rte_cfgfile *file, int port, const char *sec_name, - struct mrvl_qos_cfg *cfg) + struct mrvl_cfg *cfg) { const char *entry; uint32_t val; @@ -478,7 +478,7 @@ parse_policer(struct rte_cfgfile *file, int port, const= char *sec_name, } =20 /** - * Parse QoS configuration - rte_kvargs_process handler. + * Parse configuration - rte_kvargs_process handler. * * Opens configuration file and parses its content. * @@ -488,10 +488,9 @@ parse_policer(struct rte_cfgfile *file, int port, cons= t char *sec_name, * @returns 0 in case of success, exits otherwise. */ int -mrvl_get_qoscfg(const char *key __rte_unused, const char *path, - void *extra_args) +mrvl_get_cfg(const char *key __rte_unused, const char *path, void=20 +*extra_args) { - struct mrvl_qos_cfg **cfg =3D extra_args; + struct mrvl_cfg **cfg =3D extra_args; struct rte_cfgfile *file =3D rte_cfgfile_load(path, 0); uint32_t val; int n, i, ret; @@ -506,7 +505,7 @@ mrvl_get_qoscfg(const char *key __rte_unused, const cha= r *path, /* Create configuration. This is never accessed on the fast path, * so we can ignore socket. */ - *cfg =3D rte_zmalloc("mrvl_qos_cfg", sizeof(struct mrvl_qos_cfg), 0); + *cfg =3D rte_zmalloc("mrvl_cfg", sizeof(struct mrvl_cfg), 0); if (*cfg =3D=3D NULL) { MRVL_LOG(ERR, "Cannot allocate configuration %s\n", path); return -1; @@ -764,8 +763,8 @@ mrvl_configure_rxqs(struct mrvl_priv *priv, uint16_t po= rtid, { size_t i, tc; =20 - if (mrvl_qos_cfg =3D=3D NULL || - mrvl_qos_cfg->port[portid].use_global_defaults) { + if (mrvl_cfg =3D=3D NULL || + mrvl_cfg->port[portid].use_global_defaults) { /* * No port configuration, use default: 1 TC, no QoS, * TC color set to green. @@ -783,7 +782,7 @@ mrvl_configure_rxqs(struct mrvl_priv *priv, uint16_t po= rtid, } =20 /* We need only a subset of configuration. */ - struct port_cfg *port_cfg =3D &mrvl_qos_cfg->port[portid]; + struct port_cfg *port_cfg =3D &mrvl_cfg->port[portid]; =20 priv->qos_tbl_params.type =3D port_cfg->mapping_priority; =20 @@ -896,10 +895,10 @@ mrvl_configure_txqs(struct mrvl_priv *priv, uint16_t = portid, uint16_t max_queues) { /* We need only a subset of configuration. */ - struct port_cfg *port_cfg =3D &mrvl_qos_cfg->port[portid]; + struct port_cfg *port_cfg =3D &mrvl_cfg->port[portid]; int i; =20 - if (mrvl_qos_cfg =3D=3D NULL) + if (mrvl_cfg =3D=3D NULL) return 0; =20 priv->ppio_params.rate_limit_enable =3D port_cfg->rate_limit_enable; diff= --git a/drivers/net/mvpp2/mrvl_qos.h b/drivers/net/mvpp2/mrvl_qos.h index = 0934752cf..928cfe366 100644 --- a/drivers/net/mvpp2/mrvl_qos.h +++ b/drivers/net/mvpp2/mrvl_qos.h @@ -17,8 +17,8 @@ /** Value used as "unknown". */ #define MRVL_UNKNOWN_TC (0xFF) =20 -/* QoS config. */ -struct mrvl_qos_cfg { +/* config. */ +struct mrvl_cfg { struct port_cfg { enum pp2_ppio_eth_start_hdr eth_start_hdr; int rate_limit_enable; @@ -48,11 +48,11 @@ struct mrvl_qos_cfg { } port[RTE_MAX_ETHPORTS]; }; =20 -/** Global QoS configuration. */ -extern struct mrvl_qos_cfg *mrvl_qos_cfg; +/** Global configuration. */ +extern struct mrvl_cfg *mrvl_cfg; =20 /** - * Parse QoS configuration - rte_kvargs_process handler. + * Parse configuration - rte_kvargs_process handler. * * Opens configuration file and parses its content. * @@ -62,8 +62,7 @@ extern struct mrvl_qos_cfg *mrvl_qos_cfg; * @returns 0 in case of success, exits otherwise. */ int -mrvl_get_qoscfg(const char *key __rte_unused, const char *path, - void *extra_args); +mrvl_get_cfg(const char *key __rte_unused, const char *path, void=20 +*extra_args); =20 /** * Configure RX Queues in a given port. -- 2.28.0