get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64484,
    "url": "http://patches.dpdk.org/api/patches/64484/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200113023949.26718-21-xiaolong.ye@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": "<20200113023949.26718-21-xiaolong.ye@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200113023949.26718-21-xiaolong.ye@intel.com",
    "date": "2020-01-13T02:39:32",
    "name": "[v4,20/36] net/i40e/base: add drop mode parameter to set MAC config",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8cd43fcaf66fdf21240d14ce142549a5ff495f66",
    "submitter": {
        "id": 1120,
        "url": "http://patches.dpdk.org/api/people/1120/?format=api",
        "name": "Xiaolong Ye",
        "email": "xiaolong.ye@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "http://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200113023949.26718-21-xiaolong.ye@intel.com/mbox/",
    "series": [
        {
            "id": 8064,
            "url": "http://patches.dpdk.org/api/series/8064/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8064",
            "date": "2020-01-13T02:39:12",
            "name": "update for i40e base code",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/8064/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64484/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64484/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 CC9C5A04F0;\n\tMon, 13 Jan 2020 03:50:06 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7C7D61D605;\n\tMon, 13 Jan 2020 03:47:54 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id BAA691D5B8\n for <dev@dpdk.org>; Mon, 13 Jan 2020 03:47:27 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 12 Jan 2020 18:47:27 -0800",
            "from dpdk_yexl_af_xdp.sh.intel.com ([10.67.119.206])\n by FMSMGA003.fm.intel.com with ESMTP; 12 Jan 2020 18:47:26 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.69,427,1571727600\"; d=\"scan'208\";a=\"272916379\"",
        "From": "Xiaolong Ye <xiaolong.ye@intel.com>",
        "To": "Beilei Xing <beilei.xing@intel.com>,\n\tQi Zhang <qi.z.zhang@intel.com>",
        "Cc": "dev@dpdk.org, Xiaolong Ye <xiaolong.ye@intel.com>,\n Wnuczko Sylwia <sylwia.wnuczko@intel.com>",
        "Date": "Mon, 13 Jan 2020 10:39:32 +0800",
        "Message-Id": "<20200113023949.26718-21-xiaolong.ye@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200113023949.26718-1-xiaolong.ye@intel.com>",
        "References": "<20191202074935.97629-1-xiaolong.ye@intel.com>\n <20200113023949.26718-1-xiaolong.ye@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 20/36] net/i40e/base: add drop mode parameter\n\tto set MAC config",
        "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": "This patch adds \"drop mode\" parameter to set mac config AQ command.\nThis bit controls the behavior when a no-drop packet is blocking a TC\nqueue.\n0 – The PF driver is notified.\n1 – The blocking packet is dropped and then the PF driver is notified.\n\nSigned-off-by: Wnuczko Sylwia <sylwia.wnuczko@intel.com>\nSigned-off-by: Xiaolong Ye <xiaolong.ye@intel.com>\n---\n drivers/net/i40e/base/i40e_adminq.c     |  4 +++-\n drivers/net/i40e/base/i40e_adminq_cmd.h | 29 +++++++++++++------------\n drivers/net/i40e/base/i40e_common.c     | 11 ++++++++++\n drivers/net/i40e/base/i40e_prototype.h  |  1 +\n drivers/net/i40e/base/i40e_type.h       |  1 +\n drivers/net/i40e/i40e_ethdev.c          |  2 +-\n 6 files changed, 32 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c\nindex 96e170e12..0676f9a25 100644\n--- a/drivers/net/i40e/base/i40e_adminq.c\n+++ b/drivers/net/i40e/base/i40e_adminq.c\n@@ -611,8 +611,10 @@ STATIC void i40e_set_hw_flags(struct i40e_hw *hw)\n \n \tif (aq->api_maj_ver > 1 ||\n \t    (aq->api_maj_ver == 1 &&\n-\t     aq->api_min_ver >= 8))\n+\t     aq->api_min_ver >= 8)) {\n \t\thw->flags |= I40E_HW_FLAG_FW_LLDP_PERSISTENT;\n+\t\thw->flags |= I40E_HW_FLAG_DROP_MODE;\n+\t}\n \n \tif (aq->api_maj_ver > 1 ||\n \t    (aq->api_maj_ver == 1 &&\ndiff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h\nindex 7181e0f58..f6c9d3e1a 100644\n--- a/drivers/net/i40e/base/i40e_adminq_cmd.h\n+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h\n@@ -2098,20 +2098,21 @@ I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config);\n struct i40e_aq_set_mac_config {\n \t__le16\tmax_frame_size;\n \tu8\tparams;\n-#define I40E_AQ_SET_MAC_CONFIG_CRC_EN\t\t0x04\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_MASK\t0x78\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_SHIFT\t3\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_NONE\t0x0\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_1B_13TX\t0xF\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_9TX\t0x9\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_4TX\t0x8\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_7TX\t0x7\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_2DW_3TX\t0x6\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_1TX\t0x5\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_2TX\t0x4\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_7DW_3TX\t0x3\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_4DW_1TX\t0x2\n-#define I40E_AQ_SET_MAC_CONFIG_PACING_9DW_1TX\t0x1\n+#define I40E_AQ_SET_MAC_CONFIG_CRC_EN\t\t\t0x04\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_MASK\t\t0x78\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_SHIFT\t\t3\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_NONE\t\t0x0\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_1B_13TX\t\t0xF\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_9TX\t\t0x9\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_4TX\t\t0x8\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_7TX\t\t0x7\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_2DW_3TX\t\t0x6\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_1TX\t\t0x5\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_2TX\t\t0x4\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_7DW_3TX\t\t0x3\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_4DW_1TX\t\t0x2\n+#define I40E_AQ_SET_MAC_CONFIG_PACING_9DW_1TX\t\t0x1\n+#define I40E_AQ_SET_MAC_CONFIG_DROP_BLOCKING_PACKET_EN\t0x80\n \tu8\ttx_timer_priority; /* bitmap */\n \t__le16\ttx_timer_value;\n \t__le16\tfc_refresh_threshold;\ndiff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c\nindex ee081d6ad..eddc91e36 100644\n--- a/drivers/net/i40e/base/i40e_common.c\n+++ b/drivers/net/i40e/base/i40e_common.c\n@@ -1873,6 +1873,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,\n  * @max_frame_size: Maximum Frame Size to be supported by the port\n  * @crc_en: Tell HW to append a CRC to outgoing frames\n  * @pacing: Pacing configurations\n+ * @auto_drop_blocking_packets: Tell HW to drop packets if TC queue is blocked\n  * @cmd_details: pointer to command details structure or NULL\n  *\n  * Configure MAC settings for frame size, jumbo frame support and the\n@@ -1881,6 +1882,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,\n enum i40e_status_code i40e_aq_set_mac_config(struct i40e_hw *hw,\n \t\t\t\tu16 max_frame_size,\n \t\t\t\tbool crc_en, u16 pacing,\n+\t\t\t\tbool auto_drop_blocking_packets,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details)\n {\n \tstruct i40e_aq_desc desc;\n@@ -1899,6 +1901,15 @@ enum i40e_status_code i40e_aq_set_mac_config(struct i40e_hw *hw,\n \tif (crc_en)\n \t\tcmd->params |= I40E_AQ_SET_MAC_CONFIG_CRC_EN;\n \n+\tif (auto_drop_blocking_packets) {\n+\t\tif (hw->flags & I40E_HW_FLAG_DROP_MODE)\n+\t\t\tcmd->params |=\n+\t\t\t\tI40E_AQ_SET_MAC_CONFIG_DROP_BLOCKING_PACKET_EN;\n+\t\telse\n+\t\t\ti40e_debug(hw, I40E_DEBUG_ALL,\n+\t\t\t\t   \"This FW api version does not support drop mode.\\n\");\n+\t}\n+\n #define I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD\t0x7FFF\n \tcmd->fc_refresh_threshold =\n \t\tCPU_TO_LE16(I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD);\ndiff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h\nindex fcfe497f1..43db2a6f3 100644\n--- a/drivers/net/i40e/base/i40e_prototype.h\n+++ b/drivers/net/i40e/base/i40e_prototype.h\n@@ -114,6 +114,7 @@ enum i40e_status_code i40e_aq_set_phy_int_mask(struct i40e_hw *hw, u16 mask,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n enum i40e_status_code i40e_aq_set_mac_config(struct i40e_hw *hw,\n \t\t\t\tu16 max_frame_size, bool crc_en, u16 pacing,\n+\t\t\t\tbool auto_drop_blocking_packets,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n enum i40e_status_code i40e_aq_get_local_advt_reg(struct i40e_hw *hw,\n \t\t\t\tu64 *advt_reg,\ndiff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h\nindex b380193f7..d20b0fe20 100644\n--- a/drivers/net/i40e/base/i40e_type.h\n+++ b/drivers/net/i40e/base/i40e_type.h\n@@ -744,6 +744,7 @@ struct i40e_hw {\n #define I40E_HW_FLAG_FW_LLDP_STOPPABLE\t    BIT_ULL(4)\n #define I40E_HW_FLAG_FW_LLDP_PERSISTENT     BIT_ULL(5)\n #define I40E_HW_FLAG_AQ_PHY_ACCESS_EXTENDED BIT_ULL(6)\n+#define I40E_HW_FLAG_DROP_MODE\t\t    BIT_ULL(7)\n \tu64 flags;\n \n \t/* Used in set switch config AQ command */\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 81ed847d7..3c60856b3 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -1649,7 +1649,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)\n \t/* Set the max frame size to 0x2600 by default,\n \t * in case other drivers changed the default value.\n \t */\n-\ti40e_aq_set_mac_config(hw, I40E_FRAME_SIZE_MAX, TRUE, 0, NULL);\n+\ti40e_aq_set_mac_config(hw, I40E_FRAME_SIZE_MAX, TRUE, false, 0, NULL);\n \n \t/* initialize mirror rule list */\n \tTAILQ_INIT(&pf->mirror_list);\n",
    "prefixes": [
        "v4",
        "20/36"
    ]
}