linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Po Liu <po.liu@nxp.com>
Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"haustad@cisco.com" <haustad@cisco.com>,
	"nicolas.ferre@microchip.com" <nicolas.ferre@microchip.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	Mingkai Hu <mingkai.hu@nxp.com>, Roy Zang <roy.zang@nxp.com>
Subject: Re: [PATCH] net: tsn: add an netlink interface between kernel and application layer
Date: Fri, 4 Jan 2019 11:19:16 +0200	[thread overview]
Message-ID: <20190104091916.GA3360@apalos> (raw)
In-Reply-To: <VI1PR04MB51357307440F6B89831741F5928E0@VI1PR04MB5135.eurprd04.prod.outlook.com>

Hi Po,
> > >
> > > [Po] Ya, there are operations of switchdev. You may think that to add the TSN
> > configurations ops into switchdev operations. But  we need to consider the end-
> > station devices and switch all in the devices or in the TSN domain. The TSN
> > domain is the devices include TSN capabilities ports, for up layer, we need to
> > provide a formal interface. So tsn configure can be standalone.
> > > In this patch, we treat two kinds of ports when registering the ports, end-
> > station or switch. This may treat them in some minor differences in TSN spec
> > and drivers.
> > >
> > 
> > Why are switches different than end-stations configuration wise?
> 
> Minor differences but still have mentioned in spec.
> 
> > I understand that you may need to support different TSN IEEE standards per
> > device, but adding support for different capabilities shouldn't affect a 'common'
> > configuration path.
> > That's the actual advantage of switchdev based drivers. switches and end
> > stations will have a very similar way of confiration via iproute2/bridge/tc utils.
> > Am i missing something?
> > 
> I guess I start to getting your advise. Do you mean to add operations in struct switchdev_ops ? Is it proper include end station? I used to add structure tsn_ops in net_device. But I think there are some information and status of devices maintain in the kernel from drivers. So I create structure tsn_port standalone. 
> Yes,  iproute2/bridge/tc is one choice for user space. I would think of the possible. But the too many parameters are still the problem. For example to create Qbv gate list.

Well iproute2 is already used to configure an 802.1Qbv software scheduler which
is already merged into net-next [1]. 

The netdevice operations already have a callback to configure hardware 
schedulers used for CBS currently [2]. We should be able to configure the 
hardware (at least the basics) for 802.1Qbv, using those callbacks. 

Try to include switchdev maintainers in the next RFC and have a discussion on
what's the best approach to move forward on that and how to add missing
features.

I am not really sure i have all the bits and pieces correctly, but i did make a
presentation a few months ago on this [3].

Since switchdev is creating 1 ethernet interface per switch port and provides
you with a way of configuring the switch 'cpu' port individually we should be
able to fit everything in there by extending the current API's (but i might be 
missing something).

[1] Look into net/sched/sch_taprio.c for the software scheduler.
[2] .ndo_setup_tc() is the ndo callback. Look for TC_SETUP_QDISC_CBS and you'll
    get the idea. I know intel i210 and TI's cpsw driver are using it. 
[3] https://connect.linaro.org/resources/yvr18/sessions/yvr18-212/


/Ilias

      reply	other threads:[~2019-01-04  9:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1545968772-7237-1-git-send-email-Po.Liu@nxp.com>
2018-12-28  3:49 ` [PATCH] net: tsn: add an netlink interface between kernel and application layer PO LIU
2018-12-28 19:29   ` Vinicius Costa Gomes
2018-12-29  1:59     ` PO LIU
2019-01-02 19:01       ` Vinicius Costa Gomes
2019-01-03  3:10         ` Po Liu
2019-01-03  9:16         ` Ilias Apalodimas
2019-01-03 10:09           ` Po Liu
2019-01-03 11:38             ` Ilias Apalodimas
2019-01-04  9:01               ` Po Liu
2019-01-04  9:19                 ` Ilias Apalodimas [this message]

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=20190104091916.GA3360@apalos \
    --to=ilias.apalodimas@linaro.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=haustad@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingkai.hu@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=po.liu@nxp.com \
    --cc=roy.zang@nxp.com \
    --cc=vinicius.gomes@intel.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).