From: Jiri Pirko <jiri@resnulli.us>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Ido Schimmel <idosch@idosch.org>,
netdev@vger.kernel.org, davem@davemloft.net,
bridge@lists.linux-foundation.org, stephen@networkplumber.org,
vivien.didelot@savoirfairelinux.com, jiri@mellanox.com,
idosch@mellanox.com
Subject: Re: [RFC net-next 0/3] net: bridge: Allow CPU port configuration
Date: Wed, 23 Nov 2016 09:21:42 +0100 [thread overview]
Message-ID: <20161123082142.GA1873@nanopsycho> (raw)
In-Reply-To: <6e1bce5a-3bc6-ad7b-6cc0-ca80c0f86f55@gmail.com>
Wed, Nov 23, 2016 at 01:24:30AM CET, f.fainelli@gmail.com wrote:
>On 11/22/2016 02:08 PM, Jiri Pirko wrote:
>> Tue, Nov 22, 2016 at 06:48:29PM CET, andrew@lunn.ch wrote:
>>> Hi Ido
>>>
>>>> First of all, I want to be sure that when we say "CPU port", we're
>>>> talking about the same thing. In mlxsw, the CPU port is a pipe between
>>>> the device and the host, through which all packets trapped to the host
>>>> go through. So, when a packet is trapped, the driver reads its Rx
>>>> descriptor, checks through which port it ingressed, resolves its netdev,
>>>> sets skb->dev accordingly and injects it to the Rx path via
>>>> netif_receive_skb(). The CPU port itself isn't represented using a
>>>> netdev.
>>>
>>> With DSA, we have a real physical ethernet network interface for the
>>> 'cpu' port. It connects to one of the ports of the switch. Frames on
>>
>> Every port should be visible as a netdevice, including cpu port.
>> Would it make sence to have representors for those?
>
>The CPU port is kind of already visible with DSA since you need the
>switch to be attached to a normal Ethernet MAC driver (later referenced
>as eth0 for simplicity). Since eth0 is going to potentially receive/send
>switch tagged traffic, and the model is to terminate the interfaces at
>the port level, this interface does not really have any meaningful use
>from a data exchange, apart from multiplexing/demultiplexing switch tags
>(when enabled).
But this is not the switch port, but the counterpart on the other end of
MII. There should be 2 netdevices, one for each.
>
>If we did create a "cpu" network device, this interface would not be
>able to send/receive traffic either, because the per-port network
>interfaces are terminated at their level, and the conduit interface is
>just used for transmitting/receiving switch tagged traffic. It does have
>value as a controlling interface only though.
In this case, yes.
>
>As a controlling interface, this can be helpful, but we need to decide
>which side of the switch this CPU interface would represent, is it the
>switch's view of the CPU port, or is the Ethernet MAC view's of the
>switch's CPU port, attached to it (especially true with discrete switch
>chips).
>
>If we did use eth0 as a controlling interface, we need to somehow be
>able to overload (in an objected oriented fashioned) the netdev_ops,
>ethtool_ops and switchdev_ops for that interface so as to make it
>participate in the switch configuration (we actually do this already for
>ethtool statistics, but this is ugly).
>--
>Florian
next prev parent reply other threads:[~2016-11-23 8:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-21 19:09 [RFC net-next 0/3] net: bridge: Allow CPU port configuration Florian Fainelli
2016-11-21 19:09 ` [RFC net-next 1/3] net: bridge: Allow bridge master device to configure switch CPU port Florian Fainelli
2016-11-22 15:46 ` Vivien Didelot
2016-11-24 1:49 ` Toshiaki Makita
2016-11-21 19:09 ` [RFC net-next 2/3] net: dsa: Propagate VLAN add/del to CPU port(s) Florian Fainelli
2016-11-22 16:50 ` Vivien Didelot
2016-11-28 4:30 ` Florian Fainelli
2016-11-21 19:09 ` [RFC net-next 3/3] net: dsa: b53: Remove CPU port specific VLAN programming Florian Fainelli
2016-11-22 12:49 ` [RFC net-next 0/3] net: bridge: Allow CPU port configuration Jiri Pirko
2016-11-22 15:29 ` Vivien Didelot
2016-11-22 17:41 ` Ido Schimmel
2016-11-22 17:48 ` Andrew Lunn
2016-11-22 22:08 ` Jiri Pirko
2016-11-23 0:24 ` Florian Fainelli
2016-11-23 8:21 ` Jiri Pirko [this message]
2016-11-22 17:56 ` Florian Fainelli
2016-11-23 13:48 ` Ido Schimmel
2016-12-01 20:21 ` Florian Fainelli
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=20161123082142.GA1873@nanopsycho \
--to=jiri@resnulli.us \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=idosch@idosch.org \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=vivien.didelot@savoirfairelinux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).