get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 122463,
    "url": "http://patches.dpdk.org/api/patches/122463/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230124090300.247915-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": "<20230124090300.247915-7-ferruh.yigit@amd.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230124090300.247915-7-ferruh.yigit@amd.com",
    "date": "2023-01-24T09:02:58",
    "name": "[v3,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/20230124090300.247915-7-ferruh.yigit@amd.com/mbox/",
    "series": [
        {
            "id": 26632,
            "url": "http://patches.dpdk.org/api/series/26632/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26632",
            "date": "2023-01-24T09:02:52",
            "name": "start cleanup of rte_flow_item_*",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/26632/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/122463/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/122463/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 8997842476;\n\tTue, 24 Jan 2023 10:06:37 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4A55442D36;\n\tTue, 24 Jan 2023 10:06:08 +0100 (CET)",
            "from NAM11-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam11on2083.outbound.protection.outlook.com [40.107.223.83])\n by mails.dpdk.org (Postfix) with ESMTP id E3E1440684\n for <dev@dpdk.org>; Tue, 24 Jan 2023 10:06:04 +0100 (CET)",
            "from MN2PR20CA0001.namprd20.prod.outlook.com (2603:10b6:208:e8::14)\n by PH7PR12MB6585.namprd12.prod.outlook.com (2603:10b6:510:213::22)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan\n 2023 09:05:58 +0000",
            "from BL02EPF000108EB.namprd05.prod.outlook.com\n (2603:10b6:208:e8:cafe::d9) by MN2PR20CA0001.outlook.office365.com\n (2603:10b6:208:e8::14) 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; Tue, 24 Jan 2023 09:05:58 +0000",
            "from SATLEXMB04.amd.com (165.204.84.17) by\n BL02EPF000108EB.mail.protection.outlook.com (10.167.241.200) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.20.6043.12 via Frontend Transport; Tue, 24 Jan 2023 09:05:58 +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; Tue, 24 Jan\n 2023 03:05:46 -0600"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=L4MBb9OKX6sjx+3sM2XnZsTSnEMl+WQvoC0/y7pUD9ia22+2XnpJy7HE6pOuIPqGDOTydbzX5mdI7oq3/fbVp8Vs2h+7aZ3/tm6M6qSPtemhyXuuer0ynK9LFIL8EhqjOjMSBGRIKWZx9/lrsxbdNszuIAREfjS1bDuZi7JKDhj+s0uEX2Ks/P6IrXBUs9RRNOq82PNoXxVrlpab+CNlPznfZ5h8E//RB/DOCjhZppl9ipaqPCJBlF1Lo/AZ/EcSHEMbRxpnqlqLjcDL90N2hL6zp0PZv9Coobkjou5AiBS50S0s6Luttpqf2q/9NsO98xElYW6Nw9qcI92pVWzG5g==",
        "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=bzYxML6G3XYbtzmEMEyvbCG2IDltAGG7bBMMFU/4u509wqw5Co75crFxW2vg10XOl8y96AHzmFoT4VzsCzpzykO4jwqbf64s7b12r4xOgWqHxvsk/k5jVRnoNIB64WanEB8EBsg7iRlZzGK+Y2dKuHgTdeYmCPCYFDTgSL2RgxrgPtwoDwbphsy25vBHPZIFbLjIYATu+ANn7mMcly7Ph5E2fjOtFYUPht0jUimd/PSJmt8CxVRlcjRaseSp+Q3ykGY4caBUjasIsub2bO2Aw7ZOz62gRH0N5KrTKrqUSRnEnRSMA8AcxsurDR5iMq3JXkeG9sHJ9f38Kx3yY1Qlug==",
        "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=LOnakxRGCA6Y7fRddrHWef+WuJdy2Kww1cCG5dHAQz9+AzdWkYhSc1gWfVdgLpR3i0JAIGujYsj2H2LmPXwmBrQqzY3lH2XFH257X61jWxd2/RkmIMEjn78XnVIWWLsh6NaIeLDC2N3gNn5eUecTmt+R/btQ2CF8bnyhW5ad2xU=",
        "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 v3 6/8] ethdev: use ARP protocol struct for flow matching",
        "Date": "Tue, 24 Jan 2023 09:02:58 +0000",
        "Message-ID": "<20230124090300.247915-7-ferruh.yigit@amd.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230124090300.247915-1-ferruh.yigit@amd.com>",
        "References": "<20221025214410.715864-1-thomas@monjalon.net>\n <20230124090300.247915-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": "SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com\n (10.181.40.145)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "BL02EPF000108EB:EE_|PH7PR12MB6585:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "a0554b3e-b21c-4422-39b1-08dafdea353a",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n gN76AWJ1M3cFvfHn5IKsu/rW7Npoqadt/8bnK5OREytgQge1NcY4e8AMZHWhmkHJ6nRcBXSdCVV2L+Enj2wfJkUQRL5ZbcY5rLxNx3BUP8K9SHYEoYKkg8chd85ajK5LIjpDrxKkboQTGSbUDpkXbV7gL+C9h3BHYZQC52CQBA9TH5+op4qPX5EKKyFUwZRrzzLy+ihp9s/R0EidFbnu8E6gzJhWy4vgs9huVfOZtpQ1+prJ1l6OGA+E03O+zen8tn6Bvj5gx0KUaFm7lgD51v9ZTJyhXbnzYXrk2HJ2R+hz9gg1U+WXDbdDhKq09DZJQLgrxQU0IOoF9o0gRW1p0fTotfZ36l8JpmUBbsdf9Qet6H9KFbMyPdb85QeMazRVO2MbtmYfsx5rXPZh2iFPoS5SJYRipGWaxX8PcSuf8I8Gq3tA+g1TUd9zLcNkxQCJvq9abBmqJsvhSr+ty2EkGfQlmfkdascaUgzWpRSl60wVg/DahT3AeXirUlP7pZY5GMiECdhCIw8N+3at91Q+pF+Ha+Jpx0EDYVuRtYEnze+1anTeOrmM2QulMaqfwXobrRuuljYJIlo1QjQuOb71ITGQxR4aqJHvkrJkqqlKgQqfELoK2exa0ax2ud27yMqbjmMf+a1cSfLduysImQPDlD8sUfon6gd+ALzMAR3SPjYEPmVzQuj5GIrqIcnkvLZLQETBmuk2kz0K+g7jJwB8MIsTh2s51nkRnzCrt8QQe5Q=",
        "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:(13230022)(4636009)(346002)(396003)(376002)(39860400002)(136003)(451199015)(46966006)(40470700004)(36840700001)(47076005)(426003)(40460700003)(86362001)(316002)(110136005)(478600001)(54906003)(7696005)(36756003)(40480700001)(356005)(82310400005)(1076003)(2616005)(82740400003)(36860700001)(81166007)(83380400001)(336012)(186003)(26005)(16526019)(5660300002)(2906002)(6666004)(44832011)(41300700001)(8936002)(70586007)(70206006)(4326008)(8676002)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "amd.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "24 Jan 2023 09:05:58.3060 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n a0554b3e-b21c-4422-39b1-08dafdea353a",
        "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 BL02EPF000108EB.namprd05.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR12MB6585",
        "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": [
        "v3",
        "6/8"
    ]
}