From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 5BD40A0C3F;
	Thu, 15 Apr 2021 18:24:51 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 2AD2D1623DE;
	Thu, 15 Apr 2021 18:24:51 +0200 (CEST)
Received: from NAM12-DM6-obe.outbound.protection.outlook.com
 (mail-dm6nam12on2074.outbound.protection.outlook.com [40.107.243.74])
 by mails.dpdk.org (Postfix) with ESMTP id 089B81623CF
 for <dev@dpdk.org>; Thu, 15 Apr 2021 18:24:50 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=fPzhR1UMDSvS0FlFUaBVKucWAU+v2VI2YamiTQf9SHq83EYeNWCB3WPSGvvviYEEvnopyB4XsoNYqRBZOHWvcl5X6WnhoOuQleUop+AZnycySyoont4Jjq5D/xqgvF+GYSBjOaMFW2Fam5p2lsFFBOq1ShWmPJP8GV6VReDVDuKUMbeOFf8QvbFF/5nUP26UZiynEkAp0JBY8isJQ2CGsrobZ4wvsAubDnUJPy/BrLoxTBKJwLEUxrc8uL+zlvkdRyPIbdCa/ANaC6IIfRKnOot3djauGQUDPlnyT0Zdcve6CT3K/5I6pOisImYY8Vt9vudaLnTu7Gr9anVhG/7Kag==
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=ufwLXHGnfgt0ODD8/LmqCvEaeHVJ4FkNs2gb8/RJtEo=;
 b=aIUZlCBkIOhtMzQX2Tm+qHldU9UjtlCNRy3TysYkNCHJe/ImC0O6ehhrbJWrK6RDCugnDXcw6BiH/06dD7dGEUEasRLuXhY1XAcIX7APzDlcj5QKj1BI0OjMSnPPEWexmg8wGWQ01woGtFetf2yMW869l82P4b178QiSv2k/CEYNNjHzMsRTSVTqCMjJKWl9+GJUefjVYbDmdpefl/bKjVocnSD+Tn2M6XopZAP0vVqIgtpyT0L8ds6gRwBMPW0osNfeJI5hjkcHWI4uqpMxSecW2jdxDGYnPpgpPqkX70NZTiYd9TzVVfGRfSkh0nXBs21byhTmGpduyhqwkZeQwg==
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=ufwLXHGnfgt0ODD8/LmqCvEaeHVJ4FkNs2gb8/RJtEo=;
 b=jiWAGrHQZqR53SV/BCcw5xoO7rG84BaVP+SabpCObaFGNQ9mQYw/DGTxkZiVuLihgy6dM3ElYOVMwvNzmBgM0PA4s2Nmz3v9faHc4Z+9uVcex8WhxR6iPajLfbPNRhzIK5HqW4KLNvM5vxUwAFsWRLfgiVZlyomk7Q+b5DxgQuHTLZxK3KXE+lJhzdOIQUM1g+uSRW+ThC4X5angsjQvZknnd8pDJwv5RjwkXUSM31g4LOrLN64J4afAA3QCJS9uIFlFRjH2pfOO7pxJnmLmAxzLnJbxayLm/b9mI7XGOPScfddnQDi5sUD9FA0MU8SZWmAa9uztOiwJvGZckW2PvA==
Received: from DM6PR12MB4987.namprd12.prod.outlook.com (2603:10b6:5:163::31)
 by DM6PR12MB4436.namprd12.prod.outlook.com (2603:10b6:5:2a3::20) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr
 2021 16:24:48 +0000
Received: from DM6PR12MB4987.namprd12.prod.outlook.com
 ([fe80::f5ce:c5a8:6aec:e308]) by DM6PR12MB4987.namprd12.prod.outlook.com
 ([fe80::f5ce:c5a8:6aec:e308%7]) with mapi id 15.20.4020.022; Thu, 15 Apr 2021
 16:24:48 +0000
From: Ori Kam <orika@nvidia.com>
To: Bing Zhao <bingz@nvidia.com>, NBU-Contact-Thomas Monjalon
 <thomas@monjalon.net>, "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
 "andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>
CC: "dev@dpdk.org" <dev@dpdk.org>, "ajit.khaparde@broadcom.com"
 <ajit.khaparde@broadcom.com>
Thread-Topic: [PATCH] ethdev: introduce conntrack flow action and item
Thread-Index: AQHXLg/yDa2VzRKoE0exwMblrdcFLaq1yEeg
Date: Thu, 15 Apr 2021 16:24:48 +0000
Message-ID: <DM6PR12MB49871290F5B0E2757655FA1AD64D9@DM6PR12MB4987.namprd12.prod.outlook.com>
References: <1616052616-344969-1-git-send-email-bingz@nvidia.com>
 <1618062393-205611-1-git-send-email-bingz@nvidia.com>
In-Reply-To: <1618062393-205611-1-git-send-email-bingz@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.145.126]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 84e54f99-1016-4c72-14a0-08d9002afd2e
x-ms-traffictypediagnostic: DM6PR12MB4436:
x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <DM6PR12MB44368E1D95898049D9C89BAED64D9@DM6PR12MB4436.namprd12.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:510;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: NtKvS9GTdgH2ru5CGPgwxjj4tX75Ihu9mEpYX0JFHznE+CO8sjKAR0+agJ/g2LplRSW/GP2gGZkpQWrhmD+XK3b+igaOdYH/s5dNkLShtXFxtL8b0TBWdsvATXz+IWUl0VMmQx1WY6Fle5pj9oUiH+OKykcHbruqzedUGUa5va7zZJsSuN1ct2M1uXyCtt38HLhWGRsP18bDOj8/MOST/ifNj/gXbxcb1CakXyReBhcasQ91t9mkLN07WEJ+vgoF5uhshilMVrIAFurhgNtneCO5xlZAHdbGJkCHkCvRH9KirTTL/FGdvJUucvDwbmMY/yj+K3DGH06FOlvGOERoVeVJEbuGckC31lKK8zvWwAOUcomfj8GsSxIxTq5cPK0roGsutGWbFEp+M0yCEIIEwyP/uPCoMpDMtw/y8lgpZXiKVYbbkK5q4uCa5gBm1i+Vd1y59PPgNduJOpLl8l4Dcc8GyXROxLl5u9bqthaeugO2Q6yCtYpFEuN5ZAOeNOa0mD1Gc4v8pdfExTTdY1CSe9IBK2f1rHEOdaU3xwZRtOIjiKIxC4VIvu0HJtcMYE/ZVhSqydmLaEiaSDI0qdzNi3d5rsT/zphzb8dVBqCcHO7pPVCOAQS1+pZXvlKZ2z7UQJTljb2YxNU3QenzD97CM9tOeiF5kdCW3HsAFkkD9djZXwCL+4HZhfsY99rawDx6
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:DM6PR12MB4987.namprd12.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(4636009)(136003)(376002)(366004)(396003)(39860400002)(346002)(966005)(33656002)(478600001)(53546011)(8676002)(122000001)(5660300002)(6506007)(26005)(83380400001)(110136005)(86362001)(186003)(54906003)(52536014)(71200400001)(2906002)(8936002)(66476007)(30864003)(7696005)(64756008)(76116006)(38100700002)(66446008)(55016002)(9686003)(316002)(66946007)(66556008)(4326008);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ksTTfYkhC7hYrOnc24tAFLZAUNO9pAa3dJ6+cSah0Ci1K0RvZw78k8q2A4fJ?=
 =?us-ascii?Q?2Srx3uNMcYEJoPKILBQ0QvQr+DFqzbO/0PI9CYq/85rBl9Mv7HgHX9YgVPDa?=
 =?us-ascii?Q?OLMGimHcy1O61OZJgkakYXg8F/eY8ezUpg7F96IkLNq+ebobYb1vqWnWB56Y?=
 =?us-ascii?Q?1w3C7878GWDQREuQce947aEvoWBJG8vk2KjeWSjHq2VEdzNPj+CrzaRb4r2b?=
 =?us-ascii?Q?ctBDqx+AwdLqJR+IPZO38AMRaYm9h0CeCDA1oCISKmI+Sbjj4jv3fUbDKSYN?=
 =?us-ascii?Q?CcBYn151SVHx29OLPcB+eCv68kFyz517u7v2XaliCVAZISybQtJtIO70ULZj?=
 =?us-ascii?Q?1nZ/hczqFzLSmov+gCA1zse9nhHrAIGNClIjhSBoWVe+153j1vbBJ3ElDZDW?=
 =?us-ascii?Q?hrEmQbohmo5ThAfeivdkuYht+udJfNnTVaXZTRZV5lf+lXLR2k7FXDf62mQO?=
 =?us-ascii?Q?saYQLXgHdvjSgR1P3rWnrf0oi9444fUbbWMA3/vpTJgsmkmoomqMJkpZ1xIb?=
 =?us-ascii?Q?QiSt2lYwVrNBPOlO78uop+L4ZLBC3luCJ6AJuKiBYUGpWUGnfCOAx5GAP+o4?=
 =?us-ascii?Q?rdP3Js6U4itSYH8ddp/bVW1fjwwaPan8pWM5f27szA0rQARYzHP3jgOD1Jqy?=
 =?us-ascii?Q?va7q1tlIRbbq/wn2fELJK/Gy65ZYeo1M3NNS+SOsFrfmftrQhcitbaoxwO+K?=
 =?us-ascii?Q?w3dbF4vWHKee767tx41b10mv3WGg2twZcfWlGxGrGNXBW3rhxikufAsf5dTe?=
 =?us-ascii?Q?bj3grVCZcdkNqle8CPF0GBxTRxGVpNZO8Xy2DorQkYFnxYg+4ntNUp0o0JYI?=
 =?us-ascii?Q?oWHg8vwyfuoCzS/mZqdn0BxxBIzELm5qqiosFy/0HZK1QYS+oxFW+ioCAnJo?=
 =?us-ascii?Q?kDffhYQnzQyI7s401U200XBweViDERi9DimD/cVoLpSYCVBRMLbj1QUWKbW1?=
 =?us-ascii?Q?D3zSVXPB5oNEPHUvbqbDcfXC5inFN2c2gLQMmkXcihtGdQQBc7BWJRxxJJyq?=
 =?us-ascii?Q?SiAU56hestwHp385NKLe6wefxbSJdbgePYzJyvzJQL/xkSbzTB8U190A+NcS?=
 =?us-ascii?Q?hvkdmslm0CFfqQIPAR7QP/cvMilzEjBx/cIG6H6KlqDTex0JFDF45ITdJqOJ?=
 =?us-ascii?Q?eZxvUQYQbYqKFcl6XwWAR6xQLC0XHgBpHg4z+CkfmlUWGJa7SgFq2OVTjfZC?=
 =?us-ascii?Q?sIkbGASi8drgxgdOI2BiFxYw6dcaFQCYGq9boNvYufgQH4JrnAX4y+rZneU+?=
 =?us-ascii?Q?fN13MO738QxNNxWpPaR1Dagi0CR3dOtf1iiGj7v5kpewis/2wwSJM9GSNFtI?=
 =?us-ascii?Q?FRSIVLNY6Ki6od5dZigHcv1f?=
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: DM6PR12MB4987.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 84e54f99-1016-4c72-14a0-08d9002afd2e
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2021 16:24:48.4398 (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: Zn5MWflNmRAPWdMmx7KpeW0xnFK45uQ2nxz47aOD8cL1xshHMWSJ6wnEUGYhmRTJ4Q48LZJOGI6/g7pV2D98mQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4436
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Hi Bing
I'm fine with this patch but you are missing the documentation part:
1. doc/guides/prog_guide/rte_flow.rst         =20
2. doc/guides/rel_notes/release_21_05.rst     =20

> -----Original Message-----
> From: Bing Zhao <bingz@nvidia.com>
> Sent: Saturday, April 10, 2021 4:47 PM
> To: Ori Kam <orika@nvidia.com>; NBU-Contact-Thomas Monjalon
> Subject: [PATCH] ethdev: introduce conntrack flow action and item
>=20
> This commit introduced the conntrack action and item.
>=20
> 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.
>=20
> 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.
>=20
> A TCP connection has two directions traffic. To set a conntrack
> action context correctly, information from packets of both directions
> are required.
>=20
> 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.
>=20
> 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.
>=20
> 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.
>=20
> Naming and definition:
> https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/netfilt=
er/nf_co
> nntrack_tcp.h
> https://elixir.bootlin.com/linux/latest/source/net/netfilter/nf_conntrack=
_proto_
> tcp.c
>=20
> Other reference:
> https://www.usenix.org/legacy/events/sec01/invitedtalks/rooij.pdf
>=20
> Signed-off-by: Bing Zhao <bingz@nvidia.com>
> ---
>  lib/librte_ethdev/rte_flow.h | 195 +++++++++++++++++++++++++++++++++++
>  1 file changed, 195 insertions(+)
>=20
> 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,
>  };
>=20
>  /**
> @@ -1685,6 +1694,51 @@ rte_flow_item_geneve_opt_mask =3D {
>  };
>  #endif
>=20
> +/**
> + * 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,
>  };
>=20
>  /**
> @@ -2859,6 +2924,136 @@ struct rte_flow_action_set_dscp {
>   */
>  struct rte_flow_shared_action;
>=20
> +/**
> + * 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