get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/116304/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 116304,
    "url": "https://patches.dpdk.org/api/patches/116304/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220914093219.11728-1-michaelsav@nvidia.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20220914093219.11728-1-michaelsav@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220914093219.11728-1-michaelsav@nvidia.com",
    "date": "2022-09-14T09:32:19",
    "name": "[v2] ethdev: add send to kernel action",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "89f9b03aad6a396539ebf5f8c47dd5f29e11ab9e",
    "submitter": {
        "id": 2805,
        "url": "https://patches.dpdk.org/api/people/2805/?format=api",
        "name": "Michael Savisko",
        "email": "michaelsav@nvidia.com"
    },
    "delegate": {
        "id": 3961,
        "url": "https://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220914093219.11728-1-michaelsav@nvidia.com/mbox/",
    "series": [
        {
            "id": 24659,
            "url": "https://patches.dpdk.org/api/series/24659/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24659",
            "date": "2022-09-14T09:32:19",
            "name": "[v2] ethdev: add send to kernel action",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/24659/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/116304/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/116304/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7EA0DA0032;\n\tWed, 14 Sep 2022 11:33:06 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 246DB40156;\n\tWed, 14 Sep 2022 11:33:06 +0200 (CEST)",
            "from NAM11-CO1-obe.outbound.protection.outlook.com\n (mail-co1nam11on2060.outbound.protection.outlook.com [40.107.220.60])\n by mails.dpdk.org (Postfix) with ESMTP id 8B5D540151\n for <dev@dpdk.org>; Wed, 14 Sep 2022 11:33:04 +0200 (CEST)",
            "from BN9PR03CA0906.namprd03.prod.outlook.com (2603:10b6:408:107::11)\n by DS7PR12MB6167.namprd12.prod.outlook.com (2603:10b6:8:98::20) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Wed, 14 Sep\n 2022 09:33:02 +0000",
            "from BN8NAM11FT089.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:107:cafe::dc) by BN9PR03CA0906.outlook.office365.com\n (2603:10b6:408:107::11) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.14 via Frontend\n Transport; Wed, 14 Sep 2022 09:33:02 +0000",
            "from mail.nvidia.com (216.228.117.160) by\n BN8NAM11FT089.mail.protection.outlook.com (10.13.176.105) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.5632.12 via Frontend Transport; Wed, 14 Sep 2022 09:33:02 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 14 Sep\n 2022 02:32:50 -0700",
            "from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 14 Sep\n 2022 02:32:47 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=NfaddPaEVetDvbBgI733HWodsoAs7Aqu8HkfTsX62bTa8MAPvByL7dcuJ5zXZ7sMzpGESN59IhQPcqi6VAgRaKlH/Ha0DuRZp2AIVLihTitSE0DJ/gDsoDo0r428ps+2KD9hlI0LFn7Vg7ZroUcThhFHro/xrtzxkK2deOwinzRqzhHdJzk7qf+PJN2qOktOVMgKzBdgdCUpHz3UHLYUrRX/d4sb6v2kZrHXPh1swU0/6TLaZZlCMkJRQGchQ12bLw1FF+1RIIJlfBktPEh2HACvUkeTEWewAapadRDo21EB7PTvka63VXZlM5q/+q5rYTPUKMxJY9ODqd9Jw915cw==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n 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;\n bh=mddr4UcFQpoudOCfzXHjSq1Op1Cq+M5gF6D5Jx2vwe8=;\n b=QJV9a2eZzYH8VYRqHzFggmgHPiBJZWR9ccxWob1W26F/zoWi/SGrerPRxuP88Iu59jK8PdW7pqqC9xD3E3AZt8zFqmfV2gNFIVzMJ6/m8KbiXIPM0DqD5zxfWqGe5ehmT7UQiYxaZMo3uyplmIwkAzxWvxKNYokqBceja721fD4XFwpfo4X8SIa2mNfV2/F3AevAccdsv1dXjApuqPBYHPk3zeniENeX/pxEjRMEJEleitNUJ6zImLAohvbIdRZpamjJltPx4fhVdIi/8fsTRTMa+IRqj/rwJS+ToNZYryCYZR4xmSdIOyTumtIQe6WSV2AcjpNsGPcfug0FLT63bw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=mddr4UcFQpoudOCfzXHjSq1Op1Cq+M5gF6D5Jx2vwe8=;\n b=aCvaBzCPP4Xe3RVA0cjnURlQHLsADxaMn1U67VnV/5zRGW5ZehctIVk3ptKufilO9BIZ0AlMmXPIyzkMTMjb+qOTxYVxOPzAoMUvm6W9EfplGHVDNAcT6SvEpvNnfVY7vTjRr4UYhHWrIaXAjGW7RvqKoIHwEhZSFHhYo2sL0TyYeNRv1Zez/6s2EHrB2Yz6/V0KTqdOHucKMGJxs1qX5hL9ge5FXRz6y9n67Th6IbtQM88kD5LV1vcYxq/wZy6B0u3SjKduvyoi3KiwxkCMDyLMWY9mTL/kCWsS3ueT9lgjlcemq5nsTAoqRpA0DD5pgC1LgDBUkFLauw5yURyqJQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.160)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.160 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C",
        "From": "Michael Savisko <michaelsav@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<michaelsav@nvidia.com>, <orika@nvidia.com>, <viacheslavo@nvidia.com>,\n <asafp@nvidia.com>, <tmonjalon@nvidia.com>, Aman Singh\n <aman.deep.singh@intel.com>, Yuying Zhang <yuying.zhang@intel.com>, \"Thomas\n Monjalon\" <thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@xilinx.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Subject": "[PATCH v2] ethdev: add send to kernel action",
        "Date": "Wed, 14 Sep 2022 12:32:19 +0300",
        "Message-ID": "<20220914093219.11728-1-michaelsav@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20220811113544.1718643-1-michaelsav@nvidia.com>",
        "References": "<20220811113544.1718643-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\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "BN8NAM11FT089:EE_|DS7PR12MB6167:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "39688b33-7a42-4603-b8e5-08da96341ed5",
        "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": "\n xJw5QDBk9f6oI54WR78yK+QtiJMH0GpkHGTSn9crbqY4P91xeFrt3h73NyAm+d3+MJL42S87m+wFZxUx3B+x9Iv37OmzxiqIePHTl+v4aVvl5B5uam0FXtrOf/tzQtIVI3JS3qlMHL4UnlLXInQ0U07MGpNgdRTRLc5uYRs2WVf9FlhcIzn75K5KnXqWXxodFXTWrhVJDuCV3vDY47dv7ge6bmNyLlKdjbLIM6LPJWvMFRFoUS3pRlITkVBIzpfHWneWPq7Q5T6r//g+oLx3nVVa/dIIMVscnhX1gKklhsE3XQ1t/opPkqIrCbxGbg/ftQQzrKH2i/W6Y0F9kKO46DwhztGtN8+oq/XBVoFnxmj4j2jaVJFoSDpjG2d01PoalenWs5Y+2vT4fyELtL8Y8NIF4S6ZkV3o0qM+mJip0NVzZNQpaYbWgHT2/nG5+VWgwFDoeNfvJPaVCmTvDl66OFIcuXH6JCFLKEoMRUawCrrhyRLXIg2bRZP3vE3nsKbaWfoylB0XyArenR8WzcLCz3AWMH6d7XBAz29x+3Ga1SLNHHa0055Bhz3rDFpsBTNn5urL5hKXI0QrkaAoh35cr8vWOr2g4SnXS5o/SwTqeJ1CqE5bvZstcON5ehnyxu/MkjaGN+fOmfDmEqQnN5N6hfQ0wm8rei4wsN8DBJ2VIq+FD1mihLPGvgChKKeX0cOnjPwJCcQe2bsZeU4Xy+UR7sKtqD0Zk1Y1Jlkqygo28miAxCEUvIccLuLyB9ym73kMYC7s0zJY1WdFm0DG6eETzA==",
        "X-Forefront-Antispam-Report": "CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE;\n SFS:(13230022)(4636009)(136003)(376002)(39860400002)(346002)(396003)(451199015)(40470700004)(46966006)(36840700001)(26005)(83380400001)(40460700003)(5660300002)(6916009)(186003)(7636003)(356005)(55016003)(2906002)(6286002)(336012)(8676002)(82310400005)(16526019)(426003)(70586007)(4326008)(36860700001)(478600001)(1076003)(41300700001)(2616005)(70206006)(6666004)(82740400003)(47076005)(8936002)(86362001)(316002)(36756003)(54906003)(40480700001)(7696005);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "14 Sep 2022 09:33:02.4104 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 39688b33-7a42-4603-b8e5-08da96341ed5",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT089.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DS7PR12MB6167",
        "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>,\n <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>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "In some cases application may receive a packet that should have been\nreceived by the kernel. In this case application uses KNI or other means\nto transfer the packet to the kernel.\n\nWith bifurcated driver we can have a rule to route packets matching\na pattern (example: IPv4 packets) to the DPDK application and the rest\nof the traffic will be received by the kernel.\nBut if we want to receive most of the traffic in DPDK except specific\npattern (example: ICMP packets) that should be processed by the kernel,\nthen it's easier to re-route these packets with a single rule.\n\nThis commit introduces new rte_flow action which allows application to\nre-route packets directly to the kernel without software involvement.\n\nAdd new testpmd rte_flow action 'send_to_kernel'. The application\nmay use this action to route the packet to the kernel while still\nin the HW.\n\nExample with testpmd command:\n\nflow create 0 ingress priority 0 group 1 pattern eth type spec 0x0800\ntype mask 0xffff / end actions send_to_kernel / end\n\nSigned-off-by: Michael Savisko <michaelsav@nvidia.com>\n---\n app/test-pmd/cmdline_flow.c                 | 9 +++++++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 ++\n lib/ethdev/rte_flow.c                       | 1 +\n lib/ethdev/rte_flow.h                       | 9 +++++++++\n 4 files changed, 21 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 7f50028eb7..042f6b34a6 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -612,6 +612,7 @@ enum index {\n \tACTION_PORT_REPRESENTOR_PORT_ID,\n \tACTION_REPRESENTED_PORT,\n \tACTION_REPRESENTED_PORT_ETHDEV_PORT_ID,\n+\tACTION_SEND_TO_KERNEL,\n };\n \n /** Maximum size for pattern in struct rte_flow_item_raw. */\n@@ -1872,6 +1873,7 @@ static const enum index next_action[] = {\n \tACTION_CONNTRACK_UPDATE,\n \tACTION_PORT_REPRESENTOR,\n \tACTION_REPRESENTED_PORT,\n+\tACTION_SEND_TO_KERNEL,\n \tZERO,\n };\n \n@@ -6341,6 +6343,13 @@ static const struct token token_list[] = {\n \t\t.help = \"submit a list of associated actions for red\",\n \t\t.next = NEXT(next_action),\n \t},\n+\t[ACTION_SEND_TO_KERNEL] = {\n+\t\t.name = \"send_to_kernel\",\n+\t\t.help = \"send packets to kernel\",\n+\t\t.priv = PRIV_ACTION(SEND_TO_KERNEL, 0),\n+\t\t.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),\n+\t\t.call = parse_vc,\n+\t},\n \n \t/* Top-level command. */\n \t[ADD] = {\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 330e34427d..c259c8239a 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -4189,6 +4189,8 @@ This section lists supported actions and their attributes, if any.\n \n   - ``ethdev_port_id {unsigned}``: ethdev port ID\n \n+- ``send_to_kernel``: send packets to kernel.\n+\n Destroying flow rules\n ~~~~~~~~~~~~~~~~~~~~~\n \ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex 501be9d602..627c671ce4 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -259,6 +259,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {\n \tMK_FLOW_ACTION(CONNTRACK, sizeof(struct rte_flow_action_conntrack)),\n \tMK_FLOW_ACTION(PORT_REPRESENTOR, sizeof(struct rte_flow_action_ethdev)),\n \tMK_FLOW_ACTION(REPRESENTED_PORT, sizeof(struct rte_flow_action_ethdev)),\n+\tMK_FLOW_ACTION(SEND_TO_KERNEL, 0),\n };\n \n int\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex a79f1e7ef0..a82992a6ae 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -2879,6 +2879,15 @@ enum rte_flow_action_type {\n \t * @see struct rte_flow_action_ethdev\n \t */\n \tRTE_FLOW_ACTION_TYPE_REPRESENTED_PORT,\n+\n+\t/*\n+\t * Send packets to the kernel, without going to userspace at all.\n+\t * The packets will be received by the kernel driver sharing\n+\t * the same device as the DPDK port.\n+\t *\n+\t * No associated configuration structure.\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_SEND_TO_KERNEL,\n };\n \n /**\n",
    "prefixes": [
        "v2"
    ]
}