Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807945/?format=api
{ "id": 807945, "url": "http://patchwork.ozlabs.org/api/patches/807945/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170830222110.15737-3-saeedm@mellanox.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170830222110.15737-3-saeedm@mellanox.com>", "list_archive_url": null, "date": "2017-08-30T22:21:01", "name": "[net,02/11] net/mlx5e: Fix DCB_CAP_ATTR_DCBX capability for DCBNL getcap.", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "f92f00095f308803e7a0c5f98f5b887116f1f1c8", "submitter": { "id": 65299, "url": "http://patchwork.ozlabs.org/api/people/65299/?format=api", "name": "Saeed Mahameed", "email": "saeedm@mellanox.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170830222110.15737-3-saeedm@mellanox.com/mbox/", "series": [ { "id": 707, "url": "http://patchwork.ozlabs.org/api/series/707/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=707", "date": "2017-08-30T22:21:00", "name": "[net,01/11] net/mlx5e: Check for qos capability in dcbnl_initialize", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/707/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807945/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807945/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjKkM6W7yz9s8w\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 08:22:19 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751562AbdH3WWS (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 18:22:18 -0400", "from mail-il-dmz.mellanox.com ([193.47.165.129]:53226 \"EHLO\n\tmellanox.co.il\" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org\n\twith ESMTP id S1751127AbdH3WVc (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 30 Aug 2017 18:21:32 -0400", "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tsaeedm@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 31 Aug 2017 01:21:28 +0300", "from sws.mtl.labs.mlnx (reg-l-vrt-045-015.mtl.labs.mlnx\n\t[10.135.45.15])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v7UMLSAx009018;\n\tThu, 31 Aug 2017 01:21:28 +0300" ], "From": "Saeed Mahameed <saeedm@mellanox.com>", "To": "\"David S. Miller\" <davem@davemloft.net>", "Cc": "netdev@vger.kernel.org, Huy Nguyen <huyn@mellanox.com>,\n\tSaeed Mahameed <saeedm@mellanox.com>", "Subject": "[net 02/11] net/mlx5e: Fix DCB_CAP_ATTR_DCBX capability for DCBNL\n\tgetcap.", "Date": "Thu, 31 Aug 2017 01:21:01 +0300", "Message-Id": "<20170830222110.15737-3-saeedm@mellanox.com>", "X-Mailer": "git-send-email 2.13.0", "In-Reply-To": "<20170830222110.15737-1-saeedm@mellanox.com>", "References": "<20170830222110.15737-1-saeedm@mellanox.com>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Huy Nguyen <huyn@mellanox.com>\n\nCurrent code doesn't report DCB_CAP_DCBX_HOST capability when query\nthrough getcap. User space lldptool expects capability to have HOST mode\nset when it wants to configure DCBX CEE mode. In absence of HOST mode\ncapability, lldptool fails to switch to CEE mode.\n\nThis fix returns DCB_CAP_DCBX_HOST capability when port's DCBX\ncontrolled mode is under software control.\n\nFixes: 3a6a931dfb8e (\"net/mlx5e: Support DCBX CEE API\")\nSigned-off-by: Huy Nguyen <huyn@mellanox.com>\nReviewed-by: Parav Pandit <parav@mellanox.com>\nSigned-off-by: Saeed Mahameed <saeedm@mellanox.com>\n---\n drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 +\n drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 21 ++++++++++++---------\n 2 files changed, 13 insertions(+), 9 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h\nindex 0039b4725405..2f26fb34d741 100644\n--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h\n+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h\n@@ -263,6 +263,7 @@ struct mlx5e_dcbx {\n \n \t/* The only setting that cannot be read from FW */\n \tu8 tc_tsa[IEEE_8021QAZ_MAX_TCS];\n+\tu8 cap;\n };\n #endif\n \ndiff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c\nindex 810b51029c7f..c1d384fca4dc 100644\n--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c\n+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c\n@@ -288,13 +288,8 @@ static int mlx5e_dcbnl_ieee_setpfc(struct net_device *dev,\n static u8 mlx5e_dcbnl_getdcbx(struct net_device *dev)\n {\n \tstruct mlx5e_priv *priv = netdev_priv(dev);\n-\tstruct mlx5e_dcbx *dcbx = &priv->dcbx;\n-\tu8 mode = DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_VER_CEE;\n-\n-\tif (dcbx->mode == MLX5E_DCBX_PARAM_VER_OPER_HOST)\n-\t\tmode |= DCB_CAP_DCBX_HOST;\n \n-\treturn mode;\n+\treturn priv->dcbx.cap;\n }\n \n static u8 mlx5e_dcbnl_setdcbx(struct net_device *dev, u8 mode)\n@@ -312,6 +307,7 @@ static u8 mlx5e_dcbnl_setdcbx(struct net_device *dev, u8 mode)\n \t\t/* set dcbx to fw controlled */\n \t\tif (!mlx5e_dcbnl_set_dcbx_mode(priv, MLX5E_DCBX_PARAM_VER_OPER_AUTO)) {\n \t\t\tdcbx->mode = MLX5E_DCBX_PARAM_VER_OPER_AUTO;\n+\t\t\tdcbx->cap &= ~DCB_CAP_DCBX_HOST;\n \t\t\treturn 0;\n \t\t}\n \n@@ -324,6 +320,8 @@ static u8 mlx5e_dcbnl_setdcbx(struct net_device *dev, u8 mode)\n \tif (mlx5e_dcbnl_switch_to_host_mode(netdev_priv(dev)))\n \t\treturn 1;\n \n+\tdcbx->cap = mode;\n+\n \treturn 0;\n }\n \n@@ -628,9 +626,9 @@ static u8 mlx5e_dcbnl_getcap(struct net_device *netdev,\n \t\t*cap = false;\n \t\tbreak;\n \tcase DCB_CAP_ATTR_DCBX:\n-\t\t*cap = (DCB_CAP_DCBX_LLD_MANAGED |\n-\t\t\tDCB_CAP_DCBX_VER_CEE |\n-\t\t\tDCB_CAP_DCBX_STATIC);\n+\t\t*cap = priv->dcbx.cap |\n+\t\t DCB_CAP_DCBX_VER_CEE |\n+\t\t DCB_CAP_DCBX_VER_IEEE;\n \t\tbreak;\n \tdefault:\n \t\t*cap = 0;\n@@ -760,5 +758,10 @@ void mlx5e_dcbnl_initialize(struct mlx5e_priv *priv)\n \tif (MLX5_CAP_GEN(priv->mdev, dcbx))\n \t\tmlx5e_dcbnl_query_dcbx_mode(priv, &dcbx->mode);\n \n+\tpriv->dcbx.cap = DCB_CAP_DCBX_VER_CEE |\n+\t\t\t DCB_CAP_DCBX_VER_IEEE;\n+\tif (priv->dcbx.mode == MLX5E_DCBX_PARAM_VER_OPER_HOST)\n+\t\tpriv->dcbx.cap |= DCB_CAP_DCBX_HOST;\n+\n \tmlx5e_ets_init(priv);\n }\n", "prefixes": [ "net", "02/11" ] }