get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 109403,
    "url": "https://patches.dpdk.org/api/patches/109403/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220407062721.3886136-4-junfeng.guo@intel.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": "<20220407062721.3886136-4-junfeng.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220407062721.3886136-4-junfeng.guo@intel.com",
    "date": "2022-04-07T06:27:21",
    "name": "[3/3] net/iavf: enable Protocol Agnostic Flow Offloading FDIR",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6854a0965224e186d4e5aca5ff35ee6204bf601c",
    "submitter": {
        "id": 1785,
        "url": "https://patches.dpdk.org/api/people/1785/?format=api",
        "name": "Junfeng Guo",
        "email": "junfeng.guo@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220407062721.3886136-4-junfeng.guo@intel.com/mbox/",
    "series": [
        {
            "id": 22395,
            "url": "https://patches.dpdk.org/api/series/22395/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22395",
            "date": "2022-04-07T06:27:18",
            "name": "Enable Protocol Agnostic Flow Offloading FDIR in AVF",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/22395/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/109403/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/109403/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 34938A050B;\n\tThu,  7 Apr 2022 08:27:31 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DDB3E4284F;\n\tThu,  7 Apr 2022 08:27:24 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id A00E34111B\n for <dev@dpdk.org>; Thu,  7 Apr 2022 08:27:23 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 23:27:23 -0700",
            "from dpdk-jf-ntb-v2.sh.intel.com ([10.67.119.111])\n by orsmga007.jf.intel.com with ESMTP; 06 Apr 2022 23:27:21 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1649312843; x=1680848843;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=SeAI6rZ8Hz3leeGI/Cs6DNADiTWcaTZlA9+bU/mGqtg=;\n b=iSnwsdLn6zZNt82EYVZDwqYAl3zaKcWUgeW54YCndRk+KTMULn9GvxX+\n TGX4vFduSRMBuC8uqmqt7+c/3BizN2REAP0odNNrUYIp3sp6sN5IGrPGo\n 1LNvirApYZxamVz5dxFVzRNiKrnjDVAEnhpSBEInuRsxw0A0UI8Tx672p\n BGd3gHlHCc8OSk6ynD5m3a7j5WNFU1JZaw4OpCfUeihGzAk/5FFiUpQJj\n FnQzCSk27TORjI/M5RdN379m9bz3m/9RqtFpBcJPsCWjmnWHItkK8gLz5\n sJPshPy0YJ0GkHoW7P0gCnB1KgZgmeCOEzBqPG1BGKJIF3QA3Rj9XUKyg g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10309\"; a=\"248764673\"",
            "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"248764673\"",
            "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"549885041\""
        ],
        "X-ExtLoop1": "1",
        "From": "Junfeng Guo <junfeng.guo@intel.com>",
        "To": "qi.z.zhang@intel.com,\n\tjingjing.wu@intel.com,\n\tbeilei.xing@intel.com",
        "Cc": "dev@dpdk.org,\n\tjunfeng.guo@intel.com",
        "Subject": "[PATCH 3/3] net/iavf: enable Protocol Agnostic Flow Offloading FDIR",
        "Date": "Thu,  7 Apr 2022 14:27:21 +0800",
        "Message-Id": "<20220407062721.3886136-4-junfeng.guo@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220407062721.3886136-1-junfeng.guo@intel.com>",
        "References": "<20220407062721.3886136-1-junfeng.guo@intel.com>",
        "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": "This patch enabled Protocol Agnostic Flow Offloading FDIR in AVF.\n\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n drivers/net/iavf/iavf_fdir.c         | 66 ++++++++++++++++++++++++++++\n drivers/net/iavf/iavf_generic_flow.c |  6 +++\n drivers/net/iavf/iavf_generic_flow.h |  3 ++\n 3 files changed, 75 insertions(+)",
    "diff": "diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c\nindex e9a3566c0d..bd0ae544da 100644\n--- a/drivers/net/iavf/iavf_fdir.c\n+++ b/drivers/net/iavf/iavf_fdir.c\n@@ -194,6 +194,7 @@\n \tIAVF_INSET_TUN_TCP_DST_PORT)\n \n static struct iavf_pattern_match_item iavf_fdir_pattern[] = {\n+\t{iavf_pattern_raw,\t\t\t IAVF_INSET_NONE,\t\tIAVF_INSET_NONE},\n \t{iavf_pattern_ethertype,\t\t IAVF_FDIR_INSET_ETH,\t\tIAVF_INSET_NONE},\n \t{iavf_pattern_eth_ipv4,\t\t\t IAVF_FDIR_INSET_ETH_IPV4,\tIAVF_INSET_NONE},\n \t{iavf_pattern_eth_ipv4_udp,\t\t IAVF_FDIR_INSET_ETH_IPV4_UDP,\tIAVF_INSET_NONE},\n@@ -720,6 +721,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,\n \tstruct virtchnl_proto_hdrs *hdrs =\n \t\t\t&filter->add_fltr.rule_cfg.proto_hdrs;\n \tenum rte_flow_item_type l3 = RTE_FLOW_ITEM_TYPE_END;\n+\tconst struct rte_flow_item_raw *raw_spec, *raw_mask;\n \tconst struct rte_flow_item_eth *eth_spec, *eth_mask;\n \tconst struct rte_flow_item_ipv4 *ipv4_spec, *ipv4_last, *ipv4_mask;\n \tconst struct rte_flow_item_ipv6 *ipv6_spec, *ipv6_mask;\n@@ -746,6 +748,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,\n \tenum rte_flow_item_type next_type;\n \tuint8_t tun_inner = 0;\n \tuint16_t ether_type, flags_version;\n+\tuint8_t item_num = 0;\n \tint layer = 0;\n \n \tuint8_t  ipv6_addr_mask[16] = {\n@@ -763,8 +766,71 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,\n \t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ITEM, item,\n \t\t\t\t\t   \"Not support range\");\n \t\t}\n+\t\titem_num++;\n \n \t\tswitch (item_type) {\n+\t\tcase RTE_FLOW_ITEM_TYPE_RAW:\n+\t\t\traw_spec = item->spec;\n+\t\t\traw_mask = item->mask;\n+\n+\t\t\tif (item_num != 1)\n+\t\t\t\treturn -rte_errno;\n+\n+\t\t\tif (raw_spec->length != raw_mask->length)\n+\t\t\t\treturn -rte_errno;\n+\n+\t\t\tuint16_t pkt_len = 0;\n+\t\t\tuint16_t tmp_val = 0;\n+\t\t\tuint8_t tmp = 0;\n+\t\t\tint i, j;\n+\n+\t\t\tpkt_len = raw_spec->length;\n+\n+\t\t\tfor (i = 0, j = 0; i < pkt_len; i += 2, j++) {\n+\t\t\t\ttmp = raw_spec->pattern[i];\n+\t\t\t\tif (tmp >= 'a' && tmp <= 'f')\n+\t\t\t\t\ttmp_val = tmp - 'a' + 10;\n+\t\t\t\tif (tmp >= 'A' && tmp <= 'F')\n+\t\t\t\t\ttmp_val = tmp - 'A' + 10;\n+\t\t\t\tif (tmp >= '0' && tmp <= '9')\n+\t\t\t\t\ttmp_val = tmp - '0';\n+\n+\t\t\t\ttmp_val *= 16;\n+\t\t\t\ttmp = raw_spec->pattern[i + 1];\n+\t\t\t\tif (tmp >= 'a' && tmp <= 'f')\n+\t\t\t\t\ttmp_val += (tmp - 'a' + 10);\n+\t\t\t\tif (tmp >= 'A' && tmp <= 'F')\n+\t\t\t\t\ttmp_val += (tmp - 'A' + 10);\n+\t\t\t\tif (tmp >= '0' && tmp <= '9')\n+\t\t\t\t\ttmp_val += (tmp - '0');\n+\n+\t\t\t\thdrs->raw.spec[j] = tmp_val;\n+\n+\t\t\t\ttmp = raw_mask->pattern[i];\n+\t\t\t\tif (tmp >= 'a' && tmp <= 'f')\n+\t\t\t\t\ttmp_val = tmp - 'a' + 10;\n+\t\t\t\tif (tmp >= 'A' && tmp <= 'F')\n+\t\t\t\t\ttmp_val = tmp - 'A' + 10;\n+\t\t\t\tif (tmp >= '0' && tmp <= '9')\n+\t\t\t\t\ttmp_val = tmp - '0';\n+\n+\t\t\t\ttmp_val *= 16;\n+\t\t\t\ttmp = raw_mask->pattern[i + 1];\n+\t\t\t\tif (tmp >= 'a' && tmp <= 'f')\n+\t\t\t\t\ttmp_val += (tmp - 'a' + 10);\n+\t\t\t\tif (tmp >= 'A' && tmp <= 'F')\n+\t\t\t\t\ttmp_val += (tmp - 'A' + 10);\n+\t\t\t\tif (tmp >= '0' && tmp <= '9')\n+\t\t\t\t\ttmp_val += (tmp - '0');\n+\n+\t\t\t\thdrs->raw.mask[j] = tmp_val;\n+\t\t\t}\n+\n+\t\t\thdrs->raw.pkt_len = pkt_len / 2;\n+\t\t\thdrs->tunnel_level = 0;\n+\t\t\thdrs->count = 0;\n+\t\t\treturn 0;\n+\n \t\tcase RTE_FLOW_ITEM_TYPE_ETH:\n \t\t\teth_spec = item->spec;\n \t\t\teth_mask = item->mask;\ndiff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c\nindex ddc1fdd22b..e1a611e319 100644\n--- a/drivers/net/iavf/iavf_generic_flow.c\n+++ b/drivers/net/iavf/iavf_generic_flow.c\n@@ -48,6 +48,12 @@ const struct rte_flow_ops iavf_flow_ops = {\n \t.query = iavf_flow_query,\n };\n \n+/* raw */\n+enum rte_flow_item_type iavf_pattern_raw[] = {\n+\tRTE_FLOW_ITEM_TYPE_RAW,\n+\tRTE_FLOW_ITEM_TYPE_END,\n+};\n+\n /* empty */\n enum rte_flow_item_type iavf_pattern_empty[] = {\n \tRTE_FLOW_ITEM_TYPE_END,\ndiff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h\nindex f6af176073..52eb1caf29 100644\n--- a/drivers/net/iavf/iavf_generic_flow.h\n+++ b/drivers/net/iavf/iavf_generic_flow.h\n@@ -180,6 +180,9 @@\n #define IAVF_INSET_L2TPV2 \\\n \t(IAVF_PROT_L2TPV2 | IAVF_L2TPV2_SESSION_ID)\n \n+/* raw pattern */\n+extern enum rte_flow_item_type iavf_pattern_raw[];\n+\n /* empty pattern */\n extern enum rte_flow_item_type iavf_pattern_empty[];\n \n",
    "prefixes": [
        "3/3"
    ]
}