get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128942,
    "url": "http://patchwork.dpdk.org/api/patches/128942/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230622151123.275873-4-artemii.morozov@arknetworks.am/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230622151123.275873-4-artemii.morozov@arknetworks.am>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230622151123.275873-4-artemii.morozov@arknetworks.am",
    "date": "2023-06-22T15:11:22",
    "name": "[v7,3/4] common/sfc_efx/base: add support to enable VLAN stripping",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4c69c5a3628ee07791c20784a30bbf578662f829",
    "submitter": {
        "id": 3083,
        "url": "http://patchwork.dpdk.org/api/people/3083/?format=api",
        "name": "Artemii Morozov",
        "email": "Artemii.Morozov@arknetworks.am"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230622151123.275873-4-artemii.morozov@arknetworks.am/mbox/",
    "series": [
        {
            "id": 28620,
            "url": "http://patchwork.dpdk.org/api/series/28620/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28620",
            "date": "2023-06-22T15:11:19",
            "name": "net/sfc: support VLAN stripping offload",
            "version": 7,
            "mbox": "http://patchwork.dpdk.org/series/28620/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128942/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/128942/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 2A79342D1C;\n\tThu, 22 Jun 2023 17:12:02 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3755E42D13;\n\tThu, 22 Jun 2023 17:11:50 +0200 (CEST)",
            "from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80])\n by mails.dpdk.org (Postfix) with ESMTP id D6C904113F\n for <dev@dpdk.org>; Thu, 22 Jun 2023 17:11:46 +0200 (CEST)",
            "from angrod.. (unknown [141.136.90.242])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by agw.arknetworks.am (Postfix) with ESMTPSA id 17B6BE0085;\n Thu, 22 Jun 2023 19:11:45 +0400 (+04)"
        ],
        "From": "Artemii Morozov <artemii.morozov@arknetworks.am>",
        "To": "dev@dpdk.org",
        "Cc": "Ivan Malov <ivan.malov@arknetworks.am>,\n Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Andy Moreton <amoreton@xilinx.com>",
        "Subject": "[PATCH v7 3/4] common/sfc_efx/base: add support to enable VLAN\n stripping",
        "Date": "Thu, 22 Jun 2023 19:11:22 +0400",
        "Message-Id": "<20230622151123.275873-4-artemii.morozov@arknetworks.am>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230622151123.275873-1-artemii.morozov@arknetworks.am>",
        "References": "<20230531134122.119508-1-artemii.morozov@arknetworks.am>\n <20230622151123.275873-1-artemii.morozov@arknetworks.am>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "To enable VLAN stripping, two conditions must be met:\nthe corresponding flag must be set and the appropriate\nRx prefix should be requested.\nVLAN stripping is supported on EF100.\n\nSigned-off-by: Artemii Morozov <artemii.morozov@arknetworks.am>\nReviewed-by: Ivan Malov <ivan.malov@arknetworks.am>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/common/sfc_efx/base/ef10_filter.c |  6 ++++\n drivers/common/sfc_efx/base/efx.h         | 12 +++++++\n drivers/common/sfc_efx/base/efx_impl.h    |  1 +\n drivers/common/sfc_efx/base/efx_port.c    | 39 +++++++++++++++++++++++\n drivers/common/sfc_efx/base/efx_rx.c      | 14 ++++++++\n drivers/common/sfc_efx/base/rhead_rx.c    |  3 ++\n drivers/common/sfc_efx/version.map        |  1 +\n 7 files changed, 76 insertions(+)",
    "diff": "diff --git a/drivers/common/sfc_efx/base/ef10_filter.c b/drivers/common/sfc_efx/base/ef10_filter.c\nindex 278502fb61..3e6dd2e35c 100644\n--- a/drivers/common/sfc_efx/base/ef10_filter.c\n+++ b/drivers/common/sfc_efx/base/ef10_filter.c\n@@ -171,6 +171,7 @@ efx_mcdi_filter_op_add(\n \tEFX_MCDI_DECLARE_BUF(payload, MC_CMD_FILTER_OP_V3_IN_LEN,\n \t\tMC_CMD_FILTER_OP_EXT_OUT_LEN);\n \tefx_filter_match_flags_t match_flags;\n+\tefx_port_t *epp = &(enp->en_port);\n \tuint32_t port_id;\n \tefx_rc_t rc;\n \n@@ -338,6 +339,11 @@ efx_mcdi_filter_op_add(\n \t\t    FILTER_OP_V3_IN_MATCH_SET_FLAG, 1);\n \t}\n \n+\tif (epp->ep_vlan_strip) {\n+\t\tMCDI_IN_SET_DWORD_FIELD(req, FILTER_OP_V3_IN_MATCH_ACTION_FLAGS,\n+\t\t    FILTER_OP_V3_IN_MATCH_STRIP_VLAN, 1);\n+\t}\n+\n \tefx_mcdi_execute(enp, &req);\n \n \tif (req.emr_rc != 0) {\ndiff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h\nindex 7fcf48f5e1..77f855bfb0 100644\n--- a/drivers/common/sfc_efx/base/efx.h\n+++ b/drivers/common/sfc_efx/base/efx.h\n@@ -1158,6 +1158,12 @@ efx_port_poll(\n \t__in\t\tefx_nic_t *enp,\n \t__out_opt\tefx_link_mode_t\t*link_modep);\n \n+LIBEFX_API\n+extern\t__checkReturn\tefx_rc_t\n+efx_port_vlan_strip_set(\n+\t__in\t\tefx_nic_t *enp,\n+\t__in\t\tboolean_t enabled);\n+\n LIBEFX_API\n extern\t\tvoid\n efx_port_fini(\n@@ -3117,6 +3123,12 @@ typedef enum efx_rxq_type_e {\n  * Request user flag field in the Rx prefix of a queue.\n  */\n #define\tEFX_RXQ_FLAG_USER_FLAG\t\t0x20\n+/*\n+ * Request VLAN TCI field in the Rx prefix. The flag just\n+ * controls delivery of the stripped VLAN TCI if VLAN stripping\n+ * is enabled and done.\n+ */\n+#define\tEFX_RXQ_FLAG_VLAN_STRIPPED_TCI\t\t0x40\n \n LIBEFX_API\n extern\t__checkReturn\tefx_rc_t\ndiff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h\nindex 91ba187c73..78cc056576 100644\n--- a/drivers/common/sfc_efx/base/efx_impl.h\n+++ b/drivers/common/sfc_efx/base/efx_impl.h\n@@ -371,6 +371,7 @@ typedef struct efx_port_s {\n \tuint32_t\t\tep_phy_cap_mask;\n \tboolean_t\t\tep_mac_drain;\n \tboolean_t\t\tep_include_fcs;\n+\tboolean_t\t\tep_vlan_strip;\n #if EFSYS_OPT_BIST\n \tefx_bist_type_t\t\tep_current_bist;\n #endif\ndiff --git a/drivers/common/sfc_efx/base/efx_port.c b/drivers/common/sfc_efx/base/efx_port.c\nindex a5f982e335..e5a9fa6c53 100644\n--- a/drivers/common/sfc_efx/base/efx_port.c\n+++ b/drivers/common/sfc_efx/base/efx_port.c\n@@ -204,6 +204,45 @@ efx_loopback_type_name(\n \n #endif\t/* EFSYS_OPT_LOOPBACK */\n \n+\t__checkReturn\tefx_rc_t\n+efx_port_vlan_strip_set(\n+\t__in\t\tefx_nic_t *enp,\n+\t__in\t\tboolean_t enabled)\n+{\n+\tefx_port_t *epp = &(enp->en_port);\n+\tefx_nic_cfg_t *encp = &(enp->en_nic_cfg);\n+\tuint32_t filters_count = 0;\n+\tefx_rc_t rc;\n+\n+\tEFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);\n+\n+\tif (enabled && !encp->enc_rx_vlan_stripping_supported) {\n+\t\trc = ENOTSUP;\n+\t\tgoto fail1;\n+\t}\n+\n+\tif ((rc = efx_filter_get_count(enp, &filters_count)) != 0)\n+\t\tgoto fail2;\n+\n+\tif (filters_count != 0) {\n+\t\trc = EINVAL;\n+\t\tgoto fail3;\n+\t}\n+\n+\tepp->ep_vlan_strip = enabled;\n+\n+\treturn (0);\n+\n+fail3:\n+\tEFSYS_PROBE(fail3);\n+fail2:\n+\tEFSYS_PROBE(fail2);\n+fail1:\n+\tEFSYS_PROBE1(fail1, efx_rc_t, rc);\n+\n+\treturn (rc);\n+}\n+\n \t\t\tvoid\n efx_port_fini(\n \t__in\t\tefx_nic_t *enp)\ndiff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c\nindex 68f42f5cac..b3d9e14c67 100644\n--- a/drivers/common/sfc_efx/base/efx_rx.c\n+++ b/drivers/common/sfc_efx/base/efx_rx.c\n@@ -941,11 +941,25 @@ efx_rx_qcreate_internal(\n \t\t\tgoto fail5;\n \t}\n \n+\tif (flags & EFX_RXQ_FLAG_VLAN_STRIPPED_TCI) {\n+\t\tconst efx_rx_prefix_layout_t *erplp = &erp->er_prefix_layout;\n+\t\tconst efx_rx_prefix_field_info_t *vlan_tci_field;\n+\n+\t\tvlan_tci_field =\n+\t\t    &erplp->erpl_fields[EFX_RX_PREFIX_FIELD_VLAN_STRIP_TCI];\n+\t\tif (vlan_tci_field->erpfi_width_bits == 0) {\n+\t\t\trc = ENOTSUP;\n+\t\t\tgoto fail6;\n+\t\t}\n+\t}\n+\n \tenp->en_rx_qcount++;\n \t*erpp = erp;\n \n \treturn (0);\n \n+fail6:\n+\tEFSYS_PROBE(fail6);\n fail5:\n \tEFSYS_PROBE(fail5);\n \ndiff --git a/drivers/common/sfc_efx/base/rhead_rx.c b/drivers/common/sfc_efx/base/rhead_rx.c\nindex d0ac5c02f8..a86551f646 100644\n--- a/drivers/common/sfc_efx/base/rhead_rx.c\n+++ b/drivers/common/sfc_efx/base/rhead_rx.c\n@@ -640,6 +640,9 @@ rhead_rx_qcreate(\n \tif (flags & EFX_RXQ_FLAG_USER_FLAG)\n \t\tfields_mask |= 1U << EFX_RX_PREFIX_FIELD_USER_FLAG;\n \n+\tif (flags & EFX_RXQ_FLAG_VLAN_STRIPPED_TCI)\n+\t\tfields_mask |= 1U << EFX_RX_PREFIX_FIELD_VLAN_STRIP_TCI;\n+\n \t/*\n \t * LENGTH is required in EF100 host interface, as receive events\n \t * do not include the packet length.\ndiff --git a/drivers/common/sfc_efx/version.map b/drivers/common/sfc_efx/version.map\nindex 01113bffa7..40c97ad2b4 100644\n--- a/drivers/common/sfc_efx/version.map\n+++ b/drivers/common/sfc_efx/version.map\n@@ -211,6 +211,7 @@ INTERNAL {\n \tefx_port_init;\n \tefx_port_loopback_set;\n \tefx_port_poll;\n+\tefx_port_vlan_strip_set;\n \n \tefx_pseudo_hdr_hash_get;\n \tefx_pseudo_hdr_pkt_length_get;\n",
    "prefixes": [
        "v7",
        "3/4"
    ]
}