DPDK usage discussions
 help / color / mirror / Atom feed
From: Peter Fredriksson <pfredriksson@sandvine.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: [dpdk-users] Kernel oops when adding vlan over kni driver
Date: Thu, 7 Nov 2019 07:16:58 +0000	[thread overview]
Message-ID: <6403e4cdfd8848e1a4add50eca1bb998@sandvine.com> (raw)

Hi all,

I encounter a problem in my setup and am not able to find a nice solution or 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 leads 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 needed.
* 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_timeout to wait for response from user space

And here I get the kernel Oops "BUG: scheduling while atomic" since wait_event_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_promiscusity 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 the intended recipient(s) only and may contain information that is considered confidential, proprietary, sensitive and/or otherwise legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.

                 reply	other threads:[~2019-11-07  7:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6403e4cdfd8848e1a4add50eca1bb998@sandvine.com \
    --to=pfredriksson@sandvine.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).