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 32ACEA0032; Mon, 12 Sep 2022 14:59:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26DEF40A7E; Mon, 12 Sep 2022 14:59:37 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2040.outbound.protection.outlook.com [40.107.212.40]) by mails.dpdk.org (Postfix) with ESMTP id 84BAD40042 for ; Mon, 12 Sep 2022 14:59:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M4EgcBvA+TV7apme8Z94g89w5Zn3EBU/w7Yo+6rrnvU4V3HCB57pJKNABjAvuvOg4YwFsmj3bIHcP5fs0klMLwC8t4hVY97fKEFfSm0+4Cybhfw7dMjkX1X2iqAd/pvaW75REpVmr1GUCiPyYCBh566eRY8NTQQJEVKFdGjV04VQrUX1CDzbZORnd3QDKHNSVry47lVlvvk7VITkFoqU89xjWacB6yZBtceTB0K0QTZTWO2Ej+mvbxPMBDLzdUSQDcFzV9yfN0IUmqsrYmMt+2yyzL68Z8nvQ4j50/+kAj1HMM2NRCsTmfRZ/17k/fxkwP2dh80pziM1rhILOhkQwA== 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=Ld8P2bN9G5wAIPh0TzJd+eUcdeE2CCqDEtDNVABpzPo=; b=UlkRGBJE9uI4ErxFCImZVfzjOHC9uSsTUf3dt34uukwgR2LKfdzIYSn7gfdRz0qjgYbDQWVSyL4mOxe/VcE+HDcZgUwrXN6sw1KIH6f1D9yw0KJTi1adri6NhGU0wmFoBjtXBM4cIdfWl8fah0kYDDFjLMO8ShB52fPIzWkk+DPQMZ5/uggHxqpMZihSqNnVML2BAgx5LXDJ1j+XFWMakhOA/znkS/tb8I8SNe34zStoYW9Fg1PWG7unE7cZvnPrBdQXjxAVCZuLnewCMWLYixW32onoF14BO341nlO9CCMbK0D0Mq9CoCXrPgBK+RZAtlcbDSX1Au2XtnAmTBcKhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=intel.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=Ld8P2bN9G5wAIPh0TzJd+eUcdeE2CCqDEtDNVABpzPo=; b=KgbkA3rv+2FdgieVKwDjxza50d4V0rjI1Z3NX9JrZIpvLeBfwriG1Z/RlVhGd7w/WLTP1KyZLUalWjYOmbo4Td5qH9xjZP/NZSHuX5szY+L0u+mf8yOF40d+MFrZ9uVO0wuD0Rum5yi+dHRSJJW82LEGahMnMOEAwlEtVaOVG/lq8KQUjKsXnMFZUdDHJoAKkkyG7k3UsgY/kzAzlKidDN6aSg49enaBSkXevrIvu/3xPdQJ4ZbbpKp96uawF7kCa7UmIcotZtOCA7dG9jawVUK6C9B+qH2AARqzNYjRDT17v+H1Ec8oQy29uoAPK3nmAoMzbHnGlnPeqmVhkJMR5w== Received: from MW2PR16CA0066.namprd16.prod.outlook.com (2603:10b6:907:1::43) by DM6PR12MB4530.namprd12.prod.outlook.com (2603:10b6:5:2aa::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Mon, 12 Sep 2022 12:59:33 +0000 Received: from CO1NAM11FT113.eop-nam11.prod.protection.outlook.com (2603:10b6:907:1:cafe::d0) by MW2PR16CA0066.outlook.office365.com (2603:10b6:907:1::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22 via Frontend Transport; Mon, 12 Sep 2022 12:59:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by CO1NAM11FT113.mail.protection.outlook.com (10.13.174.180) 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:33 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Mon, 12 Sep 2022 12:59:32 +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:30 -0700 From: Michael Savisko To: CC: , , , "Aman Singh" , Yuying Zhang Subject: [PATCH 2/3] app/testpmd: add new action kernel Date: Mon, 12 Sep 2022 15:59:07 +0300 Message-ID: <20220912125908.922188-2-michaelsav@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220912125908.922188-1-michaelsav@nvidia.com> References: <20220912125908.922188-1-michaelsav@nvidia.com> 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: CO1NAM11FT113:EE_|DM6PR12MB4530:EE_ X-MS-Office365-Filtering-Correlation-Id: 14e79bfe-14e4-4299-3c3d-08da94bea390 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BvIip5yJIgyU0QKitgFPSXdqkaiyTPRWHNH9UODxSynZZu/FsmVFKq5+wUDr0WCskRHThG4B7jyjS07PDSP0ciq3xVQOV5lCZkpfmjeExbvd8O6lxZolWZye1w4IpkD0Pcmb6oMRothT1nMpz+FQl3noF3c6fdPnzCt3ExJAmpYlRMUG9pK4NaXHkXoGYUFJeEODmtOGRzW6GaXNWtXO340G8Osd0M+5h50W7INB8RUGbJlOhOo14iGJaz0KbGn6wwq5Y0eP4CI55hRTRLObvdj5N80cch/+V7xJxzsrqLxW4RqV6/m5cLK3zmJcVaXRj8dk0RAszSLruDv2pC6BWowu7mtlIRzoGSzx7FO+URTeCDd2tA+v6Kb9J4V5AkoXXR+D7TabNd0OWiXhIbGid+qTqdnTzsPruUh4bNPKYDZDPzqY0xUfdoo9oZsF0B/7t7WoiGTOT/GHWl14RzJWBaH1kl/qsEqdJu4Wpiapj4BtV/Prz2vQmz3FC2iV43IPj/DXAj3a3cmB0WtxHH02yNcCAWI/wS6wpExdx21zB7FW3oyLXpvtFV2ksj9UyYpp8VNUWtbca9g1bK1TBcRmBBkvUVwOlOHH4R5RtRjy0XwrXKhejENp1vUcQE0jnghwrciQOvQd3H/KUqFGpij/9/Fe3T6LwUnLIIlD8/des3kAHmshHfMY9AInPxqeCtTHsjktiAyD6i7Mf8xFA1yq6BXXLSlvr/U4dlznuMxrLmWYoWOuRyx3ZI3o52BlychW65rfldUPFxvrpyVt2RCtKRLdc2BReYLlz2LwTVxG7SY= X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(346002)(136003)(396003)(39860400002)(40470700004)(36840700001)(46966006)(70586007)(8676002)(70206006)(478600001)(41300700001)(356005)(4326008)(36860700001)(5660300002)(86362001)(8936002)(82310400005)(36756003)(54906003)(6916009)(6286002)(26005)(47076005)(336012)(316002)(16526019)(1076003)(81166007)(2616005)(82740400003)(426003)(186003)(7696005)(55016003)(40460700003)(6666004)(83380400001)(2906002)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2022 12:59:33.4088 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 14e79bfe-14e4-4299-3c3d-08da94bea390 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.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT113.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4530 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 Add new test-pmd rte_flow action 'send_to_kernel'. The application may use this action to route the packet to the kernel while still in the HW. The example of test-pmd command: flow create 0 ingress priority 0 group 1 pattern eth type spec 0x0800 type mask 0xffff / end actions send_to_kernel / end Signed-off-by: Michael Savisko --- app/test-pmd/cmdline_flow.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 7f50028eb7..042f6b34a6 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -612,6 +612,7 @@ enum index { ACTION_PORT_REPRESENTOR_PORT_ID, ACTION_REPRESENTED_PORT, ACTION_REPRESENTED_PORT_ETHDEV_PORT_ID, + ACTION_SEND_TO_KERNEL, }; /** Maximum size for pattern in struct rte_flow_item_raw. */ @@ -1872,6 +1873,7 @@ static const enum index next_action[] = { ACTION_CONNTRACK_UPDATE, ACTION_PORT_REPRESENTOR, ACTION_REPRESENTED_PORT, + ACTION_SEND_TO_KERNEL, ZERO, }; @@ -6341,6 +6343,13 @@ static const struct token token_list[] = { .help = "submit a list of associated actions for red", .next = NEXT(next_action), }, + [ACTION_SEND_TO_KERNEL] = { + .name = "send_to_kernel", + .help = "send packets to kernel", + .priv = PRIV_ACTION(SEND_TO_KERNEL, 0), + .next = NEXT(NEXT_ENTRY(ACTION_NEXT)), + .call = parse_vc, + }, /* Top-level command. */ [ADD] = { -- 2.27.0