Subject: Re: [PATCH RFC 2/6] net/ncsi: Packet handler

From: Benjamin Herrenschmidt <[email-masked]>
Date: Mon, 09 Nov 2015 11:41:24 +1100

On Mon, 2015-11-09 at 11:10 +1100, Gavin Shan wrote:
> +
> +       /* Send NCSI packet */
> +       skb_get(nr->nr_cmd);
> +       ret = dev_queue_xmit_sk(NULL, nr->nr_cmd);
> +       if (ret)
> +               goto out;
> +

Probably just dev_queue_xmit() in recent kernels

This means the queue needs to be running, which means the carrier needs
to be "on".

Dave, this is a problem actually. The NC-SI connection can be to
several NICs that may or may not have a link up. The "stack" will chose
one based on policies that we can discuss separately but basically, I
think we should reflect whether we found a NIC and it has a link up in
the "carrier" setting of our driver.

The problem with doing that is that if the carrier is "off", then
there's some code nowadays that will put a noop qdisc in and we won't
be able to send the low level NC-SI packets to communicate with the NIC
and thus find a new one or get a new carrier indication.

So at the moment, we must have the carrier of the driver appear as
"always on" when using NC-SI.

Cheers,
Ben.