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] [thread-next>] [day] [month] [year] [list]
Message-ID: <X/eauzr3d7es/YpH@lunn.ch>
Date:   Fri, 8 Jan 2021 00:35:23 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     netdev@...r.kernel.org, alexandre.belloni@...tlin.com,
        f.fainelli@...il.com, vivien.didelot@...il.com,
        alexandru.marginean@....com, claudiu.manoil@....com,
        xiaoliang.yang_1@....com, hongbo.wang@....com, kuba@...nel.org,
        jiri@...nulli.us, idosch@...sch.org, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v2 net-next 03/10] net: dsa: add ops for devlink-sb

> +static struct dsa_port *devlink_to_dsa_port(struct devlink_port *dlp)
> +{
> +	return container_of(dlp, struct dsa_port, devlink_port);
> +}

I wonder if this should be moved to include/net/dsa.h next to the
other little helpers used to convert between devlink structures and
DSA structures?

> +
> +static int dsa_devlink_sb_pool_get(struct devlink *dl,
> +				   unsigned int sb_index, u16 pool_index,
> +				   struct devlink_sb_pool_info *pool_info)
> +{
> +	struct dsa_devlink_priv *dl_priv = devlink_priv(dl);
> +	struct dsa_switch *ds = dl_priv->ds;

dsa_devlink_to_ds()

> +
> +	if (!ds->ops->devlink_sb_pool_get)
> +		return -EOPNOTSUPP;
> +
> +	return ds->ops->devlink_sb_pool_get(ds, sb_index, pool_index,
> +					    pool_info);
> +}
> +

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ