get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 122578,
    "url": "http://patches.dpdk.org/api/patches/122578/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230126161904.864517-7-ferruh.yigit@amd.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20230126161904.864517-7-ferruh.yigit@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230126161904.864517-7-ferruh.yigit@amd.com",
    "date": "2023-01-26T16:19:02",
    "name": "[v5,6/8] ethdev: use ARP protocol struct for flow matching",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "24d9096fea3597115d7fe5a38dd7a2a357175c1d",
    "submitter": {
        "id": 2700,
        "url": "http://patches.dpdk.org/api/people/2700/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230126161904.864517-7-ferruh.yigit@amd.com/mbox/",
    "series": [
        {
            "id": 26661,
            "url": "http://patches.dpdk.org/api/series/26661/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26661",
            "date": "2023-01-26T16:18:56",
            "name": "start cleanup of rte_flow_item_*",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/26661/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/122578/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/122578/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 F1FB842493;\n\tThu, 26 Jan 2023 17:20:14 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BE48A42DA6;\n\tThu, 26 Jan 2023 17:19:38 +0100 (CET)",
            "from NAM12-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam12on2054.outbound.protection.outlook.com [40.107.243.54])\n by mails.dpdk.org (Postfix) with ESMTP id 05CC640684\n for <dev@dpdk.org>; Thu, 26 Jan 2023 17:19:37 +0100 (CET)",
            "from BN9PR03CA0671.namprd03.prod.outlook.com (2603:10b6:408:10e::16)\n by SA3PR12MB7975.namprd12.prod.outlook.com (2603:10b6:806:320::11)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Thu, 26 Jan\n 2023 16:19:35 +0000",
            "from BN8NAM11FT047.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:10e:cafe::28) by BN9PR03CA0671.outlook.office365.com\n (2603:10b6:408:10e::16) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33 via Frontend\n Transport; Thu, 26 Jan 2023 16:19:34 +0000",
            "from SATLEXMB04.amd.com (165.204.84.17) by\n BN8NAM11FT047.mail.protection.outlook.com (10.13.177.220) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.20.6043.22 via Frontend Transport; Thu, 26 Jan 2023 16:19:34 +0000",
            "from telcodpdk.amd.com (10.180.168.240) by SATLEXMB04.amd.com\n (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 26 Jan\n 2023 10:19:33 -0600"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=X2KJuSulLLuW6de6RrwjKwn+f1UEvGup8rVD4a2Qv+T9OsZai+AilyrJogGJ4uNqllmeOUOPP0cNBr1e4Zx92TPYwvLzie3Vq+S8nAyuVv+BNzrkYUSxi/WHvKXDRjgQWRhP2hrtb5bkSZNt9suge1n/0GO8PYOjl2LQQ0LYSCn/bbvS5+hy+WDd+Ta9WLJWYpAvO5cimmwDlCTPxTuIZ13Tva7v4Rmp6VTRvj8cd+v4dTJqkvZ10vbMmCLy/3ir4Vqt2KUR7p6EBtebIGL8TBrXtlo4G9+y0UdZ1lffY6jRKez5BqWqKme1Ft33frwL4wzQUadxI5U2WyoQUzjVRA==",
        "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=LFfhf0jL8yex4misse2ZZgB3pTDuf9WSLKJLtZp/Ttw=;\n b=ZDHZtlSU4bC8Yp0io5uDetPnGSSt5iIgaTcAkelXjidOOAN4UGPcb44aK05rA+08pPxCYBgcO7RdMcRiOpnFoYOP9/X8zHsQYIKRNbtpTVrZSgMIr9MDauMzXWta/ntda90M7Z1IlXry1ITdyQcBu0kp25JZ6eO/76CVN1/dzaCXauSr2UU+/ss7ABA5vlK7rrHafrz9dk7iZ1UIsRVOTEG52JP28RTkUUfIz/zSgGZXvHsnaN3lQfFfEHJRmc47oUmSdj6wCC09UqOJYAbGVcUvdmZlDObIsbV5oPd59e3RBk2J8BkCc6RVDc0BhAGQ1XSBYOxL35cq/X0tV2sKoA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 165.204.84.17) smtp.rcpttodomain=monjalon.net smtp.mailfrom=amd.com;\n dmarc=pass (p=quarantine sp=quarantine pct=100) action=none\n header.from=amd.com; dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=LFfhf0jL8yex4misse2ZZgB3pTDuf9WSLKJLtZp/Ttw=;\n b=HQFfs4+T3hw/6aFymhn2skyDwu6QwqYUUHcDXWupmK5golGZyJ5+Yxzb2Nvg3B3TfMCfn8UdjdjndGobWiYG5GmqnQD1ydQWx32WKxllEylk14WOb/BI0gKJy/UfKbXxVICccGcmpKR/80cE57Vn8M0g9RB6iAZcTn4do8VbNRE=",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 165.204.84.17)\n smtp.mailfrom=amd.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=amd.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of amd.com designates\n 165.204.84.17 as permitted sender) receiver=protection.outlook.com;\n client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C",
        "From": "Ferruh Yigit <ferruh.yigit@amd.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>, Ori Kam <orika@nvidia.com>, Aman\n Singh <aman.deep.singh@intel.com>, Yuying Zhang <yuying.zhang@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "CC": "David Marchand <david.marchand@redhat.com>, <dev@dpdk.org>",
        "Subject": "[PATCH v5 6/8] ethdev: use ARP protocol struct for flow matching",
        "Date": "Thu, 26 Jan 2023 16:19:02 +0000",
        "Message-ID": "<20230126161904.864517-7-ferruh.yigit@amd.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230126161904.864517-1-ferruh.yigit@amd.com>",
        "References": "<20221025214410.715864-1-thomas@monjalon.net>\n <20230126161904.864517-1-ferruh.yigit@amd.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.180.168.240]",
        "X-ClientProxiedBy": "SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com\n (10.181.40.145)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "BN8NAM11FT047:EE_|SA3PR12MB7975:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "a3a1d6e7-87cb-4798-0d6d-08daffb91cd4",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n dP2CTovS2O3w9fdzZD64P06J+aQqR56MircB80tvdkZ0IVat59mqKPKyLsjWTAS05fF2rcaIj6PD6GHV40XGDDPlE8ASW0FvN/B5ZzC0OqE8J6IvhJLWz1J+nZ/hpb8U8yzaLMLFTf2kSCjtoEU2llxkVLjT73aiLxqFg0n8ltW43Ly5y7AUJJmDxybz6IvenFgUgdMkq70ehlvARM7YD49b6mHxhQAvVfVdOq4KJmAURsTNdBiRtsVLaKTC0788nJ52CehPwVmZIUwdS2rYDTn5uB6iZ4lGjU3RnghhwbygtMM6mB8bFevZ9eWfnNUwYltWby7VrWVJLPElx1G6duD7xxtQBZlZjnWOiGuZUDOKU4ZeC+g1PR4syGewSTPCkY2/l4/let1Bnsv4U0tBT2emuoR/KYvSJwdMjtqQBmHKLYtnyhfoEjqIimpf3mZF1skqI3H9+Cw7tcFd2DuDjr0Vc2DATHomqc+SEadlAK1mcSSWj+1+qn1zbBMsLl5PmgHtUrRCU7w0K50tqXyI0MLThC0Qvi8Zcgm4z2ws19ha6K+0nlqSUiTnLyFCyP47QoqI5o2qzajFlVnRj3NkEYPJFvKoPh2cCdhlCy1QTVpEYXAXno68Y4zFE0f+l8Dx6po3ECCamtTiU7P80JaibSzcn2edWlMvYt6nYIPcgo8HcNP2ZGGK/ZY2Gcgo05MHduI8Y4hmkUJwPO+Il/4o4p3IwZdl5jbnMsLlkRrNG6A=",
        "X-Forefront-Antispam-Report": "CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE;\n SFS:(13230025)(4636009)(396003)(376002)(39860400002)(136003)(346002)(451199018)(36840700001)(46966006)(40470700004)(36860700001)(26005)(83380400001)(81166007)(5660300002)(82740400003)(7696005)(41300700001)(2906002)(86362001)(82310400005)(8936002)(4326008)(44832011)(16526019)(40460700003)(40480700001)(356005)(6666004)(316002)(186003)(336012)(8676002)(47076005)(2616005)(478600001)(54906003)(36756003)(110136005)(70586007)(426003)(1076003)(70206006)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "26 Jan 2023 16:19:34.3569 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n a3a1d6e7-87cb-4798-0d6d-08daffb91cd4",
        "X-MS-Exchange-CrossTenant-Id": "3dd8961f-e488-4e60-8e11-a82d994e183d",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17];\n Helo=[SATLEXMB04.amd.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT047.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SA3PR12MB7975",
        "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": "From: Thomas Monjalon <thomas@monjalon.net>\n\nAs announced in the deprecation notice, flow item structures\nshould re-use the protocol header definitions from the directory lib/net/.\n\nThe protocol struct is added in an unnamed union, keeping old field names.\n\nThe ARP header struct members are used in testpmd\ninstead of the redundant fields in the flow items.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n app/test-pmd/cmdline_flow.c          |  8 +++---\n doc/guides/prog_guide/rte_flow.rst   | 10 +-------\n doc/guides/rel_notes/deprecation.rst |  1 -\n lib/ethdev/rte_flow.h                | 37 ++++++++++++++++++----------\n 4 files changed, 29 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex dd6da9d98d9b..1d337a96199d 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -4226,7 +4226,7 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),\n \t\t\t     item_param),\n \t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,\n-\t\t\t\t\t     sha)),\n+\t\t\t\t\t     hdr.arp_data.arp_sha)),\n \t},\n \t[ITEM_ARP_ETH_IPV4_SPA] = {\n \t\t.name = \"spa\",\n@@ -4234,7 +4234,7 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),\n \t\t\t     item_param),\n \t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,\n-\t\t\t\t\t     spa)),\n+\t\t\t\t\t     hdr.arp_data.arp_sip)),\n \t},\n \t[ITEM_ARP_ETH_IPV4_THA] = {\n \t\t.name = \"tha\",\n@@ -4242,7 +4242,7 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),\n \t\t\t     item_param),\n \t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,\n-\t\t\t\t\t     tha)),\n+\t\t\t\t\t     hdr.arp_data.arp_tha)),\n \t},\n \t[ITEM_ARP_ETH_IPV4_TPA] = {\n \t\t.name = \"tpa\",\n@@ -4250,7 +4250,7 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),\n \t\t\t     item_param),\n \t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,\n-\t\t\t\t\t     tpa)),\n+\t\t\t\t\t     hdr.arp_data.arp_tip)),\n \t},\n \t[ITEM_IPV6_EXT] = {\n \t\t.name = \"ipv6_ext\",\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex ec2e335fac3d..8bf85df2f611 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1100,15 +1100,7 @@ Item: ``ARP_ETH_IPV4``\n \n Matches an ARP header for Ethernet/IPv4.\n \n-- ``hdr``: hardware type, normally 1.\n-- ``pro``: protocol type, normally 0x0800.\n-- ``hln``: hardware address length, normally 6.\n-- ``pln``: protocol address length, normally 4.\n-- ``op``: opcode (1 for request, 2 for reply).\n-- ``sha``: sender hardware address.\n-- ``spa``: sender IPv4 address.\n-- ``tha``: target hardware address.\n-- ``tpa``: target IPv4 address.\n+- ``hdr``:  header definition (``rte_arp.h``).\n - Default ``mask`` matches SHA, SPA, THA and TPA.\n \n Item: ``IPV6_EXT``\ndiff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex b89450b239ef..8e3683990117 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -64,7 +64,6 @@ Deprecation Notices\n   These items are not compliant (not including struct from lib/net/):\n \n   - ``rte_flow_item_ah``\n-  - ``rte_flow_item_arp_eth_ipv4``\n   - ``rte_flow_item_e_tag``\n   - ``rte_flow_item_geneve``\n   - ``rte_flow_item_geneve_opt``\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex 85ca73d1dc04..a215daa83640 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -20,6 +20,7 @@\n #include <rte_compat.h>\n #include <rte_common.h>\n #include <rte_ether.h>\n+#include <rte_arp.h>\n #include <rte_icmp.h>\n #include <rte_ip.h>\n #include <rte_sctp.h>\n@@ -1255,26 +1256,36 @@ static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask = {\n  *\n  * Matches an ARP header for Ethernet/IPv4.\n  */\n+RTE_STD_C11\n struct rte_flow_item_arp_eth_ipv4 {\n-\trte_be16_t hrd; /**< Hardware type, normally 1. */\n-\trte_be16_t pro; /**< Protocol type, normally 0x0800. */\n-\tuint8_t hln; /**< Hardware address length, normally 6. */\n-\tuint8_t pln; /**< Protocol address length, normally 4. */\n-\trte_be16_t op; /**< Opcode (1 for request, 2 for reply). */\n-\tstruct rte_ether_addr sha; /**< Sender hardware address. */\n-\trte_be32_t spa; /**< Sender IPv4 address. */\n-\tstruct rte_ether_addr tha; /**< Target hardware address. */\n-\trte_be32_t tpa; /**< Target IPv4 address. */\n+\tunion {\n+\t\tstruct {\n+\t\t\t/*\n+\t\t\t * These are old fields kept for compatibility.\n+\t\t\t * Please prefer hdr field below.\n+\t\t\t */\n+\t\t\trte_be16_t hrd; /**< Hardware type, normally 1. */\n+\t\t\trte_be16_t pro; /**< Protocol type, normally 0x0800. */\n+\t\t\tuint8_t hln; /**< Hardware address length, normally 6. */\n+\t\t\tuint8_t pln; /**< Protocol address length, normally 4. */\n+\t\t\trte_be16_t op; /**< Opcode (1 for request, 2 for reply). */\n+\t\t\tstruct rte_ether_addr sha; /**< Sender hardware address. */\n+\t\t\trte_be32_t spa; /**< Sender IPv4 address. */\n+\t\t\tstruct rte_ether_addr tha; /**< Target hardware address. */\n+\t\t\trte_be32_t tpa; /**< Target IPv4 address. */\n+\t\t};\n+\t\tstruct rte_arp_hdr hdr; /**< ARP header definition. */\n+\t};\n };\n \n /** Default mask for RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4. */\n #ifndef __cplusplus\n static const struct rte_flow_item_arp_eth_ipv4\n rte_flow_item_arp_eth_ipv4_mask = {\n-\t.sha.addr_bytes = \"\\xff\\xff\\xff\\xff\\xff\\xff\",\n-\t.spa = RTE_BE32(0xffffffff),\n-\t.tha.addr_bytes = \"\\xff\\xff\\xff\\xff\\xff\\xff\",\n-\t.tpa = RTE_BE32(0xffffffff),\n+\t.hdr.arp_data.arp_sha.addr_bytes = \"\\xff\\xff\\xff\\xff\\xff\\xff\",\n+\t.hdr.arp_data.arp_sip = RTE_BE32(UINT32_MAX),\n+\t.hdr.arp_data.arp_tha.addr_bytes = \"\\xff\\xff\\xff\\xff\\xff\\xff\",\n+\t.hdr.arp_data.arp_tip = RTE_BE32(UINT32_MAX),\n };\n #endif\n \n",
    "prefixes": [
        "v5",
        "6/8"
    ]
}