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 B7EC2A0032; Mon, 12 Sep 2022 14:59:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52BEB400D4; Mon, 12 Sep 2022 14:59:32 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2052.outbound.protection.outlook.com [40.107.237.52]) by mails.dpdk.org (Postfix) with ESMTP id E74A040042 for ; Mon, 12 Sep 2022 14:59:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lRa46yxDPVshHo2D2BUQZxyFGYpyIwnznlGWExOJtxltwHM2OWkAhc6t54orp5Ij7ON8g8N1U4FZEFKuSA0WkMlF7xyumbpo5MjqUHmuj2QFJuvatP4RAMS+zSzylQ+n8pyX4y6nZau1h6hvQ4F2kv5Bg89TYGDkMPV7JBK/jT1mLSqGzj3WOm1dBUS16XH4Mm7h1/YyGEkvLZMnlFC9iAwAeWSfzJvrLNPCkKTi/BprJ+nuppv2Lwv0kbOy5utyLn2HuibpIPFfExbQ6QjN8oijW6sUGSXCtTJnR9dsoLt+2PX2KtxUO9ud6ZDHr4tGcfpdx5J1TwpG/iMXDraWNQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=juwz5na9OsYogS7bOHJS0RFdpLmnqtdNPguEw5phGzc=; b=X3idJmyU8GTi9X4ZkBNJAHjEG06n3eI4/hrSUyq4ytHtmtsHzgSGqtmZEK+oTTVvyIYrKvagjpCVXMu4lr4HUjeCwV/9+BtB3I3vAvdbhtXW76DywRDmjsdd85jKiUzPFkt8CcKxRI+HjUb+6cpxt5/1HhOjhZTQnQvnRi5K1v0gXrBzG8qfNz+88kduHqUUUjh0JBEgTtd+fVIPUvWX+X9zSAvOgC7EQqN8iQfBL27gDN5+hqn2EIhqpP08B0GDImRqp20RuxZ+BOaOIuLnTi07i8tmWFhcZHeKYNL5yTsWGgaL4b4MKu07sEB2RCpQoHDAQMwotHIQX/ngJ1kfIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=xilinx.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=juwz5na9OsYogS7bOHJS0RFdpLmnqtdNPguEw5phGzc=; b=FgInps71fRH9iJ7Iks4lBQCL3dtvhT6c25uuD6jlW8V5ouJqfpQpctYy2LdtHmrXvLZBtHuYsavDI6XBRVdsZbsbloM9NjQtsxkAZz7VZYS0NYOfCpCuv+SdiHWU7/Q5OtiVA6ABP2YECnRg5350P4IG4a5ymAbIeOD4IgljOhLOAGp1Mgdt1MnfP1kMh0GVqkRoQRbYzp6tnlesRSpt8osJHQGBUoxxxD/v071jn6P3xpaUghc7MPKH2HE90iNoQoZxrbeKNe2VYBBO7DMgp2S/nBci99nL8aghFYkwQ8JYVj3Jc02gyD9Hc5wwVAvlwShaMruDNG8Lclm3aqugcA== Received: from BN0PR10CA0016.namprd10.prod.outlook.com (2603:10b6:408:143::23) by SJ0PR12MB6967.namprd12.prod.outlook.com (2603:10b6:a03:44b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Mon, 12 Sep 2022 12:59:28 +0000 Received: from BN8NAM11FT109.eop-nam11.prod.protection.outlook.com (2603:10b6:408:143:cafe::56) by BN0PR10CA0016.outlook.office365.com (2603:10b6:408:143::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12 via Frontend Transport; Mon, 12 Sep 2022 12:59:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by BN8NAM11FT109.mail.protection.outlook.com (10.13.176.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5612.13 via Frontend Transport; Mon, 12 Sep 2022 12:59:28 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Mon, 12 Sep 2022 12:59:27 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 12 Sep 2022 05:59:25 -0700 From: Michael Savisko To: CC: , , , "Thomas Monjalon" , Ferruh Yigit , Andrew Rybchenko Subject: [PATCH 1/3] ethdev: add send to kernel action Date: Mon, 12 Sep 2022 15:59:06 +0300 Message-ID: <20220912125908.922188-1-michaelsav@nvidia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT109:EE_|SJ0PR12MB6967:EE_ X-MS-Office365-Filtering-Correlation-Id: da24357a-6f66-4d28-a5bd-08da94bea07d X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sac+Q5H9/lYuB6BCWkc0Hp/mZUMBsu1iq+YPEJ7Y6d6zqI6Si8Bn8KHzGCo4Qwe0lPvOh/Xv0YbupATSkBFv/qMAh8EHD6ekaalALp4ruooqIrU5RNRqJc+zh78TNx+nmSXpuqIw6D5xc/vRwDaNs5Ke3nWfp9fFkLO1fT+a3Oy4bT7/l7mStx5/RdITHW8RM+2Gta46rYKA01fvrJJryYqrgTflT0K5eVAYYF7peneF2dFKiybNPW23XqI2hzR72ahSdBuqrA8y/3H30/eWthJSAONVXNj+DQeTEYNtsHkqgvJbsrXvRnrOjUEgGLcRKe0eHqFK+0XjNYk5yyoyVZ4pme3N5fNFyg68DpcwHF2ZTEZCwtWC5u7sBrA5wM5+vU2srXOPFrQ0uJ91hL6O3VX6ZkLaSzE8PKAt9wzNsrvKoTt+m/L1Fj9GDq5oL0mk9QFRgtw3G89PagjH5ZS6SxdC7fpyo8CbbZuy14yavoiQw4XuviKQ+hjeAlqhc2JdXM9H100AS5Iuv6qbWl/ykaZBIHYzxTH/5rO1bopp4tnlSIZoWCB+JKpKXJq2ue0KDoEawYOCkoYIBH2ZIGrG4ULfpV6AuJaJV8US6YNxc2lRbn34FXqU6ej0w5YmwhzI/mGqkPOu+3CHBjppgAIMitSkICGH0fe8IX4ozoz4uJYbqHG+roIxENnucfD/ba4SCtnkXT70zsNhmL3hLvngEAa1VV0NwDgD90lNlqT1ULarWSL3zOx7WL2ZR6KASbwu1JFjY+VmFzKJtt2OSBYzON0CAbl7OHPHzVbz8uReD8hdAUOfTDfaC8dHwLf8rsaH X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(396003)(136003)(39860400002)(346002)(46966006)(36840700001)(40470700004)(316002)(36756003)(16526019)(26005)(1076003)(54906003)(2906002)(6286002)(7696005)(6916009)(426003)(2616005)(186003)(336012)(47076005)(82310400005)(356005)(86362001)(82740400003)(5660300002)(55016003)(40480700001)(6666004)(41300700001)(8936002)(478600001)(40460700003)(36860700001)(4326008)(81166007)(70206006)(70586007)(8676002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2022 12:59:28.2070 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da24357a-6f66-4d28-a5bd-08da94bea07d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT109.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6967 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 In some cases application may receive a packet that should have been received by the kernel. In this case application uses KNI or other means to transfer the packet to the kernel. This commit introduces rte flow action that the application may use to route the packet to the kernel while still in the HW. Signed-off-by: Michael Savisko --- lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index 501be9d602..627c671ce4 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -259,6 +259,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = { MK_FLOW_ACTION(CONNTRACK, sizeof(struct rte_flow_action_conntrack)), MK_FLOW_ACTION(PORT_REPRESENTOR, sizeof(struct rte_flow_action_ethdev)), MK_FLOW_ACTION(REPRESENTED_PORT, sizeof(struct rte_flow_action_ethdev)), + MK_FLOW_ACTION(SEND_TO_KERNEL, 0), }; int diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index a79f1e7ef0..f11d1659e8 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -2879,6 +2879,11 @@ enum rte_flow_action_type { * @see struct rte_flow_action_ethdev */ RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT, + + /* + * Send traffic to kernel. + */ + RTE_FLOW_ACTION_TYPE_SEND_TO_KERNEL, }; /** -- 2.27.0