get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 114956,
    "url": "https://patches.dpdk.org/api/patches/114956/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220814184620.512343-4-gakhil@marvell.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": "<20220814184620.512343-4-gakhil@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220814184620.512343-4-gakhil@marvell.com",
    "date": "2022-08-14T18:46:20",
    "name": "[3/3] ethdev: add MACsec flow item",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3a8f9b1cb8aca7ec55ee764a080c4017d2e15287",
    "submitter": {
        "id": 2094,
        "url": "https://patches.dpdk.org/api/people/2094/?format=api",
        "name": "Akhil Goyal",
        "email": "gakhil@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220814184620.512343-4-gakhil@marvell.com/mbox/",
    "series": [
        {
            "id": 24306,
            "url": "https://patches.dpdk.org/api/series/24306/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24306",
            "date": "2022-08-14T18:46:17",
            "name": "security: support MACsec",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/24306/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/114956/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/114956/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 AD36FA00C2;\n\tSun, 14 Aug 2022 20:46:53 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2408A4113C;\n\tSun, 14 Aug 2022 20:46:48 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id AAAA8427EC\n for <dev@dpdk.org>; Sun, 14 Aug 2022 20:46:46 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 27EIkcJU030986;\n Sun, 14 Aug 2022 11:46:46 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3hxbfkm1dv-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 14 Aug 2022 11:46:46 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Sun, 14 Aug 2022 11:46:43 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Sun, 14 Aug 2022 11:46:43 -0700",
            "from localhost.localdomain (unknown [10.28.36.102])\n by maili.marvell.com (Postfix) with ESMTP id D964B3F7052;\n Sun, 14 Aug 2022 11:46:39 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=+mHsGBIQF+DK2HwiHyRBHOdU5fMVyBeT+BMsGyk7MOQ=;\n b=JlmrlnU8ZmgIosSqxCVvHtZPfZdnV7P79ctftLgb5eh8CdXNZXlq6hQLgdxYFOtTNyrn\n dRefEwZUBPP+7QNLdFt6ClhWgHI++evjbcH8rclrxIwk0lFYefpYd/Knj8WyjH2IYd4t\n st3xcHITZHEYPFt9drD6vHBux87u8UaS4Sx2x96JIOVu4c76Cl1lhfvCgqT3dDP6DGvF\n utO0/uaBualPor8wXjq3R9SewYYjTWTjqlSRmqaaHePN5+IMq3IBs8/vtEcsYhOvz2X7\n jSrl3EW+k3Sv9rfwiP0KIQb/M5azNZLl4d4dgXGEhcsQ4tTjlPtiXue7SuNcXxChfOSZ jg==",
        "From": "Akhil Goyal <gakhil@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<thomas@monjalon.net>, <david.marchand@redhat.com>,\n <hemant.agrawal@nxp.com>, <vattunuru@marvell.com>,\n <ferruh.yigit@xilinx.com>, <andrew.rybchenko@oktetlabs.ru>,\n <konstantin.v.ananyev@yandex.ru>, <jiawenwu@trustnetic.com>,\n <yisen.zhuang@huawei.com>, <irusskikh@marvell.com>,\n <qiming.yang@intel.com>, <jerinj@marvell.com>, <adwivedi@marvell.com>,\n Akhil Goyal <gakhil@marvell.com>",
        "Subject": "[PATCH 3/3] ethdev: add MACsec flow item",
        "Date": "Mon, 15 Aug 2022 00:16:20 +0530",
        "Message-ID": "<20220814184620.512343-4-gakhil@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220814184620.512343-1-gakhil@marvell.com>",
        "References": "<20220814184620.512343-1-gakhil@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "IBYWPDJTtYs3w_f-pjaUFVxCNUwgFMCU",
        "X-Proofpoint-ORIG-GUID": "IBYWPDJTtYs3w_f-pjaUFVxCNUwgFMCU",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1\n definitions=2022-08-14_11,2022-08-11_01,2022-06-22_01",
        "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": "A new flow item is defined for MACsec flows which can be\noffloaded to an inline device. If the flow matches with\nMACsec header, device will process as per the security\nsession created using rte_security APIs.\nIf an error comes while MACsec processing in HW, PMD will\nnotify with the events defined in this patch.\n\nSigned-off-by: Akhil Goyal <gakhil@marvell.com>\n---\n lib/ethdev/rte_ethdev.h | 55 +++++++++++++++++++++++++++++++++++++++++\n lib/ethdev/rte_flow.h   | 18 ++++++++++++++\n 2 files changed, 73 insertions(+)",
    "diff": "diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex de9e970d4d..24661b01e9 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -3864,6 +3864,61 @@ rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,\n int\n rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);\n \n+/**\n+ * Subtypes for MACsec offload event(@ref RTE_ETH_EVENT_MACSEC) raised by\n+ * Ethernet device.\n+ */\n+enum rte_eth_macsec_event_subtype {\n+\tRTE_ETH_MACSEC_SUBEVENT_UNKNOWN,\n+\t/* subevents of RTE_ETH_MACSEC_EVENT_SECTAG_VAL_ERR sectag validation events\n+\t * RTE_ETH_MACSEC_EVENT_RX_SECTAG_V_EQ1\n+\t *\tValidation check: SecTag.TCI.V = 1\n+\t * RTE_ETH_MACSEC_EVENT_RX_SECTAG_E_EQ0_C_EQ1\n+\t *\tValidation check: SecTag.TCI.E = 0 && SecTag.TCI.C = 1\n+\t * RTE_ETH_MACSEC_EVENT_RX_SECTAG_SL_GTE48\n+\t *\tValidation check: SecTag.SL >= 'd48\n+\t * RTE_ETH_MACSEC_EVENT_RX_SECTAG_ES_EQ1_SC_EQ1\n+\t *\tValidation check: SecTag.TCI.ES = 1 && SecTag.TCI.SC = 1\n+\t * RTE_ETH_MACSEC_EVENT_RX_SECTAG_SC_EQ1_SCB_EQ1\n+\t *\tValidation check: SecTag.TCI.SC = 1 && SecTag.TCI.SCB = 1\n+\t */\n+\tRTE_ETH_MACSEC_SUBEVENT_RX_SECTAG_V_EQ1,\n+\tRTE_ETH_MACSEC_SUBEVENT_RX_SECTAG_E_EQ0_C_EQ1,\n+\tRTE_ETH_MACSEC_SUBEVENT_RX_SECTAG_SL_GTE48,\n+\tRTE_ETH_MACSEC_SUBEVENT_RX_SECTAG_ES_EQ1_SC_EQ1,\n+\tRTE_ETH_MACSEC_SUBEVENT_RX_SECTAG_SC_EQ1_SCB_EQ1,\n+};\n+\n+enum rte_eth_macsec_event_type {\n+\tRTE_ETH_MACSEC_EVENT_UNKNOWN,\n+\tRTE_ETH_MACSEC_EVENT_SECTAG_VAL_ERR,\n+\tRTE_ETH_MACSEC_EVENT_RX_SA_PN_HARD_EXP,\n+\tRTE_ETH_MACSEC_EVENT_RX_SA_PN_SOFT_EXP,\n+\tRTE_ETH_MACSEC_EVENT_TX_SA_PN_HARD_EXP,\n+\tRTE_ETH_MACSEC_EVENT_TX_SA_PN_SOFT_EXP,\n+\t/* Notifies Invalid SA event */\n+\tRTE_ETH_MACSEC_EVENT_SA_NOT_VALID,\n+};\n+\n+/**\n+ * Descriptor for @ref RTE_ETH_EVENT_MACSEC event. Used by eth dev to send extra\n+ * information of the MACsec offload event.\n+ */\n+struct rte_eth_event_macsec_desc {\n+\tenum rte_eth_macsec_event_type type;\n+\tenum rte_eth_macsec_event_subtype subtype;\n+\t/**\n+\t * Event specific metadata.\n+\t *\n+\t * For the following events, *userdata* registered\n+\t * with the *rte_security_session* would be returned\n+\t * as metadata,\n+\t *\n+\t * @see struct rte_security_session_conf\n+\t */\n+\tuint64_t metadata;\n+};\n+\n /**\n  * Subtypes for IPsec offload event(@ref RTE_ETH_EVENT_IPSEC) raised by\n  * eth device.\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex a79f1e7ef0..4114c84a02 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -35,6 +35,7 @@\n #include <rte_l2tpv2.h>\n #include <rte_ppp.h>\n #include <rte_gre.h>\n+#include <rte_macsec.h>\n \n #ifdef __cplusplus\n extern \"C\" {\n@@ -668,6 +669,13 @@ enum rte_flow_item_type {\n \t * See struct rte_flow_item_gre_opt.\n \t */\n \tRTE_FLOW_ITEM_TYPE_GRE_OPTION,\n+\n+\t/**\n+\t * Matches MACsec Ethernet Header.\n+\t *\n+\t * See struct rte_flow_item_macsec.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_MACSEC,\n };\n \n /**\n@@ -1214,6 +1222,16 @@ struct rte_flow_item_gre_opt {\n \tstruct rte_gre_hdr_opt_sequence sequence;\n };\n \n+/**\n+ * RTE_FLOW_ITEM_TYPE_MACSEC.\n+ *\n+ * Matches MACsec header.\n+ */\n+struct rte_flow_item_macsec {\n+\tstruct rte_macsec_hdr macsec_hdr;\n+};\n+\n+\n /**\n  * RTE_FLOW_ITEM_TYPE_FUZZY\n  *\n",
    "prefixes": [
        "3/3"
    ]
}