Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/86644/?format=api
https://patches.dpdk.org/api/patches/86644/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210115023126.26248-1-alvinx.zhang@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": "<20210115023126.26248-1-alvinx.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210115023126.26248-1-alvinx.zhang@intel.com", "date": "2021-01-15T02:31:26", "name": "[v2] net/ixgbe: fix configuration of max frame size", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d0deb8e4cfbc320f99ba658650e88b32b036db89", "submitter": { "id": 1398, "url": "https://patches.dpdk.org/api/people/1398/?format=api", "name": "Alvin Zhang", "email": "alvinx.zhang@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/20210115023126.26248-1-alvinx.zhang@intel.com/mbox/", "series": [ { "id": 14765, "url": "https://patches.dpdk.org/api/series/14765/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14765", "date": "2021-01-15T02:31:26", "name": "[v2] net/ixgbe: fix configuration of max frame size", "version": 2, "mbox": "https://patches.dpdk.org/series/14765/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/86644/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/86644/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 63D11A0A02;\n\tFri, 15 Jan 2021 03:31:38 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DAF57140E99;\n\tFri, 15 Jan 2021 03:31:37 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 42C0E140E98;\n Fri, 15 Jan 2021 03:31:36 +0100 (CET)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Jan 2021 18:31:34 -0800", "from shwdenpg235.ccr.corp.intel.com ([10.240.182.60])\n by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Jan 2021 18:31:32 -0800" ], "IronPort-SDR": [ "\n vzEmdA+Azk+xbuLVdBWqS43WtvtWlTljeCNS7rLabE/XsjhG6/m+yEGbkr7yGdPN331QCAiWqq\n L8FDcGum4mcA==", "\n +jKwatV3NiglUqE+EGWKjH58LcB3FzvyYCZsCY5ecY7AAgaGePq5uo056X6W3WkimpIOi3qjd4\n HJ9sTUqQSf9Q==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9864\"; a=\"197145179\"", "E=Sophos;i=\"5.79,347,1602572400\"; d=\"scan'208\";a=\"197145179\"", "E=Sophos;i=\"5.79,347,1602572400\"; d=\"scan'208\";a=\"401137659\"" ], "From": "\"Zhang,Alvin\" <alvinx.zhang@intel.com>", "To": "jia.guo@intel.com,\n\thaiyue.wang@intel.com,\n\tWeiX.Xie@intel.com", "Cc": "dev@dpdk.org,\n\tAlvin Zhang <alvinx.zhang@intel.com>,\n\tstable@dpdk.org", "Date": "Fri, 15 Jan 2021 10:31:26 +0800", "Message-Id": "<20210115023126.26248-1-alvinx.zhang@intel.com>", "X-Mailer": "git-send-email 2.21.0.windows.1", "In-Reply-To": "<20210114101427.12344-1-alvinx.zhang@intel.com>", "References": "<20210114101427.12344-1-alvinx.zhang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2] net/ixgbe: fix configuration of max frame size", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Alvin Zhang <alvinx.zhang@intel.com>\n\nFor 82599 NIC, jumbo frame feature is not supported in IOV mode,\nbut if a VF requests to configure the frame size to that not\nbigger than RTE_ETHER_MAX_LEN, the PMD should not return -1.\nThis patch keeps ixgbe PMD's handling mode consistent with kernel\ndriver in above situation.\n\nIn addition, the value set by the command IXGBE_VF_SET_LPE\nrepresents the max frame size, not the mtu.\n\nFixes: 1b9ea09c067b (\"ixgbe: support X550\")\nFixes: 95a27b3ba5f5 (\"net/ixgbe: enable jumbo frame for VF\")\nCc: stable@dpdk.org\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n---\n drivers/net/ixgbe/ixgbe_pf.c | 25 ++++++++++++++-----------\n 1 file changed, 14 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c\nindex 833863a..4cedaa5 100644\n--- a/drivers/net/ixgbe/ixgbe_pf.c\n+++ b/drivers/net/ixgbe/ixgbe_pf.c\n@@ -555,27 +555,30 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)\n ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *msgbuf)\n {\n \tstruct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n-\tuint32_t new_mtu = msgbuf[1];\n-\tuint32_t max_frs;\n+\tuint32_t max_frame = msgbuf[1];\n+\tuint32_t cur_frame_size;\n \tuint32_t hlreg0;\n-\tint max_frame = new_mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;\n \n \t/* X540 and X550 support jumbo frames in IOV mode */\n \tif (hw->mac.type != ixgbe_mac_X540 &&\n \t\thw->mac.type != ixgbe_mac_X550 &&\n \t\thw->mac.type != ixgbe_mac_X550EM_x &&\n-\t\thw->mac.type != ixgbe_mac_X550EM_a)\n-\t\treturn -1;\n+\t\thw->mac.type != ixgbe_mac_X550EM_a) {\n+\t\tif (max_frame > dev->data->dev_conf.rxmode.max_rx_pkt_len)\n+\t\t\treturn -1;\n+\n+\t\treturn 0;\n+\t}\n \n \tif (max_frame < RTE_ETHER_MIN_LEN ||\n \t\t\tmax_frame > RTE_ETHER_MAX_JUMBO_FRAME_LEN)\n \t\treturn -1;\n \n-\tmax_frs = (IXGBE_READ_REG(hw, IXGBE_MAXFRS) &\n-\t\t IXGBE_MHADD_MFS_MASK) >> IXGBE_MHADD_MFS_SHIFT;\n-\tif (max_frs < new_mtu) {\n+\tcur_frame_size = (IXGBE_READ_REG(hw, IXGBE_MAXFRS) &\n+\t\t\t IXGBE_MHADD_MFS_MASK) >> IXGBE_MHADD_MFS_SHIFT;\n+\tif (cur_frame_size < max_frame) {\n \t\thlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);\n-\t\tif (new_mtu > RTE_ETHER_MAX_LEN) {\n+\t\tif (max_frame > RTE_ETHER_MAX_LEN) {\n \t\t\tdev->data->dev_conf.rxmode.offloads |=\n \t\t\t\tDEV_RX_OFFLOAD_JUMBO_FRAME;\n \t\t\thlreg0 |= IXGBE_HLREG0_JUMBOEN;\n@@ -586,8 +589,8 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)\n \t\t}\n \t\tIXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);\n \n-\t\tmax_frs = new_mtu << IXGBE_MHADD_MFS_SHIFT;\n-\t\tIXGBE_WRITE_REG(hw, IXGBE_MAXFRS, max_frs);\n+\t\tIXGBE_WRITE_REG(hw, IXGBE_MAXFRS,\n+\t\t\t\tmax_frame << IXGBE_MHADD_MFS_SHIFT);\n \t}\n \n \treturn 0;\n", "prefixes": [ "v2" ] }{ "id": 86644, "url": "