From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,PDS_BAD_THREAD_QP_64,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7ADBDC433B4 for ; Mon, 19 Apr 2021 17:33:30 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id E6257611F2 for ; Mon, 19 Apr 2021 17:33:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6257611F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01C59413DE; Mon, 19 Apr 2021 19:33:29 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2078.outbound.protection.outlook.com [40.107.244.78]) by mails.dpdk.org (Postfix) with ESMTP id 46B54413B0 for ; Mon, 19 Apr 2021 19:33:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KWdgASJjnT4kIoBEHv/c+YRvEnsP0HI616eKg7sb2tDpZR026ZV0by7wSZVUx0y0IpeADDJSlAI8QOVvRcJOx57sV4zHqrofbt2r9pLmRIj/C7KvyfNLVtNsWpk/5JKJogqVY04gSgQg6lHqAN57GXQW2iaWjF4c+JSBtmsJuuJ9Q52RUF34zUSnKvuAYCFKCFYmDlkv+HkFQRfcX5AEPICEUym7p5lzyg/w++U4MpHiHZTySaoVQ5YnYQUXrsHoznkqhFokBnHxaKtp5LV0UN4gvOZ0V/yTr9FTSaTeES/FGDZ/+nKzBxV7A+vT6E6wzhqv6+frKlbUtqXUqbF6dA== 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=RCD+bhIKXkWvqILoDVSfrWiGxi059Rwah1WMohmbyNk=; b=V4jqwExIzhOu9ploYYAnuu2fBFMFHZFYJgXy0E144cA+deti6vFcP+8k8Sd2y2fADbEd9diWMw1sA6jEoccFQE+lnGJZSqmqyzlv74Jp2HFo5mdCSog7DKfjsaNtJQYBYpw7HTjjSukNwj/oc7/R67bcbj6vpO+AQvBBpURYpRoKn2UFZpGkbFnh+nd6gYvLXxZMk8Jhsvm8QeyUtTGB/YPXrMm4AAMAu+UTwsHmiXw3RjneQGa6Ij7hzGgnwM+k4lf0KOwMiP8jddihsNPvuw6FU7pPNyMgN31vyRuqPOzJh68yj+YrNEwM8Fy+G8BX4BrwwrNQ7JlPpSpVIn86ww== 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=RCD+bhIKXkWvqILoDVSfrWiGxi059Rwah1WMohmbyNk=; b=O60sCIaKm/7HFrhryi/CYzeBmo+fGenJDVRvA9BSXDJGvsGigMDE1iz5/GF+ow2MXujtPaKK6tMjxM9e9w6O+aczGpbiupmWcqLflgQSX8WpzeTFUd3CcyUfyCXkzDSI/KotJvgL+dLE/jwF2VWFaGBGQ6UB5ixNXKAlgy/6Vza4geChsV3vhaijbNSmlgiqhL8Zemwin2ZO7OWs9UNT7zSEedXF5EEOazyjEtrnDBDvYtkZfCoqUrCt84z8UpYywd6xq89qVt/Z7LgMUDtwKw2VvM9gAPxdrceCGQlWd9rUGRfPcgY/ALvDoWZ4yR6EnqW614vgz9ZFs5GJ8k2v1A== Received: from DM6PR12MB4987.namprd12.prod.outlook.com (2603:10b6:5:163::31) by DM6PR12MB4124.namprd12.prod.outlook.com (2603:10b6:5:221::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.19; Mon, 19 Apr 2021 17:33:25 +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.4042.023; Mon, 19 Apr 2021 17:33:25 +0000 From: Ori Kam To: Bing Zhao , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "andrew.rybchenko@oktetlabs.ru" CC: "dev@dpdk.org" , "ajit.khaparde@broadcom.com" , "xiaoyun.li@intel.com" Thread-Topic: [PATCH v4 1/3] ethdev: introduce conntrack flow action and item Thread-Index: AQHXNT/UslFU1LGXSkqCGZUThjpivaq8GS0Q Date: Mon, 19 Apr 2021 17:33:25 +0000 Message-ID: References: <1618062393-205611-1-git-send-email-bingz@nvidia.com> <1618852616-369498-1-git-send-email-bingz@nvidia.com> <1618852616-369498-2-git-send-email-bingz@nvidia.com> In-Reply-To: <1618852616-369498-2-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: 08fc46fd-0ba9-469f-4c2e-08d903593cd8 x-ms-traffictypediagnostic: DM6PR12MB4124: 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:6108; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AQKOmaq/SC4hN4SahJlfXxXGhjJpadl6nECCscZJPUzvg/RB88hCy9Pc31lT1LChqPbDvw3/9Sz4Q98hjWl4rtarw8MaF7CzbvZOH4qCSedRf0vBXGom88jMof5wfABNpZFc7akR4uB1uMi7+58ONgihtf4UHNQstFZXQVRuUay2dsVK4SaVx6C4hvk4B9ppSTO71ubRfHwGrbA8G79WJc58PcauU58RrRr4iy+kvarzL5hrdIFsDM35WmhXRom8Eu9LHonIZ92vdlj1FDsLDBVl1ylcaTApsAN9iodytRbt5ZNOM2J/QHTpm0KgccmwJGfRi2frNbrxVyF6FFw6V/TosDeKzitM60JnitgEEdKih+/YK44CXtduBAMu8JruRY6CyCB38KpQknbGw+tetKHp2xfR79OidRtwHoPIlNTEfPIiAQIxMOilTR5rOUkrrVupXGEqiOClM5U0SLqU1epbtpzzApYohuiIlGyYMu/7KDzKbepUHD70Yl9J1jrYU+7VwQyKjvmGnqCG/5vTjlo13osR0/OuM/nv6EiTz98P/rcGsDsfklaDWqJkM1Y1bIfRNE8Nr0pxdE19NKL0Jv9fjSqlpPZuHoVJ9VPH54xD13JtPZheUKcCMF3a6JhJWKYvTEWS+Iqvyl8OW1ry+ys3m+E7K4jdxuSWGcjE4qHiwfvq8/bao55ThAi4gDcY 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)(376002)(346002)(39860400002)(136003)(366004)(396003)(316002)(83380400001)(52536014)(966005)(54906003)(26005)(9686003)(110136005)(2906002)(5660300002)(478600001)(86362001)(55016002)(4326008)(7696005)(6506007)(186003)(53546011)(38100700002)(122000001)(66556008)(64756008)(8676002)(8936002)(66946007)(66446008)(71200400001)(66476007)(33656002)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?L4SpWVQ7T+Zm6sc8AD42vZK+NQwj2N1eoLcdn2Lf/U+NhiA4gYwBhNbmf3ZU?= =?us-ascii?Q?HFfFi20C+yIjsgInaBFdXjRVHKkZ8J4ZRI6nrPFR1uyW89JJXgbzgUd6M2f/?= =?us-ascii?Q?tQoSfApSzG91pk9eqJfLCPUZ10CCNXfni28oJfgj+tT5LSPPXa56u4KanUFB?= =?us-ascii?Q?q/VUv8A1EDCNYXOCCa/atsRZ45FCrcWJ5SKE8/SK90kkSdbfVuCNfELZIAKR?= =?us-ascii?Q?039Uz6hqdn7u+BrZo8LGIes7Lf/oXMsVqT37Jknxm2TvLHsuXqM7Q6g+ZEcU?= =?us-ascii?Q?SUlyj7lr9JnMW9fDECXG7boqJVlYyjrrZ/wqhUy0i7Hx6vhhbWt1pqEK0xf8?= =?us-ascii?Q?1YDcbsHuaR6ID7h+vbyiDzgZi/H45fbcwpx9dityBVSDOxULQV8Hw3z0vZ67?= =?us-ascii?Q?3QUfEUUOUzpoTPQXanGH+Z9fOwDmCpRw+cn+1XWqA2PfF/G4W96noNexG13m?= =?us-ascii?Q?Zi6wDpG1saPntDvTQrB0XlYR4Y8fk/4yyfNqC1XahPE6ZhDPABaL/XHT1j5J?= =?us-ascii?Q?QHo+TFgSRcpsp4UlcD6MjrXFwUX7mbv2/EuPdi71bKjRkuUcOiqbl2WiGxl8?= =?us-ascii?Q?NLmDd93VCZVPYfYV0KY63w1oXkHCl+7SN9s+0aCYGe/NIgild87gDQDQpDSR?= =?us-ascii?Q?JXL774vhTSLY79+fsWaZGbcwJLGbF7FmpQENZtdvG1d4g/0rd5M+KhTAv4Vl?= =?us-ascii?Q?joCs0qXeLfefLbeJJZFnTTdozFprnwDrwDurofBciSzpsnyfAdp8N9SGD+O5?= =?us-ascii?Q?CfDkpdObPCR4DBMt8yT07YIO9WhKsSiRNWq4o7NB/aFXnnTSYsMA0e3zHcMi?= =?us-ascii?Q?agIjGXTmYko63d+gBGofIkWlxFkrTUX1NdLgsXgQDoJypCdXi/Arrd//lEBt?= =?us-ascii?Q?IK9VpB9rF3c8HfWSnUO8T1nVWj/3WHttRZInW1dJM5HDH94I/mO91EQ75siH?= =?us-ascii?Q?fUg6mpVc7fiU2IvSsQ4CO62DM6Td48LaENh4wrOnGGDrlqY7xsNN7qYRntNQ?= =?us-ascii?Q?7EOHt8b/jLMhR3kxPVTOXNu/ILEuvZVsVbCvUvYIB2nrnF28XSAEy5Kigsur?= =?us-ascii?Q?/K6JQjJMbq5KxKsyJniJIUDsPYPloXgkA9DurG4AMyn5AqXjItdVYyxnrz6g?= =?us-ascii?Q?UFLH9tzrL+EfXHd3ax9189Lr0EbcjyryOJ2dy0N+TciMkqqlR8pqwMRSwGOV?= =?us-ascii?Q?2GKZZJfqAbBps/nhgI/HyJVb2/PYggzpg+mvV4Yz1sI044s/FUn3U33kFqjt?= =?us-ascii?Q?WD5l4JDqKueTAzY/kNx0dLXexw21BszxXU/NzFD16K2sasT2zv9mYZv6/OOp?= =?us-ascii?Q?kQDzuEzmdSZ+7/pbmwn1zB/W?= 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: 08fc46fd-0ba9-469f-4c2e-08d903593cd8 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2021 17:33:25.6187 (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: ODQuAtGA5IURtlXVK/nt/NP4JEOeCODS6ZRqvcSGm0WRWcHdaEkwPr7Y04ZpW7u3pshzjaRcNFuO/+XiazTjwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4124 Subject: Re: [dpdk-dev] [PATCH v4 1/3] 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" > -----Original Message----- > From: Bing Zhao > Sent: Monday, April 19, 2021 8:17 PM > Subject: [PATCH v4 1/3] ethdev: introduce conntrack flow action and item >=20 > This commit introduces 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 rule the application should > add the conntrack action and jump to the next flow table. In the > following flow rule(s) of the next table, 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, the information of packets from both > directions are required. >=20 > The conntrack action should be created on one ethdev port and supply > the peer ethdev port as a parameter to the action. After context > created, it could only be used between these two ethdev ports > (dual-port mode) or a single port. The application should modify the > action via the API "rte_action_handle_update" only when before using > it to create a flow rule with conntrack for the opposite direction. > This will help the driver to recognize the direction of the flow to > be created, especially in the single-port mode, in which case the > traffic from both directions will go through the same ethdev port > if the application works as an "forwarding engine" but not an end > point. There is no need to call the update interface if the > subsequent flow rules have nothing to be changed. >=20 > Query will be supported via "rte_action_handle_query" interface, > about the current packets information and connection status. The > 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 make sure the conntrack module > works correctly without missing any packet. 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/ > netfilter/nf_conntrack_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 > --- Acked-by: Ori Kam Thanks, Ori