From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 879D7A034E for ; Thu, 7 Nov 2019 08:17:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 038721E904; Thu, 7 Nov 2019 08:17:13 +0100 (CET) Received: from mail1.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by dpdk.org (Postfix) with ESMTP id 5EF861E904 for ; Thu, 7 Nov 2019 08:17:11 +0100 (CET) Received: from WTL-EXCHSV1-1.sandvine.com (192.168.196.60) by WTL-EXCHSV2-1.sandvine.com (192.168.194.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Thu, 7 Nov 2019 02:17:09 -0500 Received: from WTL-EXCHSV2-1.sandvine.com (192.168.194.58) by WTL-EXCHSV1-1.sandvine.com (192.168.196.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Thu, 7 Nov 2019 02:16:58 -0500 Received: from WTL-EXCHSV2-1.sandvine.com ([fe80::b588:9807:9641:d848]) by WTL-EXCHSV2-1.sandvine.com ([fe80::b588:9807:9641:d848%20]) with mapi id 15.01.1034.026; Thu, 7 Nov 2019 02:16:59 -0500 From: Peter Fredriksson To: "users@dpdk.org" Thread-Topic: Kernel oops when adding vlan over kni driver Thread-Index: AQHVlTqzu3OnjbWKkUK5kK/HEicIHw== Date: Thu, 7 Nov 2019 07:16:58 +0000 Message-ID: <6403e4cdfd8848e1a4add50eca1bb998@sandvine.com> Accept-Language: sv-SE, en-US Content-Language: sv-SE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.60.34.145] x-c2processedorg: b2f06e69-072f-40ee-90c5-80a34e700794 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Kernel oops when adding vlan over kni driver X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Hi all, I encounter a problem in my setup and am not able to find a nice solution o= r workaround. In our setup, we create VLANs on top of kni interfaces. They = are created with another MAC address than the kni interface itself. This le= ads to a kernel oops due to the following. * vlan_dev.c - vlan_dev_open * since different mac - dev_uc_add * dev_addr_list.c - dev_uc_add. Get lock with netif_addr_lock_bh and while = holding the lock, __dev_set_rx_mode is used to set promiscuous mode if need= ed. * dev.c - ops->ndo_set_rx_mode * kni_net.c - kni_net_set_promiscusity * kni_net.c - kni_net_process_request * kni_net.c - kni_net_process_request calls wait_event_interruptible_timeou= t to wait for response from user space And here I get the kernel Oops "BUG: scheduling while atomic" since wait_ev= ent_interruptible_timeout will trigger a call to schedule while we hold the= lock from netif_addr_lock_bh. I have created a temporary workaround where I have made kni_net_set_promisc= usity just send the request and removed the response from user space since = we anyway do not use it. Anyone else who has encountered this problem? Does= anyone have a proposal for a better solution/workaround? Best regards, Peter Disclaimer: This communication (including any attachments) is intended for the use of t= he intended recipient(s) only and may contain information that is considere= d confidential, proprietary, sensitive and/or otherwise legally protected. = Any unauthorized use or dissemination of this communication is strictly pro= hibited. If you have received this communication in error, please immediate= ly notify the sender by return e-mail message and delete all copies of the = original communication. Thank you for your cooperation.