Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/75978/?format=api
http://patches.dpdk.org/api/patches/75978/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200826075501.50052-6-guinanx.sun@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": "<20200826075501.50052-6-guinanx.sun@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200826075501.50052-6-guinanx.sun@intel.com", "date": "2020-08-26T07:54:59", "name": "[5/7] net/ice: add flow director enabled switch value", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "53dcba2dacb822940b132fb8c5c00dba875205ba", "submitter": { "id": 1476, "url": "http://patches.dpdk.org/api/people/1476/?format=api", "name": "Guinan Sun", "email": "guinanx.sun@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/20200826075501.50052-6-guinanx.sun@intel.com/mbox/", "series": [ { "id": 11796, "url": "http://patches.dpdk.org/api/series/11796/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11796", "date": "2020-08-26T07:54:54", "name": "support RXDID22 and FDID22", "version": 1, "mbox": "http://patches.dpdk.org/series/11796/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/75978/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/75978/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 59A0FA04B1;\n\tWed, 26 Aug 2020 10:14:17 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 00B261C0DC;\n\tWed, 26 Aug 2020 10:13:39 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by dpdk.org (Postfix) with ESMTP id CD47E1C0D4\n for <dev@dpdk.org>; Wed, 26 Aug 2020 10:13:36 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Aug 2020 01:13:36 -0700", "from dpdk.sh.intel.com ([10.239.255.12])\n by orsmga002.jf.intel.com with ESMTP; 26 Aug 2020 01:13:34 -0700" ], "IronPort-SDR": [ "\n cTUNAKo3SARzrc+8XnvBUtpOiQG1Td/Ti7tdlhLQvSNLU7s+Vs9Xn1Tljlt4D/IZ5M2Sbw/AE9\n 4WgCgc2l+tiA==", "\n E9YsSckOM9zMASu0hTK/uwudQsp6RyZJModim6DoqCZlYyMhNodtsYNSfD78FlmEOiAlG+kqPk\n US5TsMJVzthg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9724\"; a=\"155512888\"", "E=Sophos;i=\"5.76,354,1592895600\"; d=\"scan'208\";a=\"155512888\"", "E=Sophos;i=\"5.76,354,1592895600\"; d=\"scan'208\";a=\"312816207\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Guinan Sun <guinanx.sun@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": "Wed, 26 Aug 2020 07:54:59 +0000", "Message-Id": "<20200826075501.50052-6-guinanx.sun@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200826075501.50052-1-guinanx.sun@intel.com>", "References": "<20200826075501.50052-1-guinanx.sun@intel.com>", "Subject": "[dpdk-dev] [PATCH 5/7] 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": "The 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 fb2d994ab..d441350e0 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@@ -463,6 +464,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": [ "5/7" ] }{ "id": 75978, "url": "