lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+h21hoRnXYrudJVLpRnvaRj1pJurmOsUpkjkbGDtGqR_kUZcQ@mail.gmail.com>
Date:   Sat, 13 Jul 2019 15:48:01 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Ilias Apalodimas <ilias.apalodimas@...aro.org>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        "David S. Miller" <davem@...emloft.net>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        vedang.patel@...el.com, Richard Cochran <richardcochran@...il.com>,
        weifeng.voon@...el.com, jiri@...lanox.com, m-karicheri2@...com,
        Jose.Abreu@...opsys.com, netdev <netdev@...r.kernel.org>
Subject: Re: [RFC PATCH net-next 3/6] net: dsa: Pass tc-taprio offload to drivers

Hi Ilias,

On Mon, 8 Jul 2019 at 14:23, Ilias Apalodimas
<ilias.apalodimas@...aro.org> wrote:
>
> Hi Vladimir,
>
> > tc-taprio is a qdisc based on the enhancements for scheduled traffic
> > specified in IEEE 802.1Qbv (later merged in 802.1Q).  This qdisc has
> > a software implementation and an optional offload through which
> > compatible Ethernet ports may configure their egress 802.1Qbv
> > schedulers.
> >
> > Signed-off-by: Vladimir Oltean <olteanv@...il.com>
> > ---
> >  include/net/dsa.h |  3 +++
> >  net/dsa/slave.c   | 14 ++++++++++++++
> >  2 files changed, 17 insertions(+)
> >
> > diff --git a/include/net/dsa.h b/include/net/dsa.h
> > index 1e8650fa8acc..e7ee6ac8ce6b 100644
> > --- a/include/net/dsa.h
> > +++ b/include/net/dsa.h
> > @@ -152,6 +152,7 @@ struct dsa_mall_tc_entry {
> >       };
> >  };
> >
> > +struct tc_taprio_qopt_offload;
> >
> >  struct dsa_port {
> >       /* A CPU port is physically connected to a master device.
> > @@ -516,6 +517,8 @@ struct dsa_switch_ops {
> >                                  bool ingress);
> >       void    (*port_mirror_del)(struct dsa_switch *ds, int port,
> >                                  struct dsa_mall_mirror_tc_entry *mirror);
> > +     int     (*port_setup_taprio)(struct dsa_switch *ds, int port,
> > +                                  struct tc_taprio_qopt_offload *qopt);
>
> Is there any way to make this more generic? 802.1Qbv are not the only hardware
> schedulers. CBS and ETF are examples that first come to mind. Maybe having
> something more generic than tc_taprio_qopt_offload as an option could host
> future schedulers?
>

Good point. I'll see what I can do to make DSA more qdisc-agnostic
when I gather enough feedback to mandate a v2.

> >
> >       /*
> >        * Cross-chip operations
> > diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> > index 99673f6b07f6..2bae33788708 100644
> > --- a/net/dsa/slave.c
> > +++ b/net/dsa/slave.c
> > @@ -965,12 +965,26 @@ static int dsa_slave_setup_tc_block(struct net_device *dev,
> >       }
> >  }
> >
> > +static int dsa_slave_setup_tc_taprio(struct net_device *dev,
> > +                                  struct tc_taprio_qopt_offload *f)
> > +{
> > +     struct dsa_port *dp = dsa_slave_to_port(dev);
> > +     struct dsa_switch *ds = dp->ds;
> > +
> > +     if (!ds->ops->port_setup_taprio)
> > +             return -EOPNOTSUPP;
> > +
> > +     return ds->ops->port_setup_taprio(ds, dp->index, f);
> > +}
> > +
> >  static int dsa_slave_setup_tc(struct net_device *dev, enum tc_setup_type type,
> >                             void *type_data)
> >  {
> >       switch (type) {
> >       case TC_SETUP_BLOCK:
> >               return dsa_slave_setup_tc_block(dev, type_data);
> > +     case TC_SETUP_QDISC_TAPRIO:
> > +             return dsa_slave_setup_tc_taprio(dev, type_data);
> >       default:
> >               return -EOPNOTSUPP;
> >       }
> > --
> > 2.17.1
> >
> Thanks
> /Ilias

Thanks,
-Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ