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 69619A0A0F; Wed, 7 Apr 2021 22:13:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52AFD140F4F; Wed, 7 Apr 2021 22:13:43 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9D796140F29 for ; Wed, 7 Apr 2021 22:13:41 +0200 (CEST) IronPort-SDR: lDOWNyo8V33sQCOcyRcqTkjh9ATFyn3zn4vEA00zPip7nmGQYzumrgO04yT1P8AC6t9s8rV9Dh 2AL73bCRBt+Q== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="193504877" X-IronPort-AV: E=Sophos;i="5.82,204,1613462400"; d="scan'208";a="193504877" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 13:13:40 -0700 IronPort-SDR: CS+9MrsRFi+5RKczIt6sNU1ix93OLh7FLx7a4R8WFL8RrXcEkj1lJHuECnLXuJifI/WstBM0KV mRfyJwo4nCJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,204,1613462400"; d="scan'208";a="418882473" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga007.jf.intel.com with ESMTP; 07 Apr 2021 13:13:40 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 7 Apr 2021 13:13:39 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2106.2 via Frontend Transport; Wed, 7 Apr 2021 13:13:39 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 7 Apr 2021 13:13:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OTRQVv1F26U4nz+KqFd5Xq0ZyR6XcgoH4WQZXRx09tctMN7wcMuzjIBkqOV2Z8Qs8KuCI0uPEq+pOE/UCf9AFZD+Pe4iK088fa486LrEAvQRs43C1qKjYYtB2JBSI9J/dz8/6bE59/SK4m0t42TvXTelhbPntI0IunXmi3WNty0wA4/lniVmjokZ5XOXwrNZTeLYhjvvPeqNqWzmxLYY+YBcXGMpDUCUnLtddNTakHKQZjTB1Mib4IYiLhwSG8ss+VRLVTeXy2A2CPKbSZLl15T0JHQdRmT2h/kzcRTHmfjtk02PHI9EsvOqJptOtP5tIOdED5MwtHCaSh6V0dukyw== 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=tYRKjaiVpos7/u7REpEipYen2diGBNSUg+AChjBrENE=; b=P6CWBxPqKvVZ6fZnt1eJ2Z5D57X/QbXu2x9/0aZhUg7B7fLHiIXhanv8Xa9CP4IR23H5NxPmBLGEXPaWkMY4rtlwUlM8U8dl9CTxH92FJZECJcVQWkeYQ/8qsfT3dW43d3hix4eztQ+2gh67JGSX1BWceQ42HQ6R9aIy6xgkDtRdPJy0LFvr4aKL14CiaZm72j2KohXHoqEQG8JeXfRWpXQbj0utagtKn9kbG8in6zFGoa2X/iweH0Wv3MwEcbLpNAeQ3qsYiz3wLwgTmIqzs3UOCBQETIz5LBfIzWyyM5GCHXi6CtOUgaxsEKH7UAROvF9ctm2uWOa68bNyyAnsjA== 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=tYRKjaiVpos7/u7REpEipYen2diGBNSUg+AChjBrENE=; b=GjNSEvuWmzeZ+SzP4jLutDGWLNSdKKsbhITiX97Vaky80+r/zDF9ffUvbojp5u0yn2NhKLJOy6R9u9x9dC99W2Xz+mRbwenSzOgIyFbKChAmLfyWKOj6Kd+StwWe3wlUc0XZt+zqxVSFLYN54cucvvz0l9n4CBRZWA561wza3Ng= Received: from DM6PR11MB2796.namprd11.prod.outlook.com (2603:10b6:5:c8::23) by DM6PR11MB4579.namprd11.prod.outlook.com (2603:10b6:5:2ab::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.26; Wed, 7 Apr 2021 20:13:36 +0000 Received: from DM6PR11MB2796.namprd11.prod.outlook.com ([fe80::b5d2:6f20:3c0:3627]) by DM6PR11MB2796.namprd11.prod.outlook.com ([fe80::b5d2:6f20:3c0:3627%7]) with mapi id 15.20.3999.032; Wed, 7 Apr 2021 20:13:36 +0000 From: "Dumitrescu, Cristian" To: Li Zhang , "dekelp@nvidia.com" , "orika@nvidia.com" , "viacheslavo@nvidia.com" , "matan@nvidia.com" , "shahafs@nvidia.com" , "lironh@marvell.com" CC: "dev@dpdk.org" , "thomas@monjalon.net" , "rasland@nvidia.com" , "roniba@nvidia.com" Thread-Topic: [PATCH 2/2] net/mvpp2: check meter packet mode Thread-Index: AQHXJr6RgUVheDoOekmRm4HIA5/x1Kqph3Cw Date: Wed, 7 Apr 2021 20:13:36 +0000 Message-ID: References: <20210401061618.1478961-1-lizh@nvidia.com> <20210401061618.1478961-3-lizh@nvidia.com> In-Reply-To: <20210401061618.1478961-3-lizh@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [109.79.23.215] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: be246818-6721-4f68-2004-08d8fa01a09f x-ms-traffictypediagnostic: DM6PR11MB4579: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2043; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4rp7EduaiI23MbVTvYQ9HDdtnRAtqu0fgd/chERg67PRGwyLGTXOJRjYK/8tkHw2XLV5QuRjP040evz7w59qgBvn/sH8Vgfnc9Om2q2bs8ARKgSM+8/7GULw0eoW3W0BxRjoajfSlnOF22QmAfCbLZmtfZHQ3zu+ag0ZxUbjVkR35oOg8LDzP7VEomRBRHoWOB+ygwGzOB7srJ0+eGggf1ZcYoQts22IDe/hUGjM59UDaD8rppVguzU3EQ1B3bs3ZxaUZwLmYF9jyc1Ii7LaqqL7nntspFORAGU6OaIxtkSFgI/zGz1hYYPTndo0AgsbeyADqCSYeN1fCMhmc8ASmN9Joa0xf4u7aV2TBlJVpSpY3OZBZ9PqzUMqI+4poIhJF2RyrJRaFYP3AWUy0VZB+BRumsOTlsk3iWUAH8CXZe1xQ3CDOLAXOrFvRC3D7nhtYGRsKx6AkWbLA8AHJFfTwI6oGXO4FnSPjWjb7J6YFqPSXuej/bmQ1tfCWW01t6y7AY6hs5dho245HziMgzbLiBjCximRUgb4FLRm2UWq6n+T7PfyYelurpNyQmMdkHMMO2Nvnq7m2EvIkEuVkg0livuKoRNtqtXcPcYsLq1apReVZjNnwGgMuiskTKjkKxMfV2tmK/GMv654ZahMmi/VUeBF3XfI/1VamSanhoC0A64= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2796.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(346002)(366004)(396003)(39860400002)(136003)(52536014)(2906002)(26005)(8936002)(186003)(66556008)(64756008)(66446008)(33656002)(5660300002)(8676002)(66946007)(110136005)(66476007)(76116006)(54906003)(7696005)(55016002)(7416002)(9686003)(6506007)(53546011)(86362001)(4326008)(71200400001)(38100700001)(83380400001)(478600001)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?HzvjG18c016IJFIF3QFkdKBDMYAexXKfFj4Tc7fdbH4UyXQNHim0C5tgvg2j?= =?us-ascii?Q?U+bxHtrmtCoJSqTLxFFdFI3UaUB2ZXbKvQtRp172Pou6YvzBkup9B2Go+G2F?= =?us-ascii?Q?cSFKYMfOfQPHaSA6LVkUNwm9sqDFIz0mj+96m/PloC4sathryAXrb6xo5Y3o?= =?us-ascii?Q?9Cp+a0XxFNaKk+Ku70JJPcUexBBlDEoaxSikZ/d/jOI1y54t8IIxmR4Ya/lb?= =?us-ascii?Q?tmTINhg1LwHu1EKxoaE3vEyjawtkZRoM75/NHmZ9kRL7wPREXO3QprnZph7f?= =?us-ascii?Q?FhWyOsRH+BbjspCKP3Wi4ajS7vdBo07Fz+iEHQ+5ngJ2xTG//TINpSzfDz3Q?= =?us-ascii?Q?Q9AD2wN60BbSH+AxGmVq2ECuhQkaaukhkLJUmIVkL/A+2rbiXhh43RB0r7IH?= =?us-ascii?Q?MpCl67mv4Xk/+pnJgIaxh9msNj3+VuNyfLUiyw/vERSfOjvbw241RHfqD3S7?= =?us-ascii?Q?92UujKZaRoicKUNYlzBVviDujB7Jiwnlo1i27vpLRudDkJMtAB1HzAf5Csys?= =?us-ascii?Q?YRb0Z8xCCpmksPrj+EcoXx9VoJyrlw6N3iYwwZYgStHFcDuG2Psm4G8R1FF5?= =?us-ascii?Q?ZWLUQB1LR4vA7Au7GYzTNptVfznP3QZy6IAJmqiRRlFZQlj4KX8vcFTKYL7t?= =?us-ascii?Q?o3x/hxGLcBN453bmCiGE3cgHQw4KCsWG3tEQONbWfRSgt65qNFmkOCY9uCNT?= =?us-ascii?Q?+tY/70bpU7d5KJJswMMits4x9fxBPM2xpoT7mePENfeo/Iq6JCsWnu+J4mWl?= =?us-ascii?Q?F9Iq4JNc3kNURRf06RhezUrq6sZD9X/tMPA0mM7YXhTAfPpv5Vmfa2Z/MN/m?= =?us-ascii?Q?HgaXJdO7dSE63a8bOHjeYv6KdKG740ivdgdHeOqISpOohnFfxIeWqeiRi0OR?= =?us-ascii?Q?ljc8ogx75PYW9LJLUpRkH+rvlGBCkeKql+gTDKKAWPLozM4Y3zJ61DG/Jj+j?= =?us-ascii?Q?PYgTBjOMxLLCc4U/UZhe7ytwdYUEciXJQebIApR2IUBasLIdtNnnjP0b0X6F?= =?us-ascii?Q?jiUDZSA5BUTN+aqigMyffOR/s+4edHJU+gQ0MAw8UCaUmubWvUHq5ewLtTFP?= =?us-ascii?Q?QNzeeknzuKhonk/2/qYPogjoK3SYtAlJGP3xD1j2MQSQR21HA6h1ET2epOQ5?= =?us-ascii?Q?1aJ9mvtPm5I82ZJMFMFfOs5uQrSWk0DoxcZzh9R8GVZeoUgIjbIqfAxSAYrL?= =?us-ascii?Q?4LQxjbS1CHJ/FILT3B2u5k8ok2txSBzCX2Ntnx7ym4wEeuHSxfnhIolxlHCN?= =?us-ascii?Q?v6ThY4WUoSt3YjT7tiOFwvvG/Z+iYaSZB7Je7hTILFB/Sq5qeL4fe9XnlcKB?= =?us-ascii?Q?LArnUYSYlStv1vhnaudas2Ho?= x-ms-exchange-transport-forked: True 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: DM6PR11MB2796.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: be246818-6721-4f68-2004-08d8fa01a09f X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2021 20:13:36.8400 (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: nnEXZZSfFICw8UsNueFNwDIfXt+VHs1qTsZ5O0mI218FE5f0c9iFlEoLDtV9WMgVI0VY3TgD2Xnqt+J20LULPzKudDg0udgIFC0wg070DyQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4579 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/2] net/mvpp2: check meter packet mode 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" > -----Original Message----- > From: Li Zhang > Sent: Thursday, April 1, 2021 7:16 AM > To: dekelp@nvidia.com; orika@nvidia.com; viacheslavo@nvidia.com; > matan@nvidia.com; shahafs@nvidia.com; Dumitrescu, Cristian > ; lironh@marvell.com > Cc: dev@dpdk.org; thomas@monjalon.net; rasland@nvidia.com; > roniba@nvidia.com > Subject: [PATCH 2/2] net/mvpp2: check meter packet mode >=20 > Currently meter algorithms only supports bytes per second(BPS). > Check packet_mode set to TRUE are rejected. >=20 > Signed-off-by: Li Zhang > --- > drivers/net/mvpp2/mrvl_mtr.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/net/mvpp2/mrvl_mtr.c b/drivers/net/mvpp2/mrvl_mtr.c > index 2fa5cb43ad..055be6f6b1 100644 > --- a/drivers/net/mvpp2/mrvl_mtr.c > +++ b/drivers/net/mvpp2/mrvl_mtr.c > @@ -88,6 +88,12 @@ mrvl_meter_profile_add(struct rte_eth_dev *dev, > uint32_t meter_profile_id, > NULL, > "Only srTCM RFC 2697 is > supported\n"); >=20 > + if (profile->packet_mode) > + return -rte_mtr_error_set(error, EINVAL, > + > RTE_MTR_ERROR_TYPE_UNSPECIFIED, Can you please add a new error type for this specific error case, i.e. RTE_= MTR_ERROR_TYPE_METER_PROFILE_PACKET_MODE. > + NULL, > + "Packet mode is not supported\n"); > + > prof =3D mrvl_mtr_profile_from_id(priv, meter_profile_id); > if (prof) > return -rte_mtr_error_set(error, EEXIST, > -- > 2.27.0