Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/88005/?format=api
http://patches.dpdk.org/api/patches/88005/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210219100323.102093-1-dapengx.yu@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": "<20210219100323.102093-1-dapengx.yu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210219100323.102093-1-dapengx.yu@intel.com", "date": "2021-02-19T10:03:23", "name": "net/e1000: remove MTU setting limitation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "989ce84130b9aa3b6d5c5e30ca37cd07e259128c", "submitter": { "id": 2042, "url": "http://patches.dpdk.org/api/people/2042/?format=api", "name": "Yu, DapengX", "email": "dapengx.yu@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/20210219100323.102093-1-dapengx.yu@intel.com/mbox/", "series": [ { "id": 15302, "url": "http://patches.dpdk.org/api/series/15302/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15302", "date": "2021-02-19T10:03:23", "name": "net/e1000: remove MTU setting limitation", "version": 1, "mbox": "http://patches.dpdk.org/series/15302/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/88005/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/88005/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 293DCA054A;\n\tFri, 19 Feb 2021 11:03:41 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F095D40395;\n\tFri, 19 Feb 2021 11:03:40 +0100 (CET)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id 9B04340042;\n Fri, 19 Feb 2021 11:03:38 +0100 (CET)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2021 02:03:37 -0800", "from unknown (HELO localhost.localdomain) ([10.240.183.93])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2021 02:03:35 -0800" ], "IronPort-SDR": [ "\n dZLt74N7/l7USqSQBHsLtIRUbaTyNafbFHdb0eQGXUQmtsapPxT/TWopGM4SYzzncZdKu66kiZ\n Jvn1K3d36kLg==", "\n MoaIiHolI09RtaqFXY8wL1+bvRmxks4IHYHGEOeGXLV7NLVwe7qBzLsxhNqdrdf8RvwXnlpn2N\n rgGOioZUEC7A==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9899\"; a=\"181242729\"", "E=Sophos;i=\"5.81,189,1610438400\"; d=\"scan'208\";a=\"181242729\"", "E=Sophos;i=\"5.81,189,1610438400\"; d=\"scan'208\";a=\"400947535\"" ], "From": "dapengx.yu@intel.com", "To": "jia.guo@intel.com,\n\thaiyue.wang@intel.com", "Cc": "dev@dpdk.org,\n\tDapeng Yu <dapengx.yu@intel.com>,\n\tstable@dpdk.org", "Date": "Fri, 19 Feb 2021 18:03:23 +0800", "Message-Id": "<20210219100323.102093-1-dapengx.yu@intel.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] net/e1000: remove MTU setting limitation", "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: Dapeng Yu <dapengx.yu@intel.com>\n\nCurrently, if requested MTU is bigger than mbuf size and scattered\nreceive is not enabled, setting MTU to that value fails.\n\nThis patch allows setting this special MTU when device is stopped,\nbecause scattered_rx will be re-configured during next port start\nand driver may enable scattered receive according new MTU value.\n\nAfter this patch, driver may select different receive function\nautomatically after MTU set, according MTU values selected.\n\nFixes: 59d0ecdbf0e1 (\"ethdev: MTU accessors\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dapeng Yu <dapengx.yu@intel.com>\n---\n drivers/net/e1000/em_ethdev.c | 12 ++++++++----\n drivers/net/e1000/igb_ethdev.c | 12 ++++++++----\n 2 files changed, 16 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c\nindex 9b8c4a7de..3c6f643c1 100644\n--- a/drivers/net/e1000/em_ethdev.c\n+++ b/drivers/net/e1000/em_ethdev.c\n@@ -1805,11 +1805,15 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n \tif (mtu < RTE_ETHER_MIN_MTU || frame_size > dev_info.max_rx_pktlen)\n \t\treturn -EINVAL;\n \n-\t/* refuse mtu that requires the support of scattered packets when this\n-\t * feature has not been enabled before. */\n-\tif (!dev->data->scattered_rx &&\n-\t frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)\n+\t/*\n+\t * If device is started, refuse mtu that requires the support of\n+\t * scattered packets when this feature has not been enabled before.\n+\t */\n+\tif (dev->data->dev_started && !dev->data->scattered_rx &&\n+\t frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) {\n+\t\tPMD_INIT_LOG(ERR, \"Stop port first.\");\n \t\treturn -EINVAL;\n+\t}\n \n \thw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \trctl = E1000_READ_REG(hw, E1000_RCTL);\ndiff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c\nindex 5323504e9..1716d6b90 100644\n--- a/drivers/net/e1000/igb_ethdev.c\n+++ b/drivers/net/e1000/igb_ethdev.c\n@@ -4394,11 +4394,15 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n \t\t\tframe_size > dev_info.max_rx_pktlen)\n \t\treturn -EINVAL;\n \n-\t/* refuse mtu that requires the support of scattered packets when this\n-\t * feature has not been enabled before. */\n-\tif (!dev->data->scattered_rx &&\n-\t frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)\n+\t/*\n+\t * If device is started, refuse mtu that requires the support of\n+\t * scattered packets when this feature has not been enabled before.\n+\t */\n+\tif (dev->data->dev_started && !dev->data->scattered_rx &&\n+\t frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) {\n+\t\tPMD_INIT_LOG(ERR, \"Stop port first.\");\n \t\treturn -EINVAL;\n+\t}\n \n \trctl = E1000_READ_REG(hw, E1000_RCTL);\n \n", "prefixes": [] }{ "id": 88005, "url": "