lkml.org 
[lkml]   [2018]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 2/2] net/ncsi: Configure multi-package, multi-channel modes with failover
From
Date
On Fri, 2018-10-12 at 19:16 +0000, Justin.Lee1@Dell.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


\
 
 \ /
  Last update: 2018-10-15 04:45    [W:0.052 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site