{"id":1296579,"url":"http://patchwork.ozlabs.org/api/patches/1296579/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/20200523004049.34832-7-saeedm@mellanox.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/projects/7/?format=json","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":"<20200523004049.34832-7-saeedm@mellanox.com>","list_archive_url":null,"date":"2020-05-23T00:40:42","name":"[net,06/13] net/mlx5e: Fix inner tirs handling","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"7ec4b85e840f62902673e1e24311c11f6b834839","submitter":{"id":65299,"url":"http://patchwork.ozlabs.org/api/people/65299/?format=json","name":"Saeed Mahameed","email":"saeedm@mellanox.com"},"delegate":{"id":34,"url":"http://patchwork.ozlabs.org/api/users/34/?format=json","username":"davem","first_name":"David","last_name":"Miller","email":"davem@davemloft.net"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/20200523004049.34832-7-saeedm@mellanox.com/mbox/","series":[{"id":178808,"url":"http://patchwork.ozlabs.org/api/series/178808/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=178808","date":"2020-05-23T00:40:36","name":"[net,01/13] net/mlx5: Add command entry handling completion","version":1,"mbox":"http://patchwork.ozlabs.org/series/178808/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/1296579/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/1296579/checks/","tags":{},"related":[],"headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming-netdev@ozlabs.org","Delivered-To":"patchwork-incoming-netdev@ozlabs.org","Authentication-Results":["ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=23.128.96.18; helo=vger.kernel.org;\n envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=mellanox.com","ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.a=rsa-sha256\n header.s=selector1 header.b=UZ3YX9WY;\n\tdkim-atps=neutral","davemloft.net; dkim=none (message not signed)\n header.d=none;davemloft.net; dmarc=none action=none header.from=mellanox.com;"],"Received":["from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby ozlabs.org (Postfix) with ESMTP id 49TPkM1fH8z9sRY\n\tfor <patchwork-incoming-netdev@ozlabs.org>;\n Sat, 23 May 2020 10:44:11 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S1731231AbgEWAoJ (ORCPT\n        <rfc822;patchwork-incoming-netdev@ozlabs.org>);\n        Fri, 22 May 2020 20:44:09 -0400","from mail-eopbgr70075.outbound.protection.outlook.com\n ([40.107.7.75]:1415\n        \"EHLO EUR04-HE1-obe.outbound.protection.outlook.com\"\n        rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP\n        id S2387489AbgEWAoJ (ORCPT <rfc822;netdev@vger.kernel.org>);\n        Fri, 22 May 2020 20:44:09 -0400","from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23)\n by VI1PR05MB5391.eurprd05.prod.outlook.com (2603:10a6:803:95::25) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.24; Sat, 23 May\n 2020 00:41:24 +0000","from VI1PR05MB5102.eurprd05.prod.outlook.com\n ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com\n ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3021.026; Sat, 23 May 2020\n 00:41:24 +0000","from smtp.office365.com (73.15.39.150) by\n BYAPR08CA0042.namprd08.prod.outlook.com (2603:10b6:a03:117::19) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend\n Transport; Sat, 23 May 2020 00:41:18 +0000"],"ARC-Seal":"i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=QLx7WMT86W0+UaEYcQUr0QYRxVIloeigu9a8yjaXt2ncMx0//qp+BNEkZWTV6LILuo6yxicyVo6CMbLTLzzqonXkIc/Yj6aksMm23MPlxzjz1NTfnVhj0siZJJ9he8owlfndHgj6qT0TkCQ2SyoLWUT3BbeKWuB/pzg4oufdx8tiabnWM3dqj7hG/+LlK49ePpVsUHGXpzLaP8wEOL/agO43gTN8OpjOqd1Z9rhRc4IMiskJfPAwzytO25w2yP3sChyzOJD9AxW5DALIrB5H8oqKAiqFtZcH6dFzODX6Tvld5pKZkqQoMD68SSHOIwy7PUAZeZiYElNfulCAWhdgKg==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=oz6IXNQVTcqzXnhTpzSD99Yd2zaIQVtHPxCmJQPedxg=;\n b=Kql+qiK2Qk77tVgSE4+t6YRjkCZV4zpNEz0j9krA3niMTaKQCBZDoyiBvZhM4wLi9v/3rLH7w/f9vus970KaEjeA+n6w27r5J/VXLKRqYdh1XBkeCeTJMM4ja8k3FmqjI7TuoNCBFN503IwzLmiKaKhJAfMkYM3At5Gl9Vm4QQWl+E+x61PwLPxKCbAeiXPw/qfcu0HseSuyNaGAfnDaZq+qZu8qD+h5eHI+lN7pRu75x86xpj3WF4I61PMzmH1V3jNwqSRZ0diAmQHR1va78qqU6e5QCloZLYirh+E3RLaW3lhQX/HhI580pH140paJXwQcA4I7BafTbDmeTPMnFQ==","ARC-Authentication-Results":"i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com;\n dkim=pass header.d=mellanox.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=oz6IXNQVTcqzXnhTpzSD99Yd2zaIQVtHPxCmJQPedxg=;\n b=UZ3YX9WYD8Bgegx04+OCe8yrI/AVibgzbazkNDG8Whk6kMVvm0FFkOv0GeTXWdt3qqTrrPYrRgokgjUMlym6oZRFXjkFERJsI+aFTbmB+YJkcHLRhJF5jQyE5KrCdodUZRxUffped4DMehO66knDm4eiJzvp/vjFC19jgpFLkCQ=","From":"Saeed Mahameed <saeedm@mellanox.com>","To":"\"David S. Miller\" <davem@davemloft.net>, kuba@kernel.org","Cc":"netdev@vger.kernel.org, Roi Dayan <roid@mellanox.com>,\n        Vlad Buslov <vladbu@mellanox.com>,\n        Saeed Mahameed <saeedm@mellanox.com>","Subject":"[net 06/13] net/mlx5e: Fix inner tirs handling","Date":"Fri, 22 May 2020 17:40:42 -0700","Message-Id":"<20200523004049.34832-7-saeedm@mellanox.com>","X-Mailer":["git-send-email 2.25.4","git-send-email 2.25.4"],"In-Reply-To":"<20200523004049.34832-1-saeedm@mellanox.com>","References":"<20200523004049.34832-1-saeedm@mellanox.com>","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain","X-ClientProxiedBy":"BYAPR08CA0042.namprd08.prod.outlook.com\n (2603:10b6:a03:117::19) To VI1PR05MB5102.eurprd05.prod.outlook.com\n (2603:10a6:803:5e::23)","MIME-Version":"1.0","X-MS-Exchange-MessageSentRepresentingType":"1","X-Originating-IP":"[73.15.39.150]","X-MS-PublicTrafficType":"Email","X-MS-Office365-Filtering-HT":"Tenant","X-MS-Office365-Filtering-Correlation-Id":"d57b2083-1d81-42b4-15c1-08d7feb202a3","X-MS-TrafficTypeDiagnostic":"VI1PR05MB5391:","X-MS-Exchange-Transport-Forked":"True","X-Microsoft-Antispam-PRVS":"\n <VI1PR05MB5391590B04FCD6DEA5D09277BEB50@VI1PR05MB5391.eurprd05.prod.outlook.com>","X-MS-Oob-TLC-OOBClassifiers":"OLM:172;","X-Forefront-PRVS":"0412A98A59","X-MS-Exchange-SenderADCheck":"1","X-Microsoft-Antispam":"BCL:0;","X-Microsoft-Antispam-Message-Info":"\n 4uIrpLxjZMu4ZvcewA3ERl27XbBHeczoO9dg9OuUN/94J45w03+Tj/EojgpAlY2iamkzP4jg4cpArnW5pBrGsGlXGiQyIx7QcDKT3pLhWLAWNmpk2324sTU1V33I7+Jeb6U3IH6tp2VhCUtWNczJAFY6ib9XYeirvgWziQe01bSb3wHPa2nj/QYpSeYxQKcuK0snBeYJBZ/a6YELG9137YFwn/XR4g5gXk4L8m5PqzvVG2yerdjxHar2svR5zxUAjrTS3XWSdNfECLufsRcYI0+maOrmHgcKbfNrg4AsRK9rMWiQHuu0yqVDD9ezGFgGqJ0b7Zr4U9i8a0A+CiQvFDZoJS2Ygdp9YnIcz19ng0S7slb6g2McD4AQ2L/ahMnT","X-Forefront-Antispam-Report":"\n CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR05MB5102.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(346002)(376002)(366004)(396003)(39860400002)(136003)(1076003)(8676002)(2616005)(956004)(4326008)(52116002)(186003)(26005)(16526019)(478600001)(6666004)(86362001)(6506007)(6512007)(107886003)(36756003)(316002)(5660300002)(8936002)(6486002)(66946007)(54906003)(66476007)(2906002)(66556008)(54420400002);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData":"\n ttc2FubxIP/fWwtK0ZVzkeUvM8Kp+k6XkkhmhFU0ccisaGvm0t2Rvwvzhrboyaqg/eUsU3iledP/f9cSBZIaoutKh5Y41X9SzDkQuEV5IdTXAmnzuIXgvxCbSS5NVOhcZzTE8pGFO1Fws8yFcschzZz8ETL9SwXf/tr3DiXcFzaVm+kiq+lGpp0Tg14K1crLQcRd//HNldJK8+l/5aEtvOeF8zKmiGAqkxGSoFTyloEXJZEiRVeoKE2q/OCTeaf1YbniGQr3FzgtR56v39NkojdhTRhBRA6vkgNptbSs9hUuDVKBmf/zWVrl34MiWyWA5ek7XIv/56FgeekJB/XhKGr6eyshoO+ojystyq51raycao0d3Df6W4BvUCgx7VzsC5nPqjKMdcg79cdF8OFYhsHElFY0/5dPOy07c46ZOkyQaNM2FemHh6PwV2OysA47EHRZpV2EpKyihLqH16uao6eMqCKskTY0FFizJsb7cAg=","X-OriginatorOrg":"Mellanox.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n d57b2083-1d81-42b4-15c1-08d7feb202a3","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"23 May 2020 00:41:20.1098\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"a652971c-7d2e-4d9b-a6a4-d149256f461b","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n W/9CqqNNZeRSoL3wuJDw8AjbHqpw65pI/GH5qePq+Qqle4tLbQC1l6G8fP7C2Jp96gykyfuESPrhichfO5QWHQ==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"VI1PR05MB5391","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"From: Roi Dayan <roid@mellanox.com>\n\nIn the cited commit inner_tirs argument was added to create and destroy\ninner tirs, and no indication was added to mlx5e_modify_tirs_hash()\nfunction. In order to have a consistent handling, use\ninner_indir_tir[0].tirn in tirs destroy/modify function as an indication\nto whether inner tirs are created.\nInner tirs are not created for representors and before this commit,\na call to mlx5e_modify_tirs_hash() was sending HW commands to\nmodify non-existent inner tirs.\n\nFixes: 46dc933cee82 (\"net/mlx5e: Provide explicit directive if to create inner indirect tirs\")\nSigned-off-by: Roi Dayan <roid@mellanox.com>\nReviewed-by: Vlad Buslov <vladbu@mellanox.com>\nSigned-off-by: Saeed Mahameed <saeedm@mellanox.com>\n---\n drivers/net/ethernet/mellanox/mlx5/core/en.h         |  2 +-\n drivers/net/ethernet/mellanox/mlx5/core/en_main.c    | 12 +++++++-----\n drivers/net/ethernet/mellanox/mlx5/core/en_rep.c     |  4 ++--\n .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c    |  4 ++--\n 4 files changed, 12 insertions(+), 10 deletions(-)","diff":"diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h\nindex 23701c0e36ec..59745402747b 100644\n--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h\n+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h\n@@ -1121,7 +1121,7 @@ void mlx5e_close_drop_rq(struct mlx5e_rq *drop_rq);\n int mlx5e_create_indirect_rqt(struct mlx5e_priv *priv);\n \n int mlx5e_create_indirect_tirs(struct mlx5e_priv *priv, bool inner_ttc);\n-void mlx5e_destroy_indirect_tirs(struct mlx5e_priv *priv, bool inner_ttc);\n+void mlx5e_destroy_indirect_tirs(struct mlx5e_priv *priv);\n \n int mlx5e_create_direct_rqts(struct mlx5e_priv *priv, struct mlx5e_tir *tirs);\n void mlx5e_destroy_direct_rqts(struct mlx5e_priv *priv, struct mlx5e_tir *tirs);\ndiff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c\nindex b314adf438da..c6b83042d431 100644\n--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c\n+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c\n@@ -2717,7 +2717,8 @@ void mlx5e_modify_tirs_hash(struct mlx5e_priv *priv, void *in, int inlen)\n \t\tmlx5_core_modify_tir(mdev, priv->indir_tir[tt].tirn, in, inlen);\n \t}\n \n-\tif (!mlx5e_tunnel_inner_ft_supported(priv->mdev))\n+\t/* Verify inner tirs resources allocated */\n+\tif (!priv->inner_indir_tir[0].tirn)\n \t\treturn;\n \n \tfor (tt = 0; tt < MLX5E_NUM_INDIR_TIRS; tt++) {\n@@ -3408,14 +3409,15 @@ int mlx5e_create_direct_tirs(struct mlx5e_priv *priv, struct mlx5e_tir *tirs)\n \treturn err;\n }\n \n-void mlx5e_destroy_indirect_tirs(struct mlx5e_priv *priv, bool inner_ttc)\n+void mlx5e_destroy_indirect_tirs(struct mlx5e_priv *priv)\n {\n \tint i;\n \n \tfor (i = 0; i < MLX5E_NUM_INDIR_TIRS; i++)\n \t\tmlx5e_destroy_tir(priv->mdev, &priv->indir_tir[i]);\n \n-\tif (!inner_ttc || !mlx5e_tunnel_inner_ft_supported(priv->mdev))\n+\t/* Verify inner tirs resources allocated */\n+\tif (!priv->inner_indir_tir[0].tirn)\n \t\treturn;\n \n \tfor (i = 0; i < MLX5E_NUM_INDIR_TIRS; i++)\n@@ -5123,7 +5125,7 @@ static int mlx5e_init_nic_rx(struct mlx5e_priv *priv)\n err_destroy_direct_tirs:\n \tmlx5e_destroy_direct_tirs(priv, priv->direct_tir);\n err_destroy_indirect_tirs:\n-\tmlx5e_destroy_indirect_tirs(priv, true);\n+\tmlx5e_destroy_indirect_tirs(priv);\n err_destroy_direct_rqts:\n \tmlx5e_destroy_direct_rqts(priv, priv->direct_tir);\n err_destroy_indirect_rqts:\n@@ -5142,7 +5144,7 @@ static void mlx5e_cleanup_nic_rx(struct mlx5e_priv *priv)\n \tmlx5e_destroy_direct_tirs(priv, priv->xsk_tir);\n \tmlx5e_destroy_direct_rqts(priv, priv->xsk_tir);\n \tmlx5e_destroy_direct_tirs(priv, priv->direct_tir);\n-\tmlx5e_destroy_indirect_tirs(priv, true);\n+\tmlx5e_destroy_indirect_tirs(priv);\n \tmlx5e_destroy_direct_rqts(priv, priv->direct_tir);\n \tmlx5e_destroy_rqt(priv, &priv->indir_rqt);\n \tmlx5e_close_drop_rq(&priv->drop_rq);\ndiff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c\nindex cdecf4280e86..4a8e0dfdc5f2 100644\n--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c\n+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c\n@@ -1743,7 +1743,7 @@ static int mlx5e_init_rep_rx(struct mlx5e_priv *priv)\n err_destroy_direct_tirs:\n \tmlx5e_destroy_direct_tirs(priv, priv->direct_tir);\n err_destroy_indirect_tirs:\n-\tmlx5e_destroy_indirect_tirs(priv, false);\n+\tmlx5e_destroy_indirect_tirs(priv);\n err_destroy_direct_rqts:\n \tmlx5e_destroy_direct_rqts(priv, priv->direct_tir);\n err_destroy_indirect_rqts:\n@@ -1761,7 +1761,7 @@ static void mlx5e_cleanup_rep_rx(struct mlx5e_priv *priv)\n \tmlx5e_destroy_rep_root_ft(priv);\n \tmlx5e_destroy_ttc_table(priv, &priv->fs.ttc);\n \tmlx5e_destroy_direct_tirs(priv, priv->direct_tir);\n-\tmlx5e_destroy_indirect_tirs(priv, false);\n+\tmlx5e_destroy_indirect_tirs(priv);\n \tmlx5e_destroy_direct_rqts(priv, priv->direct_tir);\n \tmlx5e_destroy_rqt(priv, &priv->indir_rqt);\n \tmlx5e_close_drop_rq(&priv->drop_rq);\ndiff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c\nindex 673aaa815f57..505cf6eeae25 100644\n--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c\n+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c\n@@ -396,7 +396,7 @@ static int mlx5i_init_rx(struct mlx5e_priv *priv)\n err_destroy_direct_tirs:\n \tmlx5e_destroy_direct_tirs(priv, priv->direct_tir);\n err_destroy_indirect_tirs:\n-\tmlx5e_destroy_indirect_tirs(priv, true);\n+\tmlx5e_destroy_indirect_tirs(priv);\n err_destroy_direct_rqts:\n \tmlx5e_destroy_direct_rqts(priv, priv->direct_tir);\n err_destroy_indirect_rqts:\n@@ -412,7 +412,7 @@ static void mlx5i_cleanup_rx(struct mlx5e_priv *priv)\n {\n \tmlx5i_destroy_flow_steering(priv);\n \tmlx5e_destroy_direct_tirs(priv, priv->direct_tir);\n-\tmlx5e_destroy_indirect_tirs(priv, true);\n+\tmlx5e_destroy_indirect_tirs(priv);\n \tmlx5e_destroy_direct_rqts(priv, priv->direct_tir);\n \tmlx5e_destroy_rqt(priv, &priv->indir_rqt);\n \tmlx5e_close_drop_rq(&priv->drop_rq);\n","prefixes":["net","06/13"]}