All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>,
	netdev@vger.kernel.org, davem@davemloft.net,
	sergei.shtylyov@cogentembedded.com
Subject: Re: [PATCH RFC 5/6] net/faraday: Enable NCSI interface
Date: Tue, 10 Nov 2015 17:12:50 +1100	[thread overview]
Message-ID: <20151110061249.GA8006@gwshan> (raw)
In-Reply-To: <1447100904.31884.26.camel@kernel.crashing.org>

On Tue, Nov 10, 2015 at 07:28:24AM +1100, Benjamin Herrenschmidt wrote:
>On Mon, 2015-11-09 at 18:30 +1100, Gavin Shan wrote:
>> 
>> Yeah, It's something that I hilighed in the cover letter. I was
>> thinking we might need a better way to enable Tx/Rx before the
>> interrupt is up, but couldn't figure out one way. So I need some
>> advice here.
>
>No, that's not right. For Tx/Rx to work the interface must be opened,
>there is simply no way around that and that's perfectly fine. The
>situation with an MDIO PHY is the same, most drivers can't talk to
>their PHY until the interface has been opened because the chip is
>basically powered down otherwise.
>
>So we require the interface to be opened to talk, so far so good,
>the NC-SI stack doesn't even need to open it itself, it's acceptable
>to require userspace to do it. IE. Userspace will chose what interface
>to use, open it (for DHCP etc... or whatever other reason) and *that*
>will then trigger the NC-SI negociation.
>

Yes, NCSI is smiliar to PHY to some extent. However, PHY's negotiation
is purly electrical procedure, no packets received from MAC for it. We
have the same situation when the NCSI/PHY is going to be brought down.

At the beginning, the NCSI packets can be received and transmitted after
the interface is opened. Before NCSI negotiation is done, no other packets
can be received and transmitted. For the Rx path (for other packets), the
NCSI link isn't enabled when NCSI negotiation isn't finished. There might
have lots of egress packets whose IP addresses can't be resolved to MAC
address as ARP resolution doesn't work before NCSI negotiation is done.
So there is a weird window: interface is up, but no packets (except NCSI
packets) can be received or transmitted.

When the interface is brought down, for example by "ifconfig eth0 down",
The NCSI interface needs to be teared down by transmitting and receiving
NCSI commands and responses. Similiarly, it introduces another weird window:
interface is down, but NCSI packets still can be transmitted and received.

>Cheers,
>Ben.
>

Thanks,
Gavin

  reply	other threads:[~2015-11-10  6:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09  0:10 [PATCH RFC 0/6] NCSI Support Gavin Shan
2015-11-09  0:10 ` [PATCH RFC 1/6] net/ncsi: Resource management Gavin Shan
2015-11-09  0:10 ` [PATCH RFC 2/6] net/ncsi: Packet handler Gavin Shan
2015-11-09  0:41   ` Benjamin Herrenschmidt
2015-11-09  0:10 ` [PATCH RFC 3/6] net/ncsi: Manage NCSI device Gavin Shan
2015-11-09  0:10 ` [PATCH RFC 4/6] net/faraday: Replace use_nc_si with use_ncsi Gavin Shan
2015-11-09  0:30   ` Benjamin Herrenschmidt
2015-11-09  0:45     ` Gavin Shan
2015-11-09  0:10 ` [PATCH RFC 5/6] net/faraday: Enable NCSI interface Gavin Shan
2015-11-09  0:32   ` Benjamin Herrenschmidt
2015-11-09  7:30     ` Gavin Shan
2015-11-09 20:28       ` Benjamin Herrenschmidt
2015-11-10  6:12         ` Gavin Shan [this message]
2015-11-10 10:34           ` Benjamin Herrenschmidt
2015-11-09  0:10 ` [PATCH RFC 6/6] net/faraday: Enable offload checksum according to device-tree Gavin Shan
2015-11-09  0:36   ` Benjamin Herrenschmidt
2015-11-09  0:45     ` Gavin Shan
2016-02-24  2:59 ` [PATCH RFC 0/6] NCSI Support Gavin Shan
2016-02-24 14:49   ` David Miller

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=20151110061249.GA8006@gwshan \
    --to=gwshan@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.