Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/57598/?format=api
https://patches.dpdk.org/api/patches/57598/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1565280090-344032-1-git-send-email-andy.pei@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": "<1565280090-344032-1-git-send-email-andy.pei@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1565280090-344032-1-git-send-email-andy.pei@intel.com", "date": "2019-08-08T16:01:30", "name": "[v2] net/ipn3ke: setup MTU when HW init", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3b1a3fefe71cf9589cb64ab5d2ac242efa22b4b0", "submitter": { "id": 1185, "url": "https://patches.dpdk.org/api/people/1185/?format=api", "name": "Pei, Andy", "email": "andy.pei@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/1565280090-344032-1-git-send-email-andy.pei@intel.com/mbox/", "series": [ { "id": 5997, "url": "https://patches.dpdk.org/api/series/5997/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5997", "date": "2019-08-08T16:01:30", "name": "[v2] net/ipn3ke: setup MTU when HW init", "version": 2, "mbox": "https://patches.dpdk.org/series/5997/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/57598/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/57598/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CC73D1BE8A;\n\tThu, 8 Aug 2019 18:10:46 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 413C41BE7D\n\tfor <dev@dpdk.org>; Thu, 8 Aug 2019 18:10:44 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Aug 2019 09:10:43 -0700", "from dpdk-dipei.sh.intel.com ([10.67.110.224])\n\tby orsmga001.jf.intel.com with ESMTP; 08 Aug 2019 09:10:41 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.64,362,1559545200\"; d=\"scan'208\";a=\"258757402\"", "From": "Andy Pei <andy.pei@intel.com>", "To": "dev@dpdk.org", "Cc": "rosen.xu@intel.com,\n\ttianfei.zhang@intel.com", "Date": "Fri, 9 Aug 2019 00:01:30 +0800", "Message-Id": "<1565280090-344032-1-git-send-email-andy.pei@intel.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1565255540-308917-1-git-send-email-andy.pei@intel.com>", "References": "<1565255540-308917-1-git-send-email-andy.pei@intel.com>", "Subject": "[dpdk-dev] [PATCH v2] net/ipn3ke: setup MTU when HW init", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "set up mtu to the minimun in tx mtu, rx mtu and IPN3KE_MAC_FRAME_SIZE_MAX.\n\nSigned-off-by: Andy Pei <andy.pei@intel.com>\n---\nv2:\n* modify low bound and upper bound.\n\n drivers/net/ipn3ke/ipn3ke_ethdev.c | 97 ++++++++++++++++++++++++++++++++++++++\n drivers/net/ipn3ke/ipn3ke_ethdev.h | 19 ++++++++\n 2 files changed, 116 insertions(+)", "diff": "diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c\nindex c226d63..1a6c217 100644\n--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c\n+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c\n@@ -209,6 +209,100 @@\n \treturn 0;\n }\n \n+static void ipn3ke_10G_mtu_setup\n+(struct ipn3ke_hw *hw, uint32_t mac_num, uint32_t eth_group_sel)\n+{\n+\tuint32_t tx;\n+\tuint32_t rx;\n+\tuint32_t tmp;\n+\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tx,\n+\t\t\tIPN3KE_10G_TX_FRAME_MAXLENGTH,\n+\t\t\tmac_num,\n+\t\t\teth_group_sel);\n+\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&rx,\n+\t\t\tIPN3KE_10G_RX_FRAME_MAXLENGTH,\n+\t\t\tmac_num,\n+\t\t\teth_group_sel);\n+\n+\ttmp = (tx > rx) ? rx : tx;\n+\tif (tmp < RTE_ETHER_MIN_MTU)\n+\t\ttmp = RTE_ETHER_MIN_MTU;\n+\tif (tmp > IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD)\n+\t\ttmp = IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD;\n+\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_10G_TX_FRAME_MAXLENGTH,\n+\t\t\tmac_num,\n+\t\t\teth_group_sel);\n+\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_10G_RX_FRAME_MAXLENGTH,\n+\t\t\tmac_num,\n+\t\t\teth_group_sel);\n+}\n+\n+static void ipn3ke_25G_mtu_setup\n+(struct ipn3ke_hw *hw, uint32_t mac_num, uint32_t eth_group_sel)\n+{\n+\tuint32_t tx;\n+\tuint32_t rx;\n+\tuint32_t tmp;\n+\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tx,\n+\t\t\tIPN3KE_25G_MAX_TX_SIZE_CONFIG,\n+\t\t\tmac_num,\n+\t\t\teth_group_sel);\n+\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&rx,\n+\t\t\tIPN3KE_25G_MAX_RX_SIZE_CONFIG,\n+\t\t\tmac_num,\n+\t\t\teth_group_sel);\n+\n+\ttmp = (tx > rx) ? rx : tx;\n+\tif (tmp < RTE_ETHER_MIN_MTU)\n+\t\ttmp = RTE_ETHER_MIN_MTU;\n+\tif (tmp > IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD)\n+\t\ttmp = IPN3KE_MAC_FRAME_SIZE_MAX - IPN3KE_ETH_OVERHEAD;\n+\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_MAX_TX_SIZE_CONFIG,\n+\t\t\tmac_num,\n+\t\t\teth_group_sel);\n+\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_MAX_RX_SIZE_CONFIG,\n+\t\t\tmac_num,\n+\t\t\teth_group_sel);\n+}\n+\n+static void\n+ipn3ke_mtu_setup(struct ipn3ke_hw *hw)\n+{\n+\tint i;\n+\tif (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) {\n+\t\tfor (i = 0; i < hw->port_num; i++) {\n+\t\t\tipn3ke_10G_mtu_setup(hw, i, 0);\n+\t\t\tipn3ke_10G_mtu_setup(hw, i, 1);\n+\t\t}\n+\t} else if (hw->retimer.mac_type ==\n+\t\t\tIFPGA_RAWDEV_RETIMER_MAC_TYPE_25GE_25GAUI) {\n+\t\tfor (i = 0; i < hw->port_num; i++) {\n+\t\t\tipn3ke_25G_mtu_setup(hw, i, 0);\n+\t\t\tipn3ke_25G_mtu_setup(hw, i, 1);\n+\t\t}\n+\t}\n+}\n+\n static int\n ipn3ke_hw_init(struct rte_afu_device *afu_dev,\n \tstruct ipn3ke_hw *hw)\n@@ -303,6 +397,9 @@\n \t\t}\n \t}\n \n+\t/* init mtu */\n+\tipn3ke_mtu_setup(hw);\n+\n \tret = rte_eth_switch_domain_alloc(&hw->switch_domain_id);\n \tif (ret)\n \t\tIPN3KE_AFU_PMD_WARN(\"failed to allocate switch domain for device %d\",\ndiff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h\nindex c7b336b..6419da3 100644\n--- a/drivers/net/ipn3ke/ipn3ke_ethdev.h\n+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h\n@@ -654,6 +654,25 @@ static inline void _ipn3ke_indrct_write(struct ipn3ke_hw *hw,\n #define IPN3KE_MAC_RX_FRAME_MAXLENGTH_MASK \\\n \tIPN3KE_MASK(0xFFFF, IPN3KE_MAC_RX_FRAME_MAXLENGTH_SHIFT)\n \n+/* Additional Feature Register */\n+#define ADD_PHY_CTRL\t\t0x0\n+#define PHY_RESET\t\tBIT(0)\n+/* registers for 25G/40G mac */\n+#define MAC_CONFIG\t0x310\n+#define MAC_RESET_MASK\tGENMASK(2, 0)\n+\n+#define IPN3KE_MAX_MTU 0xffff\n+\n+#define IPN3KE_25G_PHY_PMA_SLOOP 0x313\n+#define IPN3KE_25G_TX_FLOW_CTRL 0x640\n+#define IPN3KE_25G_MAX_TX_SIZE_CONFIG 0x407\n+#define IPN3KE_25G_MAX_RX_SIZE_CONFIG 0x506\n+\n+#define IPN3KE_10G_TX_PAUSE_FRAME_QUANTA 0x0042\n+#define IPN3KE_10G_TX_PAUSE_FRAME_HOLDOFF 0x0043\n+#define IPN3KE_10G_TX_FRAME_MAXLENGTH 0x002C\n+#define IPN3KE_10G_RX_FRAME_MAXLENGTH 0x00AE\n+\n #define IPN3KE_REGISTER_WIDTH 32\n \n /*Bits[2:0]: Configuration of TX statistics counters:\n", "prefixes": [ "v2" ] }{ "id": 57598, "url": "