Received: by 10.213.65.68 with SMTP id h4csp754298imn; Tue, 27 Mar 2018 08:11:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELsHGCCskKJAFzs0sJCM/skKjnz3Y3yj8Xzq28BsOKUthgmNnJH4TF1FH36LwKxMPIJo1/1N X-Received: by 2002:a17:902:6884:: with SMTP id i4-v6mr46549521plk.259.1522163465233; Tue, 27 Mar 2018 08:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522163465; cv=none; d=google.com; s=arc-20160816; b=oCs3dTy15zyzF3pzv/lc7sI4Ec07ev7UCfqT/5iU7qp3XS8zkRDQQZOwAcVrmAixhV bs6XWMqK/aX+Z+XFiAltHi6prP523jFXnAGlkdDFpiR9x2GqEF1i948+/Vhp/5Mh1W48 yp3U03ubtLx+kNJ6bWCuIqfOD6jydLAcXtStVenWVfxSSV6Hz6d7ALXS+s2QmQ2ASCCz H6fJg4H5+Z5bxcLYKk5Z5ekIDNIa5bPo6ycJU71yUWgqjjCkX2ODJBZJVHicfO7Dq3Vb jD9TD648B+0qmtT09Od2nljO1XWcvIGItYWTc62lwjTrCC2N/7lci8DAmeUa7RGPe+YZ feCw== 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=hT27zMpaPwJFvaNwY0360HpmkZfT7kTc99WCJkAHui0=; b=DxAN/fJDsOdmDqpUVWqZ0o9N+0ex6TfFXv3APF8qWxIH6S+WeTpGWhJ9YKhECElAZr tdDCALdl2+UhI0MEOe24gVfBOsawq7o2RMXoEAF3BLw3jQygR5gdb2/ungWO2ztUwQHS ujPHlDUVZHSiPr4qcrEChOFRpZSpoaS52BDhgke+JCIKPu3nDIsflX7tcqcpZih75nU7 /PSnLUzxmMUnm987Lqa5+PJMNE/aKI27vIRI7wjGEYp2y9q9ljAshb7LldaNHJ+V2k/S ZXrJuPsSsvum1L7FrMwiHwdJnCRDl9fl50SwvusseoWxZkGM4pslDnKfM2vRK+8KsPZD S5zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=lqp8u0Dw; 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 b5-v6si1438143pli.442.2018.03.27.08.10.50; Tue, 27 Mar 2018 08:11:05 -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=lqp8u0Dw; 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 S1752710AbeC0PIC (ORCPT + 99 others); Tue, 27 Mar 2018 11:08:02 -0400 Received: from mail-dm3nam03on0071.outbound.protection.outlook.com ([104.47.41.71]:25088 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752686AbeC0PH7 (ORCPT ); Tue, 27 Mar 2018 11:07:59 -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=hT27zMpaPwJFvaNwY0360HpmkZfT7kTc99WCJkAHui0=; b=lqp8u0DwT9VowjsxBkfYUqdAqE/xZwRJdkSpsz5ynX6+ebGJ8lPgRtt16r8Mu2DTyp1Ja0UXw1yX5SxCnTauvBDWEkK7gY+knD4BtekMZxyVHgwQ3dUTqbIFvfSMY+jlRwpqwFCUvpD5/FbQNkhFrAIL8C0GSie9tU1ZUEBeFyY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vadim.Lomovtsev@cavium.com; Received: from localhost.localdomain.com (50.233.148.156) by CY4PR07MB2998.namprd07.prod.outlook.com (2603:10b6:903:d0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Tue, 27 Mar 2018 15:07:52 +0000 From: Vadim Lomovtsev To: sgoutham@cavium.com, sunil.kovvuri@gmail.com, robert.richter@kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dnelson@redhat.com, Vadim Lomovtsev Subject: [PATCH 6/7] net: thunderx: add workqueue control structures for handle ndo_set_rx_mode request Date: Tue, 27 Mar 2018 08:07:35 -0700 Message-Id: <20180327150736.10718-7-Vadim.Lomovtsev@caviumnetworks.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180327150736.10718-1-Vadim.Lomovtsev@caviumnetworks.com> References: <20180327150736.10718-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: DM5PR20CA0003.namprd20.prod.outlook.com (2603:10b6:3:93::13) To CY4PR07MB2998.namprd07.prod.outlook.com (2603:10b6:903:d0::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0e9e9aa-8d7c-4fdf-7aa8-08d593f48389 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020);SRVR:CY4PR07MB2998; X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB2998;3:uDOp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bArgV3Yybx7odhuzx/dt45km8bQur9phMxIeU2G42Dakb6DJpLY6Vijl5xQ6pw9E5RCQyhY+G+P/CaYMIUWjgZndWVIsHNv0bqYrcCcJORz8cn2s/ixGOv7jN7rsbFqkynWpZZrrkldfUq3WFSQ2W5J6da/b9kSvkhXhDcmJj33lIqe51zPGxDKQJkJxeKzRP0O94wzCvs7UJFM4p57/dgFZYN4Pzfwje3xxfHyR0rbjTv8LIvJvkPYOTqHBY8E5/SwWMfE+0bLnL7bao5OXxGZ8p/B7pWVexl+PfzlrnRzR3ZvrUKik+B/7KuBB4mbjdcfmRCyJZnLn+dSLCE1O48t4YEckEzavpNr12q27eD/nA3CgzAhZ9MNRDPbFzwZsy2yAndbG8dXyN7Mgf1ZNMYRngFVoiisExWqSccfG+x3jH5QzjYMQCkNLi+inKugWkC5M=;4:TIAwF0DEw2Q5Jad+LZkgDwQy2rzZbgSwgqrl195GgkkHO0WHx55gQGxknu743V7UiguNzQs2vmviDCSybMZYhcj3oK2ISUl7bU9Ee7L410g89KPpJmCvD2qnRFPnGMW2X8ecJlsrYah3bd4tVaXKRiSBiQYBC6yjA+uLTxhBkx5YOpjcBlI+82mznLa2U0iWQe/ZfCQtO7xauTJ3VUQ3fQ5yN4UmGMNmHxh9e0kTHcyVbYDnR3zfxyf+IJIOQ9nIUPFBQVMH9FladEqHO45R3g== 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)(3002001)(10201501046)(3231221)(944501327)(52105095)(6041310)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:CY4PR07MB2998;BCL:0;PCL:0;RULEID:;SRVR:CY4PR07MB2998; X-Forefront-PRVS: 0624A2429E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(346002)(366004)(39860400002)(396003)(39380400002)(376002)(189003)(199004)(446003)(2616005)(6116002)(478600001)(1076002)(107886003)(3846002)(6666003)(956004)(97736004)(39060400002)(50466002)(7736002)(53936002)(16526019)(66066001)(47776003)(26005)(486005)(486005)(6486002)(6512007)(316002)(305945005)(11346002)(105586002)(42882007)(6506007)(386003)(68736007)(59450400001)(69596002)(106356001)(72206003)(25786009)(2906002)(52116002)(53416004)(76176011)(81166006)(8676002)(36756003)(476003)(2870700001)(50226002)(4326008)(5660300001)(81156014)(23676004)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR07MB2998;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?MTtDWTRQUjA3TUIyOTk4OzIzOkc0QVVKMk9LaFhGS2ZTclFGWkpjaWU0MUoz?= =?utf-8?B?enZVUGkxSkE3OTFHcUtaRURVdlpZbkFtRnZHZE10TzF5Vk8wWkk3WTFRb1M3?= =?utf-8?B?QjdjOFh1SXBHMGpnSnV5d01FdkhmbDl3eCtzZWxMMTJOMzVtZndzK3hzTG10?= =?utf-8?B?T25ETEtwc2F6M2xXM2tVZ3Axa1o0cWFKN0traXcvbXJwcDFMU0lWcmRzaFVX?= =?utf-8?B?WWZjQ1hrTHhhTm51RFVmaXREeUE3VGNlOEFxeEl2Y0huYWNuRUhGc1BWYUFj?= =?utf-8?B?cDlZbVdDT25ZblV3ZzRsVXRMRllXbmlUNUNvQXBKRlF4YWx2YWpGTEV4U1c0?= =?utf-8?B?N1grRm5UTDN5dVpaVnVRczZ4ZWh3UTlUMEtET3dyck11K2xwNWQrdWM0WDNO?= =?utf-8?B?b2lROFhlWGwvTkJYdHhIc01WL000Wi9GWjEwbzBVQkVXTXpNWWNyc08ycG04?= =?utf-8?B?UVRVSElCWkViQ2w5RldxV0lid0pubFVMZDFGbklJQ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IOD2u8yhTSmEgMTo/swsebu+6E89nn6FGGdD+I/9X56tUMfIPxbUkUfqgw7CNko1PouNrxLLe6aFtfMpIoD3njKlRM2tH4CA7WaD24g==;5:LFKrTjeZVsMlIWig3vf0xBwFXRMWpuYM5dFTDzK7CAFeaOnewjkWn43d2eLc6zYz1RmrgkVe7pop69zkvJY8VFfG++o2XP8QkmhCku9HJg+LmiqstNXFKSZuel2bxINfQ+LbRPakha3/21Z6FOQgeRDWYeQ72qRRfIG67y6Ev+c=;24:mSNhl9t1T3NB0OM+o+0BeAwqkZX/JJOHqgGBKtW/l7Vg6TCIEgWY/4P0BpZrdQkbFHbkVMJV/+HFmpLhq2AhtvxtYodwwIq44+mAkTU98Xw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB2998;7:e5U6kR4Xfy5BNAyCo7cqLapJ8bqK2f3oPCcu4HtRuhXibHPyafVZ9ZGeT1VaBpQisg3g94IX6J8V1JNkQImKCb6PKAfGSd8xkoESUdFzcL2D+5/7+bPKIjH76UDpI36plc4rbtU3GFVHkQG4sywFe8frWvPOgaoxsIcQmWUcZK+TKRmlyE6vOkPyUqwrGVljxLYaPJCGQFEKszQDipGS1JP/wkkdI2oqr0RwDwtmXYSNJE8DYeI4KfdsNHV5Bgbf X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2018 15:07:52.4671 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0e9e9aa-8d7c-4fdf-7aa8-08d593f48389 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB2998 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