lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CF9D1877D81D214CB0CA0669EFAE020C2A416325@CMEXMB1.ad.emulex.com>
Date:	Mon, 24 Mar 2014 07:38:03 +0000
From:	Sathya Perla <Sathya.Perla@...lex.Com>
To:	Or Gerlitz <or.gerlitz@...il.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next v2 2/2] be2net: csum, tso and rss steering
 offload support for VxLAN

> -----Original Message-----
> From: Or Gerlitz [mailto:or.gerlitz@...il.com]
> 
> On Mon, Mar 24, 2014 at 8:00 AM, Sathya Perla <sathya.perla@...lex.com> wrote:
> > This patch mainly implements the add/del_vxlan_port() methods by invoking
> > the needed FW cmds for supporting VxLAN offloads for Skyhawk-R.
> 
> [...]
> > +static void be_add_vxlan_port(struct net_device *netdev, sa_family_t sa_family,
> > +                             __be16 port)
> > +{
> > +       struct be_adapter *adapter = netdev_priv(netdev);
> > +       struct device *dev = &adapter->pdev->dev;
> > +       int status;
> > +
> > +       if (lancer_chip(adapter) || BEx_chip(adapter))
> > +               return;
> > +
> > +       if (adapter->flags & BE_FLAGS_VXLAN_OFFLOADS) {
> > +               dev_warn(dev, "Cannot add UDP port %d for VxLAN offloads\n",
> > +                        be16_to_cpu(port));
> > +               dev_info(dev,
> > +                        "Only one UDP port supported for VxLAN offloads\n");
> > +               return;
> > +       }
> > +
> > +       status = be_cmd_manage_iface(adapter, adapter->if_handle,
> > +                                    OP_CONVERT_NORMAL_TO_TUNNEL);
> > +       if (status) {
> > +               dev_warn(dev, "Failed to convert normal interface to tunnel\n");
> > +               goto err;
> > +       }
> > +
> > +       status = be_cmd_set_vxlan_port(adapter, port);
> 
> so the flow be_cmd_set_vxlan_port --> be_cmd_set_profile_config goes
> to sleep, right? well, it's wrong doing it from  here since the ndo is
> called from the vxlan driver under spinlock, you should easily get a
> nice stack trace if you test your code with spinlock/atomic debugging

be_cmd_set_profile_config() does not sleep. 
But, I guess it could be made to sleep() in the future due to a design change...
Just to future-proof this code, I could fix this up with some workqueue processing..

thanks,
-Sathya
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ