All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alon Harel <alonhrl.us@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Sergey Ryazanov <ryazanov.s.a@gmail.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	Neil Horman <nhorman@tuxdriver.com>, Thomas Graf <tgraf@suug.ch>,
	netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Andy Gospodarek <andy@greyhouse.net>,
	dborkman <dborkman@redhat.com>, ogerlitz <ogerlitz@mellanox.com>,
	jesse <jesse@nicira.com>, pshelar <pshelar@nicira.com>,
	azhou <azhou@nicira.com>, Ben Hutchings <ben@decadent.org.uk>,
	Stephen Hemminger <stephen@networkplumber.org>,
	jeffrey.t.kirsher@intel.com, vyasevic <vyasevic@redhat.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	John Fastabend <john.r.fastabend@intel.com>,
	Eric Dumazet <edumazet@google.com>,
	Scott Feldman <sfeldma@cumulusnetworks.com>,
	Lennert Buytenhek <buytenh@wantstofly.org>,
	Shrijeet Mukherjee <shm@cumulusnetworks.c
Subject: Re: [patch net-next RFC 0/4] introduce infrastructure for support of switch chip datapath
Date: Sun, 30 Mar 2014 15:08:29 +0300	[thread overview]
Message-ID: <CAMgxPs5gBJHDQ+4w_7r6LLR0_j4WEwhtLkdLYh+s6Xx0at08bg@mail.gmail.com> (raw)
In-Reply-To: <20140328062827.GB2805@minipsycho.orion>

2014-03-28 9:28 GMT+03:00 Jiri Pirko <jiri@resnulli.us>:
>
> Thu, Mar 27, 2014 at 10:20:06PM CET, f.fainelli@gmail.com wrote:
> >2014-03-27 13:32 GMT-07:00 Sergey Ryazanov <ryazanov.s.a@gmail.com>:
> >> 2014-03-27 20:41 GMT+04:00 Florian Fainelli <f.fainelli@gmail.com>:
> >>> 2014-03-27 7:10 GMT-07:00 Sergey Ryazanov <ryazanov.s.a@gmail.com>:
> >>>> Hi all,
> >>>>
> >>>> sorry for the intrusion, but let me place my 2 cents.
> >>>>
> >>>> 2014-03-27 10:56 GMT+04:00 Jiri Pirko <jiri@resnulli.us>:
> >>>>> Wed, Mar 26, 2014 at 11:22:51PM CET, f.fainelli@gmail.com wrote:
> >>>>>>2014-03-26 14:51 GMT-07:00 Jamal Hadi Salim <jhs@mojatatu.com>:
> >>>>>>> On 03/26/14 14:14, Jiri Pirko wrote:
> >>>>>>>>
> >>>>>>>> Wed, Mar 26, 2014 at 06:58:32PM CET, f.fainelli@gmail.com wrote:
> >>>>>>>>>
> >>>>>>>>> 2014-03-26 10:35 GMT-07:00 Jiri Pirko <jiri@resnulli.us>:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>> You are right, sw1p0 and sw1p1 were meant to be, say LAN ports in my
> >>>>>>>>> example.
> >>>>>>>>>
> >>>>>>>>> I think there is an implicit convention that sw1 represents the
> >>>>>>>>> Ethernet switch port connected to the CPU Ethernet MAC, and that it is
> >>>>>>>>> always connected, hence there is no need to create a "fake" bridge to
> >>>>>>>>> link sw1 to eth0 for instance?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> I think you are kind of mixing apples and oranges (or I might be I'm not
> >>>>>>>> understanding you correctly).
> >>>>>>>> This is how I see it, sticking to the names you use in the example:
> >>>>>>>>
> >>>>>>>>              (sw1) (abstract place-holder netdev)
> >>>>>>>>            --------
> >>>>>>>>           switch chip                   CPU
> >>>>>>>>     -----------------------            ------
> >>>>>>>>     sw1p0 sw1p1 sw1p2 sw1p3             eth0
> >>>>>>>>       |     |     |     |                |
> >>>>>>>>      PHY   PHY   PHY    ------someMII-----
> >>>>>>>>
> >>>>>>>> You see that eth0 is the CPU part of the "connection" and sw1p3 is the
> >>>>>>>> switch part (port representation).
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> Florian - I am sure you explained this before; I just dont remember. Why
> >>>>>>> is there need to expose eth0? It seems to me sw1p0-3 are abstracted
> >>>>>>> already in the kernel and the "cpu port" is merely a control interface.
> >>>>>>
> >>>>>>eth0 corresponds to a CPU Ethernet MAC facing e.g: sw1p3 switch port.
> >>>>>>It is "regular" Ethernet driver connected to the switch without
> >>>>>>switch-specific logic. The goal is twofold:
> >>>>>>
> >>>>>>- allow any regular Ethernet driver to be connected to an external
> >>>>>>switch via e.g: MDIO/MDC or other without specific switch knowledge
> >>>>>>- represents accurately how the hardware is designed/connected
> >>>>>>
> >>>>>>but maybe, we can simplify and have e.g: sw1p3 and eth0 be the same interface...
> >>>>>
> >>>>> I believe that hawing both sw1p3 and eth0 is the correct way of
> >>>>> modelling this. sw1p3 is instance if switch chip driver representing the
> >>>>> actual port of a switch. eth0 is an instance of some other ordinary NIC
> >>>>> driver (8139too is my favorite :))
> >>>>>
> >>>>> This model allows to draw the exact picture.
> >>>>> Also, when you add the described possibility to use iplink to build
> >>>>> vlans, bridges whatever on the switch ports, it makes perfect sense to
> >>>>> have this model.
> >>>>>
> >>>>> Merging sw1p3 and eth0 would cause a loose of information and confusion.
> >>>>>
> >>>>
> >>>> CPU switch port and switch fabric itself should be configured in
> >>>> consistence with host, in first place I mean a set of VLANs. Also it
> >>>> should be mentioned that some generic knobs such as port rate and
> >>>> duplex mode are meaningless for CPU switch port and a lot of status
> >>>> information (rx/tx counters etc.) duplicates statistics of host
> >>>> interface which is connected to switch port.
> >>>
> >>> It duplicates the information when things just work fine, consider an
> >>> external switch connected via RGMII to a CPU Ethernet MAC, you might
> >>> want to get statistics from both sides (the switch CPU port and the
> >>> CPU Ethernet MAC) to diagnose why things are not working as expected,
> >>> which unfortunately happens once in a while with RGMII.
> >>>
> >>> If we expose both net_device, we will be able to retrieve statistics
> >>> about from both sides, without resorting to ad-hoc debugging tools,
> >>> but maybe this is not worth the effort.
> >>>
> >> I also thought about this situation. Can we use the debugfs interface
> >> for these purposes?
> >
> >Most of the time you are interesting in MIB counters for debugging
> >such issues, so ethtool quickly comes handy for this task. Since we
> >will provide per-port counters, the CPU port is not different, so
> >there are no reason for restricting this.
>
> I agree, no need to provide parallel api.
>
> >
> >>
> >>>> So there are no reasons
> >>>> to force user to configure this port manually, and automatic
> >>>> configuration of CPU switch port without exporting them as netdev
> >>>> seems as good approach.
> >>>
> >>> Well, maybe that's the answer, since we know that e.g: sw1p3 is always
> >>> connected to e.g: eth0, we could create an automatic bridge between
> >>> those two, this would keep the netdev exposure to user-space, but an
> >>> user would not have to know about that specific detail to get things
> >>> to work.
> >>>
> >> I would like go further and suggest to consider a netdev that is
> >> connected to the CPU switch port, as master. In case when we need to
> >> perform some action on whole switch (e.g. dump FIB).
> >
> >This is what the 'sw1' net_device in Jiri's proposal would do.
>
> Except, sw1 is not cpu port. It's just a place holder not representing
> any physical port/netdev.
>
> >
> >> And even name
> >> switch ports, using master netdev name as prefix (e.g. eth1p0, eth1p1,
> >> ..., eth1pN for ports of switch that is connected via eth1).
> >
> >I think the port naming using the switch abstract interface (sw1 here)
> >is better because ports do belong to the switch.
> >--
> >Florian

Re sending (sorry, new to the mailing list and I don not have the
previous mails)

Sorry for jumping in a bit late.
I would like to comment on the point of coupling OVS datapath (dp) with one
piece of hardware. In the model I can think of, there is an embedded switch
in a NIC (eSwitch) with some virtual functions (VFs) through which some of
the VMs are connected (SRIOV) while at the same time there is also a
vSwitch (software switch), e.g. an OVS bridge instance through which other
VMs are connected using 'macvtap'. In this case, according to Jiri's path,
we will need more than one dp.
It looks like the support for multiple dp's was removed from OVS during its
evolution, Are we trying to add it back?
Another option would be to stay with a single dp and support crossing flow
(i.e. flows that cross switches) by additional logic that associates
ingress & egress port with a switch.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-03-30 13:50 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 15:33 [patch net-next RFC 0/4] introduce infrastructure for support of switch chip datapath Jiri Pirko
2014-03-19 15:33 ` [patch net-next RFC 1/4] openvswitch: split flow structures into ovs specific and generic ones Jiri Pirko
2014-03-20 13:04   ` Thomas Graf
2014-03-19 15:33 ` [patch net-next RFC 2/4] net: introduce switchdev API Jiri Pirko
2014-03-20 13:59   ` Thomas Graf
2014-03-20 14:18     ` Jiri Pirko
2014-03-20 14:43   ` Nikolay Aleksandrov
2014-03-20 15:42     ` Jiri Pirko
2014-03-19 15:33 ` [patch net-next RFC 3/4] openvswitch: Introduce support for switchdev based datapath Jiri Pirko
2014-03-19 15:33 ` [patch net-next RFC 4/4] net: introduce dummy switch Jiri Pirko
2014-03-20 11:49 ` [patch net-next RFC 0/4] introduce infrastructure for support of switch chip datapath Jamal Hadi Salim
2014-03-20 12:40   ` Jiri Pirko
2014-03-20 17:21     ` Florian Fainelli
2014-03-21 12:04       ` Jamal Hadi Salim
2014-03-22  9:48         ` Jiri Pirko
2014-03-24 23:07           ` Jamal Hadi Salim
2014-03-25 17:39             ` Neil Horman
2014-03-25 18:00               ` Thomas Graf
2014-03-25 19:35                 ` Neil Horman
2014-03-25 20:11                   ` Florian Fainelli
2014-03-25 20:31                     ` Neil Horman
2014-03-25 21:22                       ` Jamal Hadi Salim
2014-03-25 21:26                     ` Thomas Graf
2014-03-25 21:42                       ` Florian Fainelli
2014-03-25 21:54                         ` Thomas Graf
2014-03-26 10:55                           ` Neil Horman
2014-03-26  5:37                     ` Roopa Prabhu
2014-03-26 10:54                       ` Jamal Hadi Salim
2014-03-26 15:31                         ` John W. Linville
2014-03-26 16:54                         ` Roopa Prabhu
2014-03-26 16:59                           ` Jiri Pirko
2014-03-26 17:29                             ` Florian Fainelli
2014-03-26 17:35                               ` Jiri Pirko
2014-03-26 17:58                                 ` Florian Fainelli
2014-03-26 18:14                                   ` Jiri Pirko
2014-03-26 18:29                                     ` Hannes Frederic Sowa
2014-03-26 18:30                                     ` Florian Fainelli
2014-03-26 21:51                                     ` Jamal Hadi Salim
2014-03-26 22:22                                       ` Florian Fainelli
2014-03-26 22:53                                         ` Jamal Hadi Salim
2014-03-26 23:16                                           ` Florian Fainelli
2014-03-27  6:56                                         ` Jiri Pirko
2014-03-27 10:39                                           ` Jamal Hadi Salim
2014-03-27 10:50                                             ` Jiri Pirko
2014-03-27 11:12                                               ` Jamal Hadi Salim
2014-03-27 11:16                                                 ` Jiri Pirko
2014-03-27 14:10                                           ` Sergey Ryazanov
2014-03-27 16:41                                             ` Florian Fainelli
2014-03-27 16:57                                               ` Jiri Pirko
2014-03-27 16:59                                               ` Thomas Graf
2014-03-27 20:32                                               ` Sergey Ryazanov
2014-03-27 21:20                                                 ` Florian Fainelli
2014-03-27 21:55                                                   ` Jamal Hadi Salim
2014-03-28  6:28                                                   ` Jiri Pirko
2014-03-30 12:08                                                     ` Alon Harel [this message]
2014-03-27 21:41                                               ` Jamal Hadi Salim
2014-03-27 16:55                                             ` Jiri Pirko
2014-03-27 19:58                                               ` Sergey Ryazanov
2014-03-27 20:01                                                 ` Florian Fainelli
2014-03-27 20:04                                                   ` Sergey Ryazanov
2014-03-27 21:47                                                   ` Jamal Hadi Salim
2014-03-27 21:54                                                     ` Florian Fainelli
2014-03-27 21:59                                                       ` Jamal Hadi Salim
2014-03-27 22:19                                                         ` Florian Fainelli
2014-03-27 23:42                                                         ` Thomas Graf
2014-03-27 23:46                                                           ` Florian Fainelli
2014-03-26 17:57                               ` Roopa Prabhu
2014-03-26 18:09                                 ` Florian Fainelli
2014-03-27 13:46                                   ` John W. Linville
2014-03-26 17:47                             ` Roopa Prabhu
2014-03-26 18:03                               ` Jiri Pirko
2014-03-26 21:27                                 ` Roopa Prabhu
2014-03-26 21:31                                   ` Jiri Pirko
2014-03-27 15:35                                     ` Roopa Prabhu
2014-03-27 16:10                                       ` Jiri Pirko
2014-04-01 19:13                                 ` Scott Feldman
2014-04-02  6:41                                   ` Jiri Pirko
2014-04-02 15:37                                     ` Scott Feldman
2014-04-02 14:32                                   ` Andy Gospodarek
2014-04-02 15:25                                     ` John W. Linville
2014-04-02 16:15                                       ` Scott Feldman
2014-04-02 16:47                                         ` Florian Fainelli
2014-04-02 21:52                                           ` Thomas Graf
2014-04-02 19:29                                         ` John W. Linville
2014-04-02 19:54                                           ` Scott Feldman
2014-04-02 20:06                                             ` John W. Linville
2014-04-02 20:04                                           ` Stephen Hemminger
2014-04-02 20:23                                             ` Jiri Pirko
2014-04-02 20:38                                               ` John W. Linville
2014-04-02 21:36                                                 ` Thomas Graf
2014-03-25 20:56                   ` Jamal Hadi Salim
2014-03-25 21:19                     ` Thomas Graf
2014-03-25 21:24                       ` Jamal Hadi Salim
2014-03-26  7:21                       ` Jiri Pirko
2014-03-26 11:00                         ` Jamal Hadi Salim
2014-03-26 11:06                           ` Jamal Hadi Salim
2014-03-26 11:31                             ` Jamal Hadi Salim
2014-03-26 13:20                             ` Jiri Pirko
2014-03-26 13:23                               ` Jamal Hadi Salim
2014-03-26 13:17                           ` Jiri Pirko
2014-03-26 11:10                     ` Neil Horman
2014-03-26 11:29                       ` Thomas Graf
2014-03-26 12:58                         ` Jamal Hadi Salim
2014-03-26 15:22                         ` John W. Linville
2014-03-26 21:36                           ` Jamal Hadi Salim
2014-03-26 18:21                         ` Neil Horman
2014-03-26 19:11                           ` Florian Fainelli
2014-03-26 22:44                             ` Jamal Hadi Salim
2014-03-26 23:15                               ` Thomas Graf
2014-03-26 23:21                                 ` Florian Fainelli
2014-03-27 15:26                               ` Neil Horman
2014-03-27 21:33                                 ` Jamal Hadi Salim
2014-03-26 19:24                           ` Hannes Frederic Sowa
2014-03-27 13:43                           ` John W. Linville
2014-03-26 12:19                       ` Jamal Hadi Salim
2014-03-26 15:27                       ` John W. Linville
2014-03-25 18:33               ` Florian Fainelli
2014-03-25 19:40                 ` Neil Horman
2014-03-25 20:00                   ` Florian Fainelli
2014-03-25 21:39                     ` tgraf
2014-03-25 22:08                       ` Jamal Hadi Salim
2014-03-26  5:48                         ` Roopa Prabhu
2014-03-25 20:46               ` Jamal Hadi Salim
2014-03-26  7:24               ` Jiri Pirko
2014-03-22  9:40       ` Jiri Pirko

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=CAMgxPs5gBJHDQ+4w_7r6LLR0_j4WEwhtLkdLYh+s6Xx0at08bg@mail.gmail.com \
    --to=alonhrl.us@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=azhou@nicira.com \
    --cc=ben@decadent.org.uk \
    --cc=buytenh@wantstofly.org \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse@nicira.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.r.fastabend@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=ogerlitz@mellanox.com \
    --cc=pshelar@nicira.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=sfeldma@cumulusnetworks.com \
    --cc=shm@cumulusnetworks.c \
    --cc=stephen@networkplumber.org \
    --cc=tgraf@suug.ch \
    --cc=vyasevic@redhat.com \
    --cc=xiyou.wangcong@gmail.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.