get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 76663,
    "url": "http://patches.dpdk.org/api/patches/76663/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200907091711.5980-3-junyux.jiang@intel.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": "<20200907091711.5980-3-junyux.jiang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200907091711.5980-3-junyux.jiang@intel.com",
    "date": "2020-09-07T09:17:08",
    "name": "[v2,2/5] net/ice: add flow director enabled switch value",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "53dcba2dacb822940b132fb8c5c00dba875205ba",
    "submitter": {
        "id": 1408,
        "url": "http://patches.dpdk.org/api/people/1408/?format=api",
        "name": "Junyu Jiang",
        "email": "junyux.jiang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200907091711.5980-3-junyux.jiang@intel.com/mbox/",
    "series": [
        {
            "id": 11987,
            "url": "http://patches.dpdk.org/api/series/11987/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11987",
            "date": "2020-09-07T09:17:06",
            "name": "supports RxDID #22 and FDID",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/11987/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/76663/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/76663/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6B275A04B9;\n\tMon,  7 Sep 2020 11:26:55 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D93781C0DC;\n\tMon,  7 Sep 2020 11:26:39 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by dpdk.org (Postfix) with ESMTP id 0278D1C0CA\n for <dev@dpdk.org>; Mon,  7 Sep 2020 11:26:37 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Sep 2020 02:26:37 -0700",
            "from unknown (HELO intel.sh.intel.com) ([10.239.255.60])\n by fmsmga001.fm.intel.com with ESMTP; 07 Sep 2020 02:26:35 -0700"
        ],
        "IronPort-SDR": [
            "\n svIMmD6mNtmfXuj20G3n+EMSA9hxL8jeg6L8Akb8dc+6CyKg8Mn8rSNV+ZE2Egiz9aFw4XrdJT\n G/aDSFTNkufw==",
            "\n YyFMpUm8XrpdlPCs6yVW/IDkzMuh6eMy+JwszLDPMnQXm0Y4mgYn2ZEvG6JOY8qtJGT9a+eIO+\n 9cMc2PY+akaA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9736\"; a=\"157241152\"",
            "E=Sophos;i=\"5.76,401,1592895600\"; d=\"scan'208\";a=\"157241152\"",
            "E=Sophos;i=\"5.76,401,1592895600\"; d=\"scan'208\";a=\"406783293\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Junyu Jiang <junyux.jiang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Qi Zhang <qi.z.zhang@intel.com>, Qiming Yang <qiming.yang@intel.com>,\n Guinan Sun <guinanx.sun@intel.com>",
        "Date": "Mon,  7 Sep 2020 09:17:08 +0000",
        "Message-Id": "<20200907091711.5980-3-junyux.jiang@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200907091711.5980-1-junyux.jiang@intel.com>",
        "References": "<20200826075501.50052-1-guinanx.sun@intel.com>\n <20200907091711.5980-1-junyux.jiang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 2/5] net/ice: add flow director enabled switch\n\tvalue",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Guinan Sun <guinanx.sun@intel.com>\n\nThe commit adds fdir_enabled flag into ice_adapter structure\nto identify if fdir id is active. Rx data path can be benefit if\nfdir id parsing is not needed, especially in vector path.\n\nSigned-off-by: Guinan Sun <guinanx.sun@intel.com>\n---\n drivers/net/ice/ice_ethdev.h      |  2 ++\n drivers/net/ice/ice_fdir_filter.c |  9 ++++++++-\n drivers/net/ice/ice_rxtx.h        | 30 ++++++++++++++++++++++++++++++\n 3 files changed, 40 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h\nindex 393dfeab1..df0d65d8d 100644\n--- a/drivers/net/ice/ice_ethdev.h\n+++ b/drivers/net/ice/ice_ethdev.h\n@@ -285,6 +285,7 @@ struct ice_fdir_filter_conf {\n \tstruct rte_flow_action_count act_count;\n \n \tuint64_t input_set;\n+\tuint32_t mark_flag;\n };\n \n #define ICE_MAX_FDIR_FILTER_NUM\t\t(1024 * 16)\n@@ -464,6 +465,7 @@ struct ice_adapter {\n \tbool is_safe_mode;\n \tstruct ice_devargs devargs;\n \tenum ice_pkg_type active_pkg_type; /* loaded ddp package type */\n+\tuint16_t fdir_ref_cnt;\n };\n \n struct ice_vsi_vlan_pvid_info {\ndiff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c\nindex 745d7291a..e496c4d0a 100644\n--- a/drivers/net/ice/ice_fdir_filter.c\n+++ b/drivers/net/ice/ice_fdir_filter.c\n@@ -1329,6 +1329,9 @@ ice_fdir_create_filter(struct ice_adapter *ad,\n \t\tgoto free_counter;\n \t}\n \n+\tif (filter->mark_flag == 1)\n+\t\tice_fdir_rx_proc_enable(ad, 1);\n+\n \trte_memcpy(entry, filter, sizeof(*entry));\n \tret = ice_fdir_entry_insert(pf, entry, &key);\n \tif (ret) {\n@@ -1401,6 +1404,10 @@ ice_fdir_destroy_filter(struct ice_adapter *ad,\n \t}\n \n \tice_fdir_cnt_update(pf, filter->input.flow_type, is_tun, false);\n+\n+\tif (filter->mark_flag == 1)\n+\t\tice_fdir_rx_proc_enable(ad, 0);\n+\n \tflow->rule = NULL;\n \n \trte_free(filter);\n@@ -1573,7 +1580,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,\n \t\t\tbreak;\n \t\tcase RTE_FLOW_ACTION_TYPE_MARK:\n \t\t\tmark_num++;\n-\n+\t\t\tfilter->mark_flag = 1;\n \t\t\tmark_spec = actions->conf;\n \t\t\tfilter->input.fltr_id = mark_spec->id;\n \t\t\tfilter->input.fdid_prio = ICE_FXD_FLTR_QW1_FDID_PRI_ONE;\ndiff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h\nindex e21ba152d..69d6e0b8b 100644\n--- a/drivers/net/ice/ice_rxtx.h\n+++ b/drivers/net/ice/ice_rxtx.h\n@@ -70,6 +70,7 @@ struct ice_rx_queue {\n \n \tuint8_t port_id; /* device port ID */\n \tuint8_t crc_len; /* 0 if CRC stripped, 4 otherwise */\n+\tuint8_t fdir_enabled; /* 0 if FDIR disabled, 1 when enabled */\n \tuint16_t queue_id; /* RX queue index */\n \tuint16_t reg_idx; /* RX queue register index */\n \tuint8_t drop_en; /* if not 0, set register bit */\n@@ -245,4 +246,33 @@ uint16_t ice_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,\n int ice_fdir_programming(struct ice_pf *pf, struct ice_fltr_desc *fdir_desc);\n int ice_tx_done_cleanup(void *txq, uint32_t free_cnt);\n \n+#define FDIR_PROC_ENABLE_PER_QUEUE(ad, on) do { \\\n+\tint i; \\\n+\tfor (i = 0; i < (ad)->eth_dev->data->nb_rx_queues; i++) { \\\n+\t\tstruct ice_rx_queue *rxq = (ad)->eth_dev->data->rx_queues[i]; \\\n+\t\tif (!rxq) \\\n+\t\t\tcontinue; \\\n+\t\trxq->fdir_enabled = on; \\\n+\t} \\\n+\tPMD_DRV_LOG(DEBUG, \"FDIR processing on RX set to %d\", on); \\\n+} while (0)\n+\n+/* Enable/disable flow director Rx processing in data path. */\n+static inline\n+void ice_fdir_rx_proc_enable(struct ice_adapter *ad, bool on)\n+{\n+\tif (on) {\n+\t\t/* enable flow director processing */\n+\t\tFDIR_PROC_ENABLE_PER_QUEUE(ad, on);\n+\t\tad->fdir_ref_cnt++;\n+\t} else {\n+\t\tif (ad->fdir_ref_cnt >= 1) {\n+\t\t\tad->fdir_ref_cnt--;\n+\n+\t\t\tif (ad->fdir_ref_cnt == 0)\n+\t\t\t\tFDIR_PROC_ENABLE_PER_QUEUE(ad, on);\n+\t\t}\n+\t}\n+}\n+\n #endif /* _ICE_RXTX_H_ */\n",
    "prefixes": [
        "v2",
        "2/5"
    ]
}