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: <336fc885b7b3246d7434998514a38fc0b754c865.camel@mendozajonas.com>
Date:   Mon, 15 Oct 2018 13:44:36 +1100
From:   Samuel Mendoza-Jonas <sam@...dozajonas.com>
To:     Justin.Lee1@...l.com, netdev@...r.kernel.org
Cc:     davem@...emloft.net, linux-kernel@...r.kernel.org,
        openbmc@...ts.ozlabs.org
Subject: Re: [RFC PATCH 2/2] net/ncsi: Configure multi-package,
 multi-channel modes with failover

On Fri, 2018-10-12 at 19:16 +0000, Justin.Lee1@...l.com wrote:
> > > > > > +
> > > > > > +	NCSI_FOR_EACH_CHANNEL(np, channel) {
> > > > > > +		ncm = &channel->modes[NCSI_MODE_TX_ENABLE];
> > > > > > +		/* Another channel is already Tx */
> > > > > > +		if (ncm->enable)
> > > > > > +			return false;
> > > > > > +	}
> 
> As we don't suspend the old channel when we call the ncsi_stop_dev() function,
> this will always be false and we will not set it to the right channel.
> If mutli_channel is enabled, suppose that we only need to send TX enable/disable
> when  the link is changed.

Ah, good point. I was working on improving the ncsi_stop_dev/ncsi_start_dev
interactions in a separate patch but we're going to need to fix it for
multi_channel to work properly. I'll look into that and include it in this
series.

<snip>

> > > > > > -	if (!found) {
> > > > > > +	if (!with_link && found) {
> > > > > > +		netdev_info(ndp->ndev.dev,
> > > > > > +			    "NCSI: No channel with link found, configuring channel %u\n",
> > > > > > +			    found->id);
> > > > > > +		spin_lock_irqsave(&ndp->lock, flags);
> > > > > > +		list_add_tail_rcu(&found->link, &ndp->channel_queue);
> > > > > > +		spin_unlock_irqrestore(&ndp->lock, flags);
> 
> If multi-channel is enabled and without the link, the last found channel would be added again.

Yep, I've fixed this up by checking whether anything has been added to the
channel queue instead.

Thanks,
Sam


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ