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 1CB3CA0524; Wed, 14 Apr 2021 10:32:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A7D2161812; Wed, 14 Apr 2021 10:32:00 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2041.outbound.protection.outlook.com [40.107.92.41]) by mails.dpdk.org (Postfix) with ESMTP id 1B6B1161808 for ; Wed, 14 Apr 2021 10:31:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MwEuwhpvyuBS4yH33hPC7c/9YDCrWgDiasJLX6qClKApTyT2h2NTCeesv/+Zpo6MUfvvDJWcf943hilV+xpNpDxbsbGuKoXQ0r25iE5pYul27CmN18i4jBnkb4z/N/9vZcgWxjC2omSWcVmTQQm8j8fNIkduOeewUmt8tUtpT1sJbLHiF5tPJhxaYWd9T9poCojTIOR2EhYzvYeV5nKP4QtbTD9g8CsWnzS7e/fk2a8N8Eh8DC2kLjTDyfxyXEsAJ0CDhbvMVAaK4zszYBHahzsXHAo0JUr9XGa/jCz6y+E3CgazJD3V5M3CiBxEYN6sK6Od8g3vk4hO6PXvRSZRyg== 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=Q4QcUAdcqtpGDpAVNzeC+u/b2ilbyypdP3RBpF9T9gA=; b=jm2Yu/Sc84HF7NGNOYHCO8enhWTiudW2lW282W9Jfg0cvvzFyVbyS3qk0UXsnEhmfOUwKOZjKE1onEiKnkHG9dIujyZeqShgHcEw857vXRcHCuGygqSR3pQJ+g5Aoz6OB3KRKHR0cIEylpAupGWp7S4RHUThZq49uioIyo5Ww5HQCPQaANxxVzVwwHDsKmWKIIs+5cnKjw/wL5KGHpZLEaX75h4w/LvZGCPgDZFr44v6Udg+44D1ERC4/Vra/gycTyhcagH1MdrekYiypkHd7EaZx1EzlDIX3Bgd777IGyuuumHd0icrdV3oM+64616Rl/vKcpyYow5MuWTS+qvn1w== 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=Q4QcUAdcqtpGDpAVNzeC+u/b2ilbyypdP3RBpF9T9gA=; b=SfVpMEm46A9FN8lSZKXlQu19vnL/iq7pOBdSYMmJw+A/gvwnCG0XevNRpBvmUOPV6uAxWCIfBDh3h5NqlXTHPFDw49w76OfOwADAftyT5uOExPl25m9hjaOPVC7nnet+X0J8n7B5YN2HPve2L+oB5L126216SyR5V8s5sAOD0xufuP0D8C8H/H7VdcOo8UJqbHBia6OlvfvDVSpIsUVBaLqxcAqewcWc8zgcEdxvKtPzvjqUuGJmF2Ctmi2wXKpcioLFlxnPszonAcXDHhS7MxEl1c4W0V5z96OIfbYt3rzjtwnIMCaT0Z7EvkbxZnzA5PFbcTOWKoBqg8cmK0DsvQ== Received: from MW2PR12MB2492.namprd12.prod.outlook.com (2603:10b6:907:8::19) by MWHPR12MB1408.namprd12.prod.outlook.com (2603:10b6:300:12::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.22; Wed, 14 Apr 2021 08:31:57 +0000 Received: from MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::997d:63f4:b22c:8d90]) by MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::997d:63f4:b22c:8d90%7]) with mapi id 15.20.3999.032; Wed, 14 Apr 2021 08:31:56 +0000 From: Matan Azrad To: NBU-Contact-Thomas Monjalon , "Dumitrescu, Cristian" , Li Zhang CC: Ori Kam , Slava Ovsiienko , "lironh@marvell.com" , Wisam Monther , "Li, Xiaoyun" , "Singh, Jasvinder" , "Yigit, Ferruh" , Andrew Rybchenko , Ray Kinsella , Jerin Jacob , Hemant Agrawal , "dev@dpdk.org" , Raslan Darawsheh , Roni Bar Yanai , Haifei Luo , "Jiawei(Jonny) Wang" Thread-Topic: [PATCH v3 1/2] ethdev: add pre-defined meter policy API Thread-Index: AQHXL/n+iCnR3j3tVEStuorCXLg/BKqyi2AAgADpV4CAADRJgIAACCPg Date: Wed, 14 Apr 2021 08:31:56 +0000 Message-ID: References: <20210318085815.804896-1-lizh@nvidia.com> <24522212.gn4sJpSb88@thomas> In-Reply-To: <24522212.gn4sJpSb88@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [216.228.117.190] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 868d88a1-5646-4e77-3936-08d8ff1fc3fa x-ms-traffictypediagnostic: MWHPR12MB1408: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fVjAqjUZak7MmfyaQEoQDKtv5POpqfqkZN1PnE6Pfht5Aljh24cnT0eLl5Y+0/0NXNPHPEfqiAqrO67ovlKr643eQ4/V4S5L4fBsW/ZVFHe+8BVYdXsIUEu24mvEa8Ydt6SPWEeYXWVHXIAU7lfuMOZGV6/Qu5wE6LXBZaiwkXKD3QzRWuLCFSok1WyZoY6TrvP6XdQtQM5SVu/YRJ9AEJutYQ0PVWV6ynPaoWhiVOAtVa4WthMbeoNIFEwBxd+Phzbf1u/nCg7WtH09DwXn16+mpXcLZJRX59HccgmvKSnURv5im5TMtv4p4FBHVtI9HYwsfUhWnXIDDokMETBgsMElKFIY4bVYh2mt+L2kY9lhMheNn9XWMhMxbtmimA3pxu3XlF5MVBXC5Mi4A0OJSOacoQRTlrZMdAfy37aEAoQidzYcm7zBptKISaIatNwensu2P7kTaPifD9TlETiEaMqGYs+ju2kVNloHE03Jsb1TD9h1IiTj6/KcdnntYGEf/MsB0Z9a/MHQEyDH8yNKJFVbc7Pz7sx8aL6fEcUuc/TiMdYqB7knDDa79Wa7kk/JUCFAhnKndNI2M4osBwJhCowo+VwNVNpw5ymRaN0LPuw= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB2492.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(39860400002)(376002)(346002)(136003)(33656002)(55016002)(4326008)(5660300002)(186003)(7416002)(38100700002)(110136005)(86362001)(76116006)(71200400001)(7696005)(9686003)(122000001)(2906002)(26005)(54906003)(52536014)(64756008)(66556008)(478600001)(8676002)(6636002)(66946007)(107886003)(66446008)(8936002)(316002)(66476007)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?he+8dpTUzVEqD6VmCyRPWCKuoT3lA4RQUPKUGrvjpSO2rsROzn9+dONx/H5v?= =?us-ascii?Q?NWKgT/9wu88tRSZEC1hUHLnb2UAhpmQw+jkGQQwbkfvpoc9eZE5j9Fsy5Di7?= =?us-ascii?Q?q2FSXMYJHWz4zNOCvdSEwOykUVlqZqgTtGCErszrhZ0sje3N0voJ96ntNxd6?= =?us-ascii?Q?2YeM93p6Rw6WAnKGqy3l+vhHY+UT9bd1XrMABwf+iH9gvAxfSlh0hWDKndBG?= =?us-ascii?Q?34cG7GI8nOHemF0pEhfwb747CDSYaVS8WxERakzXZuAg7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8pFwPzTLbLm6B6YPDPGOrziPJetVEv2aidqkKN3myD7HG?= =?us-ascii?Q?uAv3TmNVEsFyitdrObYCsfSCPu8/rYirbbtfzW+v4u2OGdg3W30317r+e4d5?= =?us-ascii?Q?aaxUVTVXgeXE3yYXrJ9Y4yKHTKX+C3iYkqHm72XzGok3q9WJfTdM7r1tBykp?= =?us-ascii?Q?WMZmL2W3TnYNePikTFW9IPWQ?= 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: MW2PR12MB2492.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 868d88a1-5646-4e77-3936-08d8ff1fc3fa X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2021 08:31:56.7451 (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: 64qh1GdPBaEzMb/P4Wos8u0pTw5fhzUJUfykQ+N4S3i1m7LHCFTM3m20dKqpkoj0CQyJdleHrxUZuuRdTjO2hQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1408 Subject: Re: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter policy API 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: Thomas Monjalon > Cristian, Li, please remove useless context when replying. >=20 > 14/04/2021 06:55, Li Zhang: > > > > + * Example #2: GREEN - Do nothing, YELLOW - Do nothing, RED - DROP > > > > + * struct rte_mtr_meter_policy_params policy_1 =3D > > > > + * (struct > > > > rte_mtr_meter_policy_params) { > > > > + * .actions[RTE_COLOR_GREEN] =3D NULL, > > > > + * .actions[RTE_COLOR_YELLOW] =3D NULL, > > > > + * .actions[RTE_COLOR_RED] =3D (struct rte_flow_action[]= ) { > > > > + * { > > > > + * .type =3D RTE_FLOW_ACTION_TYPE_DROP, > > > > + * }, > > > > + * { > > > > + * .type =3D RTE_FLOW_ACTION_TYPE_END, > > > > + * }, > > > > + * }, > > > > + * }; > > > > + * > > > > > > These two example policies should be available to be used straight > > > away, please make them real data structures, not comments. >=20 > Wait, you are giving code examples as part of doxygen? > It's really too long, we don't do that. >=20 > > > I suggest their names as: pass_color_policy_params and > > > drop_red_policy_params. > > > > > Thanks. Will change the names. But it can not be real data structures, = since it > just one example define and no use code. > > It will bring build as below: > > error: 'drop_red_policy_params' defined but not used. > > User can copy these example to his .c file when it using > rte_mtr_meter_policy_add(). >=20 > If you need to provide an example, we use the directory examples. > I see rte_mtr is not implemented in any example, so it could be a later > addition. +1 =20