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 EAA32A04B7; Sun, 4 Oct 2020 12:01:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33DB61BD25; Sun, 4 Oct 2020 12:01:57 +0200 (CEST) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id BDFCF1BD17 for ; Sun, 4 Oct 2020 12:01:52 +0200 (CEST) Received: from HKMAIL102.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 04 Oct 2020 18:01:47 +0800 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 4 Oct 2020 10:01:45 +0000 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.57) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 4 Oct 2020 10:01:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j6ENasQd7fm+dIGM6i+7f//xAgz8beLfZcicJ7Q5Fa2xLhN0LB0jwgoDLZE2PDn+NjUmV8jmdkeIrQ1sLi9QlNUyCfTgX7UfMq7O5xrxhmmEpU2peiwKqrDvnrZcS8WikPYLTyyGmwT9V08Fu+nv6nb7AifK6JbaCizsE/IKVB6orhX/8ZZm1CiodI65VkAtgXh6v1v8x3pqDK8gxmRHEqCMmVhzsP2Zj2x2+r+zbiKkkoR07aZGpouu2lN3RefKF541HG/u6OxoX6Ys8VtGWvfctdVljrqhILP4639c4ra/3MU5iUQzkh7Hwhh7Wl6ruWDF8rY1JAjhMItAhlYOyg== 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=OGDMj8bLOdFADfiSf2IdBO1+FA9Y4HMgVAHsbLKjZW4=; b=VuWqNTPZv77j3koGI4zZkGjbcbN7w+elihoziGODcApjPfcB2cgSknSsl9fOpjhL8DdT5Mh2TJ2l/ImgAm2dkT+1iij5X4iVgtcKpW0xZODGQTRvZvGTfURJEOANh2/mdkZ2jbny4EMgm62wovk67ROLjXqlVZh11AEwOxfnAZOId/hq9WF+Mqu2/CQXxHlZ9BZWscBjDwR7YZQqZ1znJLHXMYe6P1nfsyqrbzxKOqzb9/teOUPrtPVgKYs+bWvYakXkM0NgV2pPWVktnyRePQaMUw+r06vQJfHQ1YhqVEHG4qeooWBNqdy2auiMOrLyXRhGsG0QVbXGauqyfjP21A== 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 Received: from MN2PR12MB4286.namprd12.prod.outlook.com (2603:10b6:208:199::22) by MN2PR12MB4407.namprd12.prod.outlook.com (2603:10b6:208:260::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.39; Sun, 4 Oct 2020 10:01:43 +0000 Received: from MN2PR12MB4286.namprd12.prod.outlook.com ([fe80::61fd:a36e:cf4f:2d3f]) by MN2PR12MB4286.namprd12.prod.outlook.com ([fe80::61fd:a36e:cf4f:2d3f%8]) with mapi id 15.20.3433.042; Sun, 4 Oct 2020 10:01:43 +0000 From: Ori Kam To: Dekel Peled , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "wenzhuo.lu@intel.com" , "beilei.xing@intel.com" , "bernard.iremonger@intel.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 1/2] ethdev: support query of AGE action Thread-Index: AQHWmCm4JBWJYShVsE6RMwJIUGDEbamHNshA Date: Sun, 4 Oct 2020 10:01:42 +0000 Message-ID: References: <5a46a1ed26cd7e89483d06eaf676d44a088738f2.1601456245.git.dekelp@nvidia.com> <24deb8ad7d1b5a5d6e4d4a7da3ff85ba467b2774.1601580235.git.dekelp@nvidia.com> In-Reply-To: <24deb8ad7d1b5a5d6e4d4a7da3ff85ba467b2774.1601580235.git.dekelp@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [147.236.152.129] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7ddca032-93cd-46c9-c9d8-08d8684c7ef9 x-ms-traffictypediagnostic: MN2PR12MB4407: 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: H0oTmJmFwZGMUPID5U6YJBOY3K0z6uLv7a+yaJces7RL7j6qsaPqzZ1otjRGyIH/foX64ODpbkojlgn9fCcrer4JwArjhv2jKkq2RlAxOYFdYacUODAVzZ1QzNrMc9TBg9pgqkqfMxguQCnJVuObtYHFSUgtU5QIn/2nxsC/LiZrID8IyFYpp4rqlz4kjoTJ+i+OjIYsLifqN7vVCfCyiK/PNKhKERG/dHwLEqWEaeZ1sA152EID4x8gpb0GZ8BcAEQmlvWJQ2+4bAHEALXOwyTwWnTIKiGIO8k57DL7OrMo0g+Kwv7CoCjOPCM6BZJZ0zwtpQ+BNqo2Y4Pi5/qZTlZaXvAmQ9o6k1hwedcTfJI= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB4286.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(136003)(366004)(396003)(376002)(346002)(478600001)(7696005)(6506007)(53546011)(110136005)(966005)(83380400001)(8676002)(55016002)(4326008)(76116006)(86362001)(8936002)(26005)(52536014)(45080400002)(64756008)(66476007)(316002)(5660300002)(9686003)(66556008)(66946007)(66446008)(71200400001)(186003)(2906002)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: Rc7PPgEZY+6EjtJDaYdDstpdCz3uc7FL/WlXrBUEhmCXckXJQ4yL0xp19LiP3/SRYNSxctta4x88vq9RUeWHXPL/lOWgm9u+/7shVM/HJeMr3VOTIY+e6lXD6PujsD94Rn55+BnMJ3C1VyWR4GneWaoPPOkP6JHYztXANoCT91z0EgeCDEGlJ1x9R3U3G+V+pWtJbMhcG+uMO4Cu3SGeqUwRRfudUnJMWgEzZvIgfr3cywBTpFTnP9jZB6okh1uMkSTHzYHxZLE93EluO1qaT+e8KNEkSzFOpjgcdRJHtc5pYZu4fCklC0ytjgT8XrUrzE+Ki4x5ddeNXpvOqU+oSeOmAGlx8cM5xmt63caTafzCBO+QD21DtZIAR63wKwJGQiP/O2off/46KUP0iNPOXxZf6K1qk4QrChgT2Bau5/STuF3BkJcVcjHPDiv22A9Tib/mYkhb/RIAZgxv0ht/pS+0y73ISxYMVQpD87L0D7DUgzcDOcTKH/i+OD0M4qj4e0wD5RswdNlcQNeEZzCiYfgakkxKRi/EbbAzWcz/T+tN3T2gYcuiUZ7bZjoQU6LeTAYk94SZopZFoeHn5iJxUoAtCeMINsVgi+xVVjiL0tm2ReMAGwMnOu00UMQ04tIUBOlzNFvPZ/0q/FYKwDgYDw== 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: MN2PR12MB4286.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ddca032-93cd-46c9-c9d8-08d8684c7ef9 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2020 10:01:42.7807 (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: m7xO0SqJMPWnIm8SiXF7wjW3OTR0Y0tOxnTqT4hF1rSbaFwH4hn+327JxOmyx9BQuMY70nuP+Ad/uA/dj1h0NA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4407 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601805707; bh=OGDMj8bLOdFADfiSf2IdBO1+FA9Y4HMgVAHsbLKjZW4=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=CjnfTiBnG0rKYZ7AyQUAZRb84wbz/nIHp9FXre6xeFgaPAwLJ+g5MKGIwOaxaXZBQ elAuxR0SAwTSZ769b6gckIHZy7hbMjN7bYvcOomVgnWCZ8VNBK0dduPziI2AVwXJ+M 4sG78kANNvHW8PCSs0VS3IMd4EKz0zaw/MBgheN0wd3i3a4lE1ntULGt3xT2v4yzGV fsouqpgnedbneaueuVCOtLFO8lAd7zaJeirOeaBeGuJaSKbwjEC4az8fi1BiLLVk4D iwVcC8FsM+CG3JznKVGuRjhMJuvJd7ZBM2dcDzGmkV1UmtZRYe10KAgBVnxOoYcrDC ielkcxESGKCtg== Subject: Re: [dpdk-dev] [PATCH v2 1/2] ethdev: support query of AGE action 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" Hi Dekel, PSB > -----Original Message----- > From: Dekel Peled > Sent: Thursday, October 1, 2020 10:33 PM > Subject: [PATCH v2 1/2] ethdev: support query of AGE action >=20 > Existing API supports AGE action to monitor the aging of a flow. > This patch implements RFC [1], introducing the response format for query > of an AGE action. > Application will be able to query the AGE action state. > The response will be returned in the format implemented here. >=20 > [1] > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fmails= .dp > dk.org%2Farchives%2Fdev%2F2020- > September%2F180061.html&data=3D02%7C01%7Corika%40nvidia.com%7Ce > c8f8a845a284c153d7d08d86640d8e6%7C43083d15727340c1b7db39efd9ccc17 > a%7C0%7C1%7C637371776001401360&sdata=3Dy8g1yZiKsypXy%2BgsXtR5L > Q2yVQ%2FudbbCfbbM1Zwt5dY%3D&reserved=3D0 >=20 > Signed-off-by: Dekel Peled > Acked-by: Matan Azrad > --- > doc/guides/prog_guide/rte_flow.rst | 17 +++++++++++++++++ > doc/guides/rel_notes/release_20_11.rst | 3 +++ > lib/librte_ethdev/rte_flow.h | 14 ++++++++++++++ > 3 files changed, 34 insertions(+) >=20 > diff --git a/doc/guides/prog_guide/rte_flow.rst > b/doc/guides/prog_guide/rte_flow.rst > index 119b128..4b8d033 100644 > --- a/doc/guides/prog_guide/rte_flow.rst > +++ b/doc/guides/prog_guide/rte_flow.rst > @@ -2666,6 +2666,23 @@ timeout passed without any matching on the flow. > | ``context`` | user input flow context | > +--------------+---------------------------------+ >=20 > +Query structure to retrieve ageing status information of a > +shared AGE action, or a flow rule using the AGE action: > + > +.. _table_rte_flow_query_age: > + > +.. table:: AGE query > + > + +-------------------------+-----+-----------------------------------+ > + | Field | I/O | Value | > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D+=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D+ > + | ``aged`` | out | Aging timeout expired | > + +-------------------------+-----+-----------------------------------+ > + | ``last_hit_time_valid`` | out | ``last_hit_time`` field is valid | > + +-------------------------+-----+-----------------------------------+ > + | ``last_hit_time`` | out | Seconds since last traffic hit | > + +-------------------------+-----+-----------------------------------+ > + > Negative types > ~~~~~~~~~~~~~~ >=20 > diff --git a/doc/guides/rel_notes/release_20_11.rst > b/doc/guides/rel_notes/release_20_11.rst > index 7f9d0dd..dd77f04 100644 > --- a/doc/guides/rel_notes/release_20_11.rst > +++ b/doc/guides/rel_notes/release_20_11.rst > @@ -168,6 +168,9 @@ API Changes >=20 > * ethdev: ``rte_eth_rx_descriptor_done()`` API has been deprecated. >=20 > +* ethdev: Added struct ``rte_flow_query_age`` for use in response to que= ry > + of AGE action. > + > * Renamed internal ethdev APIs: >=20 > * ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_proces= s()`` > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > index da8bfa5..1a13802 100644 > --- a/lib/librte_ethdev/rte_flow.h > +++ b/lib/librte_ethdev/rte_flow.h > @@ -2130,6 +2130,7 @@ enum rte_flow_action_type { > * See struct rte_flow_action_age. > * See function rte_flow_get_aged_flows > * see enum RTE_ETH_EVENT_FLOW_AGED > + * See struct rte_flow_query_age > */ > RTE_FLOW_ACTION_TYPE_AGE, > }; > @@ -2194,6 +2195,19 @@ struct rte_flow_action_age { > }; >=20 > /** > + * RTE_FLOW_ACTION_TYPE_AGE (query) > + * > + * Query structure to retrieve the aging status information of a > + * shared AGE action, or a flow rule using the AGE action. > + */ > +struct rte_flow_query_age { > + uint32_t aged:1; /**< 1 if aging timeout expired, 0 otherwise. */ > + uint32_t last_hit_time_valid:1; /**< 1 if last_hit_time value valid. */ > + uint32_t reserved:6; /**< Reserved, must be zero. */ > + uint32_t last_hit_time:24; /**< Seconds since last traffic hit. */ > +}; >From previous patch, I asked you why set the reserved in the middle? Also I think last_hit_time is by definition time, that the rule was hit. I think you have couple of options: 1. keep last_hit_time but then set it to he time the last packet was seen. In this case the type should be changed to 64 bit. 2. set the name to remaining time - in this case it should show the remaini= ng time. I think that maybe this is worth adding in any case. Since I can see a lot = of uses to know how long this flow will age.=20 3. rename to seconds_since_last_hit =20 What do you think? > + > +/** > * @warning > * @b EXPERIMENTAL: this structure may change without prior notice > * > -- > 1.8.3.1