Received: by 10.213.65.68 with SMTP id h4csp254482imn; Fri, 30 Mar 2018 05:02:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx483EZu8PEEarNx9n8t4JZO9JxFC1FAi1TaFIWe1gZ+AcC/Hh2+JZIppJPXFj3FsDRnHmwDp X-Received: by 2002:a17:902:64cf:: with SMTP id y15-v6mr12912245pli.49.1522411366271; Fri, 30 Mar 2018 05:02:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522411366; cv=none; d=google.com; s=arc-20160816; b=075viic2rTo03CDw9fLr/JpM3q66ueGI4zA1O0K2WHW4bXRDpVYyQO/xHC6dx5T1Dx aYiMlPoLDbp0jr/XRhs2kp6VuQcaIePOW7IvFDNjpL9nhrUPuvGAJPRNOMLN8nLhdD2/ fxz1u9BdcOlWEQNhaItFwdaUCpTYtslAEj7j+LM+fzNuwPBo+PZgdOAY/Ybt4LJ5dbOL D9lPAWCcYBmOOYj02o9Nbds6IWAz/OMtUAqKc8INYErfwHVEgNLun7XokFLOq2zC3Qde a7WZNUepY6OsadhAVFObXhg6tMq68NkHRNhJ1h0IXVO5GY1u+dbCZXe0ts45DlKNVXW/ h+XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Z0UOXKIMYzcWhfOq8GNUKv7mGom2ErrI15iSzgQ2Dx8=; b=dX18jbpvE9HEoCdAhsqgjCsMqidNi52LfEEkINWMuNNJV4A5h9JtXMS66MYFMWP9E4 VWH8UiCFPESHqCNt1UnSe6NlPMtXsTWZl0BI99gQkCuGmb3NhuSrOIh3BVvP1MQ0F/iA 5Uu0WNTTfizNP9VWjM7MjXO/60xpdwyv/Zu45xrzwvFVMtZ+U39hb9sZcnvFPokZWfSt UcFa3LBuPnGe3bcTLXMMZJKezNApfK+lpdcUFv55LgHy8AoX8w0oom+YKLIUqqkd423l V8Tzo7d10pqz3ARvFt/LmIvZahkiKZSxvsxymxoE6PN2H7wJPv4qZSTwtlyXDlaaIPrK LziQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=M4xb0SpA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3-v6si8242110plc.329.2018.03.30.05.02.18; Fri, 30 Mar 2018 05:02:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=M4xb0SpA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752652AbeC3MAk (ORCPT + 99 others); Fri, 30 Mar 2018 08:00:40 -0400 Received: from mail-sn1nam02on0086.outbound.protection.outlook.com ([104.47.36.86]:55618 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752455AbeC3MAf (ORCPT ); Fri, 30 Mar 2018 08:00:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Z0UOXKIMYzcWhfOq8GNUKv7mGom2ErrI15iSzgQ2Dx8=; b=M4xb0SpAfyr7GEMJXUiLKQtW+ykaf5fhajPjrQLezDSBecEBBRx3t7L/X5UzfAZjufkn2cqu3SVKRYjdlddpuxALVQGUCF/+Mlf5RqqAiaFK64Is14RzQs7s+k3mAmQ5woDlDCPBjeJvZyWSUPp7ExN4uiXGhj9AQkph3hZW6c4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vadim.Lomovtsev@cavium.com; Received: from localhost.localdomain.com (50.233.148.156) by CY4PR07MB2997.namprd07.prod.outlook.com (2603:10b6:903:d0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Fri, 30 Mar 2018 12:00:32 +0000 From: Vadim Lomovtsev To: sgoutham@cavium.com, sunil.kovvuri@gmail.com, rric@kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net Cc: dnelson@redhat.com, ynorov@caviumnetworks.com, Vadim Lomovtsev Subject: [PATCH v2 6/7] net: thunderx: add workqueue control structures for handle ndo_set_rx_mode request Date: Fri, 30 Mar 2018 04:59:52 -0700 Message-Id: <20180330115953.17154-7-Vadim.Lomovtsev@caviumnetworks.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180330115953.17154-1-Vadim.Lomovtsev@caviumnetworks.com> References: <20180327150736.10718-1-Vadim.Lomovtsev@caviumnetworks.com> <20180330115953.17154-1-Vadim.Lomovtsev@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: CO2PR04CA0006.namprd04.prod.outlook.com (2603:10b6:102:1::16) To CY4PR07MB2997.namprd07.prod.outlook.com (2603:10b6:903:d0::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ec10399c-7684-4c36-8ed1-08d59635d74f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(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4/AB8SVhLbl3sWniFirjRN1SUhdDXdU8KGzXBzK0jDY20rj4V8c61i5ksI0QklSYHr6dUn07ip26Fh5Ujug+vMDRw3V8x+ilHK4G+Xs5drGw3Ud2OOWkp1rLGWow6diF1wGcnra49+G1wI5DaI1nwvwGq8h/U6UNo2fHuu9Xgs2xQqYgl3kZMW5QI1j1Gi4EUxZh7Yby6tza3xPIe60XMU/Bxeh++L5J0JJe8gIsgQEw+VmJDQCuq3XD4RU4su0GHoKb6IkDeoQnw47FCxKpVtmm60yjr+BqtS+8XkcKsyGMFNfCxx6uznbjyEqzWBZvT5YGfU8nNdiTaBn+H2Ah+w5nm0A3t7ivAjR01J30QX1hY0PG8l2/hcEYS17J6jk19hNnDB5rk4gYBHgU85PhowGZn+LnnFu62qAXnXmpNFGDV8BQrFa424+aAo8pLDyIWLhw1jahBizhicB2bfqV0PQ92j5vTDZjfgN2etLRd/zua0YdTpZiLVt/CgjvijU610ZSs5iUHNX5RQfRKMWLRQ=;4:jQG/mAwaRNbqAiZj7TM9u411ho74oH/0xfSoCGCMo1TyL/tXWn5WR3tIUVkUo77pmroA5jRhf4+bKahZLkbqE0LgPMOIzWG1A0DSIQeLGr9ZEmwnv/dAU8roVyhH/mclEORBiYXP4UsvRHhL+nGdDQRl6VhUiZtWB3pmpAPgZXAyqjvYNqp1hZ96K8Vx8uvfT0PuawSKkrQLVX55eNvIqle+hAeOwLrnESmE6qijxFhIWCRQ4Nd5inl8XiOD/GDai88VAIbdlcsSe+73mU5fWg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(10201501046)(3002001)(3231221)(944501327)(52105095)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:CY4PR07MB2997;BCL:0;PCL:0;RULEID:;SRVR:CY4PR07MB2997; X-Forefront-PRVS: 06274D1C43 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(396003)(376002)(39380400002)(346002)(366004)(39850400004)(189003)(199004)(3846002)(6116002)(1076002)(105586002)(81156014)(81166006)(8676002)(50466002)(53416004)(5660300001)(52116002)(97736004)(23676004)(6506007)(8936002)(59450400001)(76176011)(386003)(69596002)(2906002)(6486002)(6512007)(72206003)(39060400002)(6666003)(47776003)(316002)(7736002)(106356001)(486005)(486005)(476003)(107886003)(446003)(305945005)(53936002)(11346002)(2616005)(66066001)(16526019)(956004)(478600001)(68736007)(36756003)(50226002)(26005)(4326008)(2870700001)(42882007)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR07MB2997;H:localhost.localdomain.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjA3TUIyOTk3OzIzOjIyYzg2Tlc5bFR1Y245bnBpbk5TMUQ4eXRL?= =?utf-8?B?ZGRhWmVpUDMyRmFHSXRHdXY2NFNIZ0hBMDFoR1Z4dWkxRDJCZDZ0VGFCQjhq?= =?utf-8?B?TVY1WVBiZHArN21sTktjLzF0c0V0U0ZzekpoMThuNFlDOEc2T2V6YVp1WjF1?= =?utf-8?B?dGZmLzFZUlpEb3prdTcrL2NHNnlPMTVwRlNBT25pYWRaeG0rbStBeTZwQk8r?= =?utf-8?B?bk5QZ2JFZC8zNE1ENGszM3NsL21NK2N0a241L2FmUzQwZW5HbERDSDFFQUxs?= =?utf-8?B?RmJid0ZOTHZZZ1VqenkzWFhRMk5sL2FQVEcvT0xUK1crRU80b08xeXh6NHhh?= =?utf-8?B?WnJwR25mV2ljOVhsVEFnVmQ4aER0Nzg5a2wvV1lvdzJiYU1sTXpjMlR5SENE?= =?utf-8?B?S08yc29VN2dZbFBrcE53WUxqN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ds/8j/oeGaUQJlReJxMSodoxBit+vLMRmAujGa5nsLRb4DFe1Wq77Z1EjwPJa17ERZHhC/4ax0mXmuc8s8D7F/DXwMNFQhJIsIV7EKIGdvpgEGUeG0XHSfQjdkacMm8YlTfv3SSCt5y8Q60dqPBdInTHwSSh6vtxGKG8yW9mRaLUPNz0e5pWPPxGRg==;5:WZf3YvcpQeP4yKwgfHypfKjS3oamNgD/VVmcFCh+8+pqBTTIBKdAFSb9TIETXMU4EExNRAXqk0ymCUao2VMfqkCahPPK74HaaAnOqEav9BF1+wA+bZ9VbmNQ64iTR5DldyK3qwMbWsmcW94VACxNhh62+IagevrT5T01pnk8Ldw=;24:iC790EQom9jUCiAK7+Y06AoXiMqLpzHP0hXtoaX8KCLWOeB0mYfT1w/qTw8wlFnijQfxQ6gYB/s/Jx8QB+RsUwEEt21twOnpJtWB1Bohu2U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB2997;7:CPs4cBzgZExxxRNgcHIxgDnD1S8Zn/Xg4sW9b9QODNRct+ovszATPPDbvY5rPITcXLmDSoMu30WQ90wjW6zMFOsxlmWoRJbdqXBqfR3Hk+3FgjX0aSjFIy0aJHDjrvk7rWeL5he+RsiDhC6SCy38lfp+XR3toZ+tqKVykxb1YgiOqoIAkZ7sDhF3TSW+COPVb8Y6EKvPt2z6wodKOCdfW49A2FEqWx03tBloLHbT6W6OQG8hs/RZVBLNrg+IU3PX X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2018 12:00:32.6916 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec10399c-7684-4c36-8ed1-08d59635d74f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB2997 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vadim Lomovtsev The kernel calls ndo_set_rx_mode() callback from atomic context which causes messaging timeouts between VF and PF (as they’re implemented via MSIx). So in order to handle ndo_set_rx_mode() we need to get rid of it. This commit implements necessary workqueue related structures to let VF queue kernel request processing in non-atomic context later. Signed-off-by: Vadim Lomovtsev --- drivers/net/ethernet/cavium/thunder/nic.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h index 069289b4f968..5fc46c5a4f36 100644 --- a/drivers/net/ethernet/cavium/thunder/nic.h +++ b/drivers/net/ethernet/cavium/thunder/nic.h @@ -265,6 +265,22 @@ struct nicvf_drv_stats { struct cavium_ptp; +struct xcast_addr { + struct list_head list; + u64 addr; +}; + +struct xcast_addr_list { + struct list_head list; + int count; +}; + +struct nicvf_work { + struct delayed_work work; + u8 mode; + struct xcast_addr_list *mc; +}; + struct nicvf { struct nicvf *pnicvf; struct net_device *netdev; @@ -313,6 +329,7 @@ struct nicvf { struct nicvf_pfc pfc; struct tasklet_struct qs_err_task; struct work_struct reset_task; + struct nicvf_work rx_mode_work; /* PTP timestamp */ struct cavium_ptp *ptp_clock; -- 2.14.3