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 DA50EA0C3F; Thu, 15 Apr 2021 18:44:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0320162368; Thu, 15 Apr 2021 18:44:37 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2074.outbound.protection.outlook.com [40.107.93.74]) by mails.dpdk.org (Postfix) with ESMTP id 57857162346 for ; Thu, 15 Apr 2021 18:44:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mp3ZsiOGK8NUK0ZVTN73GfqtiXaNrylTmFMngrY5sLJFZO9huvOkOCKqF172+ngs10sKy0i21VBhOGq4D0/Ozo0QWJ40z7rzMvilXccCoGD3fXE5id8oVOQwKAapTblRwC+sT+Yv95gpjeQxtyWaB7O6eDLjx/mmM5ZmMKFnxwoXbovYYQa6/1YUZVoUWW2nLBU9f9lUz1S7iyUk1sJx42fsV7z/Ayf8Yn8mIJcqiGfBJ5jT10lBAElC07/H3ImJoWRHSc098WIkz7b6UVPR3O9qSKbLb8jjsHmUmfmlrGXFxquVSKO2H9ef1vVrmZuwLDG2meYnTCMGL9fLh877Mw== 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=2gv/mkSC2GaB8FYA8OX+V800rzQgqdaB+g5ACXiY0zA=; b=hy5OR4mP14ZjILlx5JZv/i9n4Y7AHBX8pcHvgJneMptdm25Vc9UDE5jnRF9C+mbj9BV5tXL+2S1zAkuKUlnSo3hDexlrOtHf9SbVOmoWViJQAUz0tSAcRsroPukdjKExXDhpjr9EZAE7lkKaDtFvz2uNWZCATmMZCcnDBpnxMSvZUtrVGcJrXx0hV/qYiV8rlxa/Is/Q73czYvNka78ueCCQ6tHkmGEF7W3fjL0vpfwIHwObEN6/SA+D7h0qoo12vh3MkJOwVt5vwzBjP4Uk5WziAI1ORAi4lO++aYwISCgsJ9LwNdEOhj3zhTBm3RQOBHtQbfTmX3Rq7eBtYhBLMw== 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=2gv/mkSC2GaB8FYA8OX+V800rzQgqdaB+g5ACXiY0zA=; b=mT3O791Bb66wWrdW8E5850K4UdCmQcy2YmHWgEg/Fc7/Bc3dY3r6oSUOaey7V7VTUSUh+FxZw3mF2HLoiXEs3KkXxeWSMPZVJHXyyPSc0w0Nx93ezvvL+1vgKqxBRMz1B0bNZXv0IE+Fe3vpOGeiMmLziObDzVuDLeRa6KSrt1HDmkqe0qGJc3ZetdXqcAFZfDGhpfG1Mo5FUDFMpa0fqJTeGorsBCw0dL0U3E/Aevds6aj7JWKAt9oRhsoYT2710U3na4uO0tVri9VqyMH2jZSLKI4tlVTMKMnzpc3o2T2wyFPxtvFU03n+eqQ+GFCRUgDQuuMDUc3JbJ1cmkk5qg== Received: from MN2PR12MB2909.namprd12.prod.outlook.com (2603:10b6:208:103::13) by MN2PR12MB3632.namprd12.prod.outlook.com (2603:10b6:208:c1::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.22; Thu, 15 Apr 2021 16:44:34 +0000 Received: from MN2PR12MB2909.namprd12.prod.outlook.com ([fe80::7cbc:e499:e936:7408]) by MN2PR12MB2909.namprd12.prod.outlook.com ([fe80::7cbc:e499:e936:7408%7]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 16:44:34 +0000 From: Bing Zhao To: Ori Kam , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "andrew.rybchenko@oktetlabs.ru" CC: "dev@dpdk.org" , "ajit.khaparde@broadcom.com" Thread-Topic: [PATCH] ethdev: introduce conntrack flow action and item Thread-Index: AQHXMhPbqUQFLfltTEiE3UUBEtGdaKq1yEVg Date: Thu, 15 Apr 2021 16:44:34 +0000 Message-ID: References: <1616052616-344969-1-git-send-email-bingz@nvidia.com> <1618062393-205611-1-git-send-email-bingz@nvidia.com> In-Reply-To: Accept-Language: en-US, zh-CN 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: [154.18.175.67] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 241278ca-2a5f-4161-7e0c-08d9002dbfe3 x-ms-traffictypediagnostic: MN2PR12MB3632: 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:289; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RN7xEQP+SC0N/1sdnIuZ+HiHOIdiMzyA3Fe66+S5V2MibPG/mnsZH2BVvfMQLgEuFeW4gSMgtKiMcWsVqCNUpOwQogwLNLlmeR5AyKIjw0k/m/oCQfdUAh0bs9jIJrtPPWtyxbYrEEk3iSn60zH46akxYh8IY+QCy9kgYr3jlMQZZxfUrX00ZEJxYhwJLK1rwE1S9/OCnzRyWnYMgJaqHk1eY6i01FEeY461zKbssSh2h8/KXo7Lfv30UyWdqUDkYjRsUDXDdHBOdarENh92IRY6bat7iIHh6dGF+s0yhylqX7YyvtOVIredvQfgHPTn97bhATZxtzXyVC+fmiqv5sFL0RllwFQBwWt4j2z1Sq+ltTjLdySVKqkKL2jV8S/D4ksxrBexbgGvaq+coQEwiFWYfndrB+KETqqz8tTIqFEVxwaLmlPy7Jg5a3mrzUYLxGPi436uBqpodDH8eG7pICaZhSsO0pweeDjs3UNypcl7D3aQlD6PnLqVj9+MGQZBwxRnBZXWR9k+IJm9JNlVP6XFz3XFGXxWj3VkNa8BLuJCY+ZHsCvoaS51Gh25r/E4Go+uIMoQ7tW8WXpuHvCt5ljkakMnF3+aj6Q2Bun5CnfXcAKWVt8+OVt4xT/v7Y2n6takYAv6D2of5Kn2x08aGjBrEbU5bsXdpjkRALEfj4g48HFrnCDTrW1MOabjkLEw x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB2909.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(346002)(376002)(396003)(366004)(110136005)(54906003)(38100700002)(966005)(30864003)(6506007)(2906002)(52536014)(122000001)(45080400002)(33656002)(53546011)(5660300002)(83380400001)(186003)(7696005)(71200400001)(86362001)(8936002)(316002)(76116006)(9686003)(478600001)(8676002)(66946007)(55016002)(4326008)(64756008)(66556008)(66446008)(26005)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?NMVettB/7/byq8yljVR0tJCBKqTD4zUGYUJBL2y6B5+ktV758xQhc0x9896D?= =?us-ascii?Q?1wj+dXMniz/+Q7FVytg1kuJ/wnE4uvm/1J4fT05I5/I+cwXWGPaw7dMCh6bW?= =?us-ascii?Q?gkd3xT3poLZgWuDuvGqmlHKy8ZeGQvgEH7tzi9ozCxbxRJ+8X6wIbpIx8wuv?= =?us-ascii?Q?AaRj3Hkk5BlScNGzyy8/irP6tzVPwJ73iJJYNYuokcrsxIpDMJiHLgQgsqy7?= =?us-ascii?Q?H/ofFgvPvB+w1zrziqUAiG/T0fVoGHEnLHl/5FEVfMAlKXhwdUwB1FE7uvHc?= =?us-ascii?Q?sBlZtOAERRixGB/+5zu3YuyBR9VTZhq6e7A7Suemari7zQHJ6SkUvk73C9Mh?= =?us-ascii?Q?8/5mpcIvFcxoAAE7NIumT2Cq1OldiTOFC1EwRcO5W9PyOrQXpH/Uxj8Za1x4?= =?us-ascii?Q?Pv3baCpALFCCUDZYrUacv3kIdKfce+D1sKzB0qab/CvdsZC1rDxD/eiQoWzi?= =?us-ascii?Q?5RRW7atns4ArUj6b17x3TRoa7Ratvo8WnodxeHnNzIshAWbc8TeWT1O8PECk?= =?us-ascii?Q?0fyQHT2Kkdp6MB+u/b7zHNt57Rl2jIBYNA9q0P6Bx7JnluShuA7lkjFYG1fs?= =?us-ascii?Q?LtJl1sDxhQ1IogctVJHHI/cUQmICy8SRe88ea5mepJ1m6btKjXZL82T16o0Q?= =?us-ascii?Q?MwSO6vXC8iMvDcB0vQSHrWtpmatI0K1cUd/q++tYMbl19N1rsCg+5R+aIa2N?= =?us-ascii?Q?yxXj0JYyhpQIxKYK5/aZpUSZ7ULqwAPVKH8Bo43jfnsj3Pk6b5Dpex6QLZDP?= =?us-ascii?Q?h1BJbA79/80N7v+SAcMoRhMpmA0pBJAD+V9huAruxAhYYAxIowBwJVR5n9WQ?= =?us-ascii?Q?9VZwaKPEdq5wSDB4KUMKgn4dDVWeo6ZB7LJUyl8plFRunQxHmm5OE1zRAtX6?= =?us-ascii?Q?0oQAXSvoCiFAJ4p+1KOGdo2MlT35q7EIls2g5z1ba3Bir9VuLIgIYp/ENm2d?= =?us-ascii?Q?UYRfYelM4Yz2onuntrAE/Org6tTn8HaSWSlo1gld8GWOLLCc8XCtQrmsS1Cb?= =?us-ascii?Q?NlJFiB3kn3zY1QxdSzZmj3xwqccdEfYn+hU0eYNRVdRKx0HCTAGo+G/9sHpI?= =?us-ascii?Q?AadjoMQ4jelsudEsPzOHqz6/7UN/cUNuRE9gavKVX41n3xF0uh1KukBvY8GK?= =?us-ascii?Q?bGIxJNnJ02C4rvPebA01JWgZVuKywKESVXp9kKEzTVyYBymiuhY0LKMZQQyZ?= =?us-ascii?Q?C4KjhfqLWFC7mBvXfZUh9nxytXkyro6uyq14dBdOzX5Y1+T0yGy4zvRe63k9?= =?us-ascii?Q?bz33jgQ2IeDDrtuJRg5aIvFZnDhzw/QolWFegifjzOPpC5cssd2rGhjpUX9n?= =?us-ascii?Q?ARc8Bjzd1/u9p6n2UagFfV3K?= 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: MN2PR12MB2909.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 241278ca-2a5f-4161-7e0c-08d9002dbfe3 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2021 16:44:34.1292 (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: uYNMy7GcRKjVWsIHRa6pl2K6+rfhyn/P0vLlRJkZ1RpPIfmYwm7y7CBycj9n/kAbYdQnSlSI2pz1sTBEb8Rpeg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3632 Subject: Re: [dpdk-dev] [PATCH] ethdev: introduce conntrack flow action and item 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" Hi Ori, > -----Original Message----- > From: Ori Kam > Sent: Friday, April 16, 2021 12:25 AM > To: Bing Zhao ; NBU-Contact-Thomas Monjalon > ; ferruh.yigit@intel.com; > andrew.rybchenko@oktetlabs.ru > Cc: dev@dpdk.org; ajit.khaparde@broadcom.com > Subject: RE: [PATCH] ethdev: introduce conntrack flow action and > item >=20 > Hi Bing > I'm fine with this patch but you are missing the documentation part: > 1. doc/guides/prog_guide/rte_flow.rst > 2. doc/guides/rel_notes/release_21_05.rst Thanks for the comments and reminding. I will update the doc in the next ve= rsion v3. For v2, only testpmd CLI part is appended. It may need the reviewers help to review and confirm if my current CLI prop= osal is OK. >=20 > > -----Original Message----- > > From: Bing Zhao > > Sent: Saturday, April 10, 2021 4:47 PM > > To: Ori Kam ; NBU-Contact-Thomas Monjalon > > Subject: [PATCH] ethdev: introduce conntrack flow action and item > > > > This commit introduced the conntrack action and item. > > > > Usually the HW offloading is stateless. For some stateful > offloading > > like a TCP connection, HW module will help provide the ability of > a > > full offloading w/o SW participation after the connection was > > established. > > > > The basic usage is that in the first flow the application should > add > > the conntrack action and in the following flow(s) the application > > should use the conntrack item to match on the result. > > > > A TCP connection has two directions traffic. To set a conntrack > action > > context correctly, information from packets of both directions are > > required. > > > > The conntrack action should be created on one port and supply the > peer > > port as a parameter to the action. After context creating, it > could > > only be used between the ports (dual-port mode) or a single port. > The > > application should modify the action via the API > > "action_handle_update" only when before using it to create a flow > with > > opposite direction. This will help the driver to recognize the > > direction of the flow to be created, especially in single port > mode. > > The traffic from both directions will go through the same port if > the > > application works as an "forwarding engine" but not a end point. > > There is no need to call the update interface if the subsequent > flows > > have nothing to be changed. > > > > Query will be supported via action_ctx_query interface, about the > > current packets information and connection status. Tha fields > query > > capabilities depends on the HW. > > > > For the packets received during the conntrack setup, it is > suggested > > to re-inject the packets in order to take full advantage of the > > conntrack. Only the valid packets should pass the conntrack, > packets > > with invalid TCP information, like out of window, or with invalid > > header, like malformed, should not pass. > > > > Naming and definition: > > > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fel > ix > > > ir.bootlin.com%2Flinux%2Flatest%2Fsource%2Finclude%2Fuapi%2Flinux%2F > ne > > > tfilter%2Fnf_co&data=3D04%7C01%7Cbingz%40nvidia.com%7C84e54f991016 > 4c > > > 7214a008d9002afd2e%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C6375 > 41 > > > 006893523890%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2l > uM > > > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3Dd8QRJrA51j64m8VPY > fV > > pATTl5JrkD0nSUpQOZKco8T4%3D&reserved=3D0 > > nntrack_tcp.h > > > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fel > ix > > > ir.bootlin.com%2Flinux%2Flatest%2Fsource%2Fnet%2Fnetfilter%2Fnf_conn > tr > > > ack_proto_&data=3D04%7C01%7Cbingz%40nvidia.com%7C84e54f9910164c721 > 4a > > > 008d9002afd2e%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637541006 > 89 > > > 3523890%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi > LC > > > JBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3DlkZO7RQQsu3I1E0JWPhKWZ > rA > > VpOjlwWLA8WpJQUlme0%3D&reserved=3D0 > > tcp.c > > > > Other reference: > > > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fww > w. > > > usenix.org%2Flegacy%2Fevents%2Fsec01%2Finvitedtalks%2Frooij.pdf& > da > > > ta=3D04%7C01%7Cbingz%40nvidia.com%7C84e54f9910164c7214a008d9002afd2e%7 > C4 > > > 3083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637541006893523890%7CUnkno > wn > > %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWw > iLCJ > > > XVCI6Mn0%3D%7C1000&sdata=3DnsVJW1dJVZVRLBmkSnTtHBatAsavvEvL9vHFkIR > IY > > 8o%3D&reserved=3D0 > > > > Signed-off-by: Bing Zhao > > --- > > lib/librte_ethdev/rte_flow.h | 195 > > +++++++++++++++++++++++++++++++++++ > > 1 file changed, 195 insertions(+) > > > > diff --git a/lib/librte_ethdev/rte_flow.h > > b/lib/librte_ethdev/rte_flow.h index 6cc57136ac..d506377f7e 100644 > > --- a/lib/librte_ethdev/rte_flow.h > > +++ b/lib/librte_ethdev/rte_flow.h > > @@ -551,6 +551,15 @@ enum rte_flow_item_type { > > * See struct rte_flow_item_geneve_opt > > */ > > RTE_FLOW_ITEM_TYPE_GENEVE_OPT, > > + > > + /** > > + * [META] > > + * > > + * Matches conntrack state. > > + * > > + * See struct rte_flow_item_conntrack. > > + */ > > + RTE_FLOW_ITEM_TYPE_CONNTRACK, > > }; > > > > /** > > @@ -1685,6 +1694,51 @@ rte_flow_item_geneve_opt_mask =3D { }; > #endif > > > > +/** > > + * The packet is with valid state after conntrack checking. > > + */ > > +#define RTE_FLOW_CONNTRACK_FLAG_PKT_STATE_VALID (1 << 0) > > +/** > > + * The state of the connection was changed. > > + */ > > +#define RTE_FLOW_CONNTRACK_FLAG_PKT_STATE_CHANGED (1 << 1) > > +/** > > + * Error is detected on this packet for this connection and > > + * an invalid state is set. > > + */ > > +#define RTE_FLOW_CONNTRACK_FLAG_PKT_STATE_INVAL (1 << 2) > > +/** > > + * The HW connection tracking module is disabled. > > + * It can be due to application command or an invalid state. > > + */ > > +#define RTE_FLOW_CONNTRACK_FLAG_HW_DISABLED (1 << 3) > > +/** > > + * The packet contains some bad field(s) and cannot continue > > + * with the conntrack module checking. > > + */ > > +#define RTE_FLOW_CONNTRACK_FLAG_PKT_BAD (1 << 4) > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior > notice > > + * > > + * RTE_FLOW_ITEM_TYPE_CONNTRACK > > + * > > + * Matches the state of a packet after it passed the connection > > +tracking > > + * examination. The state is a bit mask of one > > +RTE_FLOW_CONNTRACK_FLAG* > > + * or a reasonable combination of these bits. > > + */ > > +struct rte_flow_item_conntrack { > > + uint32_t flags; > > +}; > > + > > +/** Default mask for RTE_FLOW_ITEM_TYPE_CONNTRACK. */ #ifndef > > +__cplusplus static const struct rte_flow_item_conntrack > > +rte_flow_item_conntrack_mask =3D > > { > > + .flags =3D 0xffffffff, > > +}; > > +#endif > > + > > /** > > * Matching pattern item definition. > > * > > @@ -2267,6 +2321,17 @@ enum rte_flow_action_type { > > * See struct rte_flow_action_modify_field. > > */ > > RTE_FLOW_ACTION_TYPE_MODIFY_FIELD, > > + > > + /** > > + * [META] > > + * > > + * Enable tracking a TCP connection state. > > + * > > + * Send packet to HW connection tracking module for > examination. > > + * > > + * See struct rte_flow_action_conntrack. > > + */ > > + RTE_FLOW_ACTION_TYPE_CONNTRACK, > > }; > > > > /** > > @@ -2859,6 +2924,136 @@ struct rte_flow_action_set_dscp { > > */ > > struct rte_flow_shared_action; > > > > +/** > > + * The state of a TCP connection. > > + */ > > +enum rte_flow_conntrack_state { > > + /**< SYN-ACK packet was seen. */ > > + RTE_FLOW_CONNTRACK_STATE_SYN_RECV, > > + /**< 3-way handshark was done. */ > > + RTE_FLOW_CONNTRACK_STATE_ESTABLISHED, > > + /**< First FIN packet was received to close the connection. */ > > + RTE_FLOW_CONNTRACK_STATE_FIN_WAIT, > > + /**< First FIN was ACKed. */ > > + RTE_FLOW_CONNTRACK_STATE_CLOSE_WAIT, > > + /**< Second FIN was received, waiting for the last ACK. */ > > + RTE_FLOW_CONNTRACK_STATE_LAST_ACK, > > + /**< Second FIN was ACKed, connection was closed. */ > > + RTE_FLOW_CONNTRACK_STATE_TIME_WAIT, > > +}; > > + > > +/** > > + * The last passed TCP packet flags of a connection. > > + */ > > +enum rte_flow_conntrack_tcp_last_index { > > + RTE_FLOW_CONNTRACK_FLAG_NONE =3D 0, /**< No Flag. */ > > + RTE_FLOW_CONNTRACK_FLAG_SYN =3D (1 << 0), /**< With SYN flag. */ > > + RTE_FLOW_CONNTRACK_FLAG_SYNACK =3D (1 << 1), /**< With SYN+ACK > > flag. */ > > + RTE_FLOW_CONNTRACK_FLAG_FIN =3D (1 << 2), /**< With FIN flag. */ > > + RTE_FLOW_CONNTRACK_FLAG_ACK =3D (1 << 3), /**< With ACK flag. */ > > + RTE_FLOW_CONNTRACK_FLAG_RST =3D (1 << 4), /**< With RST flag. > */ }; > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior > notice > > + * > > + * Configuration parameters for each direction of a TCP > connection. > > + */ > > +struct rte_flow_tcp_dir_param { > > + uint32_t scale:4; /**< TCP window scaling factor, 0xF to > disable. */ > > + uint32_t close_initiated:1; /**< The FIN was sent by this > direction. */ > > + /**< An ACK packet has been received by this side. */ > > + uint32_t last_ack_seen:1; > > + /**< If set, indicates that there is unacked data of the > connection. */ > > + uint32_t data_unacked:1; > > + /**< Maximal value of sequence + payload length over sent > > + * packets (next ACK from the opposite direction). > > + */ > > + uint32_t sent_end; > > + /**< Maximal value of (ACK + window size) over received packet > + > > length > > + * over sent packet (maximal sequence could be sent). > > + */ > > + uint32_t reply_end; > > + /**< Maximal value of actual window size over sent packets. */ > > + uint32_t max_win; > > + /**< Maximal value of ACK over sent packets. */ > > + uint32_t max_ack; > > +}; > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior > notice > > + * > > + * RTE_FLOW_ACTION_TYPE_CONNTRACK > > + * > > + * Configuration and initial state for the connection tracking > module. > > + * This structure could be used for both setting and query. > > + */ > > +struct rte_flow_action_conntrack { > > + uint16_t peer_port; /**< The peer port number, can be the same > port. > > */ > > + /**< Direction of this connection when creating a flow, the > value only > > + * affects the subsequent flows creation. > > + */ > > + uint32_t is_original_dir:1; > > + /**< Enable / disable the conntrack HW module. When disabled, > the > > + * result will always be RTE_FLOW_CONNTRACK_FLAG_DISABLED. > > + * In this state the HW will act as passthrough. > > + * It only affects this conntrack object in the HW without any > effect > > + * to the other objects. > > + */ > > + uint32_t enable:1; > > + /**< At least one ack was seen, after the connection was > established. > > */ > > + uint32_t live_connection:1; > > + /**< Enable selective ACK on this connection. */ > > + uint32_t selective_ack:1; > > + /**< A challenge ack has passed. */ > > + uint32_t challenge_ack_passed:1; > > + /**< 1: The last packet is seen that comes from the original > direction. > > + * 0: From the reply direction. > > + */ > > + uint32_t last_direction:1; > > + /**< No TCP check will be done except the state change. */ > > + uint32_t liberal_mode:1; > > + /**< The current state of the connection. */ > > + enum rte_flow_conntrack_state state; > > + /**< Scaling factor for maximal allowed ACK window. */ > > + uint8_t max_ack_window; > > + /**< Maximal allowed number of retransmission times. */ > > + uint8_t retransmission_limit; > > + /**< TCP parameters of the original direction. */ > > + struct rte_flow_tcp_dir_param original_dir; > > + /**< TCP parameters of the reply direction. */ > > + struct rte_flow_tcp_dir_param reply_dir; > > + /**< The window value of the last packet passed this conntrack. > */ > > + uint16_t last_window; > > + enum rte_flow_conntrack_tcp_last_index last_index; > > + /**< The sequence of the last packet passed this conntrack. */ > > + uint32_t last_seq; > > + /**< The acknowledgement of the last packet passed this > conntrack. */ > > + uint32_t last_ack; > > + /**< The total value ACK + payload length of the last packet > passed > > + * this conntrack. > > + */ > > + uint32_t last_end; > > +}; > > + > > +/** > > + * RTE_FLOW_ACTION_TYPE_CONNTRACK > > + * > > + * Wrapper structure for the context update interface. > > + * Ports cannot support updating, and the only valid solution is > to > > + * destroy the old context and create a new one instead. > > + */ > > +struct rte_flow_modify_conntrack { > > + /**< New connection tracking parameters to be updated. */ > > + struct rte_flow_action_conntrack new_ct; > > + uint32_t direction:1; /**< The direction field will be updated. > */ > > + /**< All the other fields except direction will be updated. */ > > + uint32_t state:1; > > + uint32_t reserved:30; /**< Reserved bits for the future usage. > */ }; > > + > > /** > > * Field IDs for MODIFY_FIELD action. > > */ > > -- > > 2.30.0.windows.2 BR. Bing