Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/118883/?format=api
http://patchwork.dpdk.org/api/patches/118883/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221021051821.2164939-12-junfeng.guo@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20221021051821.2164939-12-junfeng.guo@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20221021051821.2164939-12-junfeng.guo@intel.com", "date": "2022-10-21T05:18:18", "name": "[v9,11/14] net/idpf: add support for MTU configuration", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "587809f31b8662a29bf7e2e2d670965da7583a5b", "submitter": { "id": 1785, "url": "http://patchwork.dpdk.org/api/people/1785/?format=api", "name": "Junfeng Guo", "email": "junfeng.guo@intel.com" }, "delegate": { "id": 3961, "url": "http://patchwork.dpdk.org/api/users/3961/?format=api", "username": "arybchenko", "first_name": "Andrew", "last_name": "Rybchenko", "email": "andrew.rybchenko@oktetlabs.ru" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20221021051821.2164939-12-junfeng.guo@intel.com/mbox/", "series": [ { "id": 25359, "url": "http://patchwork.dpdk.org/api/series/25359/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=25359", "date": "2022-10-21T05:18:07", "name": "add support for idpf PMD in DPDK", "version": 9, "mbox": "http://patchwork.dpdk.org/series/25359/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/118883/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/118883/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 6A035A0552;\n\tFri, 21 Oct 2022 07:21:21 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6D8F942BF0;\n\tFri, 21 Oct 2022 07:20:17 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id F2BBC42BE5\n for <dev@dpdk.org>; Fri, 21 Oct 2022 07:20:12 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Oct 2022 22:20:12 -0700", "from dpdk-jf-ntb-one.sh.intel.com ([10.67.111.104])\n by fmsmga001.fm.intel.com with ESMTP; 20 Oct 2022 22:20:10 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1666329613; x=1697865613;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=pS16UMCO+mQqL3FaOqqBhs3C1G0XhlnDcwaPZzXeqfY=;\n b=bEKHLayGNNvKVTcK3ryjL4uRkZB2mtpAqLMkLicgdrTrmDWAFuA25bxC\n UZxCtUKJSQssLaS8Vv/iX5ufOKRNoWE2jtXaM/5EwBQyPTu52Jih+UUvS\n 1zGWu+Sg1qLq7oRGKI44JBR1d8t4e4qqRwm1BDdlfn9uY4BxJxmnxrLNe\n HYYhNqE9jT1XKYVloydPmjRe+/94aveQ9WAsgYBL6T+R0nf2S5WyhZyz3\n rkaQv9JSS+AH+AIm8CCnDlP/xnOgSPTlcJDjmbOdnYE3bfXrb6NW3nu8g\n LjJlqwEUaHreQ24TQID901hNFbLkdTRWiecL34j21SFx058GzCduVp1jF A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10506\"; a=\"371128611\"", "E=Sophos;i=\"5.95,200,1661842800\"; d=\"scan'208\";a=\"371128611\"", "E=McAfee;i=\"6500,9779,10506\"; a=\"772826449\"", "E=Sophos;i=\"5.95,200,1661842800\"; d=\"scan'208\";a=\"772826449\"" ], "X-ExtLoop1": "1", "From": "Junfeng Guo <junfeng.guo@intel.com>", "To": "andrew.rybchenko@oktetlabs.ru, qi.z.zhang@intel.com,\n jingjing.wu@intel.com,\n beilei.xing@intel.com", "Cc": "dev@dpdk.org,\n\tJunfeng Guo <junfeng.guo@intel.com>", "Subject": "[PATCH v9 11/14] net/idpf: add support for MTU configuration", "Date": "Fri, 21 Oct 2022 13:18:18 +0800", "Message-Id": "<20221021051821.2164939-12-junfeng.guo@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20221021051821.2164939-1-junfeng.guo@intel.com>", "References": "<20221020062951.645121-2-junfeng.guo@intel.com>\n <20221021051821.2164939-1-junfeng.guo@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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" }, "content": "Add dev ops mtu_set.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n doc/guides/nics/features/idpf.ini | 1 +\n drivers/net/idpf/idpf_ethdev.c | 24 ++++++++++++++++++++++++\n 2 files changed, 25 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/idpf.ini b/doc/guides/nics/features/idpf.ini\nindex 36dec39b9f..ee3f6e7c6f 100644\n--- a/doc/guides/nics/features/idpf.ini\n+++ b/doc/guides/nics/features/idpf.ini\n@@ -10,6 +10,7 @@\n Queue start/stop = Y\n Runtime Rx queue setup = Y\n Runtime Tx queue setup = Y\n+MTU update = Y\n TSO = P\n L3 checksum offload = P\n L4 checksum offload = P\ndiff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c\nindex cc1cfe402b..803c0d7e12 100644\n--- a/drivers/net/idpf/idpf_ethdev.c\n+++ b/drivers/net/idpf/idpf_ethdev.c\n@@ -32,6 +32,7 @@ static int idpf_dev_stop(struct rte_eth_dev *dev);\n static int idpf_dev_close(struct rte_eth_dev *dev);\n static int idpf_dev_info_get(struct rte_eth_dev *dev,\n \t\t\t struct rte_eth_dev_info *dev_info);\n+static int idpf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);\n static void idpf_adapter_rel(struct idpf_adapter *adapter);\n \n int\n@@ -70,6 +71,7 @@ static const struct eth_dev_ops idpf_eth_dev_ops = {\n \t.tx_queue_release\t\t= idpf_dev_tx_queue_release,\n \t.dev_infos_get\t\t\t= idpf_dev_info_get,\n \t.link_update\t\t\t= idpf_dev_link_update,\n+\t.mtu_set\t\t\t= idpf_dev_mtu_set,\n };\n \n static int\n@@ -83,6 +85,9 @@ idpf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \tdev_info->min_rx_bufsize = IDPF_MIN_BUF_SIZE;\n \tdev_info->max_rx_pktlen = IDPF_MAX_FRAME_SIZE;\n \n+\tdev_info->max_mtu = dev_info->max_rx_pktlen - IDPF_ETH_OVERHEAD;\n+\tdev_info->min_mtu = RTE_ETHER_MIN_MTU;\n+\n \tdev_info->flow_type_rss_offloads = IDPF_RSS_OFFLOAD_ALL;\n \tdev_info->max_mac_addrs = IDPF_NUM_MACADDR_MAX;\n \tdev_info->dev_capa = RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |\n@@ -131,6 +136,18 @@ idpf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \treturn 0;\n }\n \n+static int\n+idpf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu __rte_unused)\n+{\n+\t/* mtu setting is forbidden if port is start */\n+\tif (dev->data->dev_started) {\n+\t\tPMD_DRV_LOG(ERR, \"port must be stopped before configuration\");\n+\t\treturn -EBUSY;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int\n idpf_init_vport_req_info(struct rte_eth_dev *dev)\n {\n@@ -429,6 +446,13 @@ idpf_dev_start(struct rte_eth_dev *dev)\n \n \tvport->stopped = 0;\n \n+\tif (dev->data->mtu > vport->max_mtu) {\n+\t\tPMD_DRV_LOG(ERR, \"MTU should be less than %d\", vport->max_mtu);\n+\t\tgoto err_mtu;\n+\t}\n+\n+\tvport->max_pkt_len = dev->data->mtu + IDPF_ETH_OVERHEAD;\n+\n \tif (idpf_start_queues(dev)) {\n \t\tPMD_DRV_LOG(ERR, \"Failed to start queues\");\n \t\tgoto err_mtu;\n", "prefixes": [ "v9", "11/14" ] }{ "id": 118883, "url": "