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: <20210418092731.jmuio2terv2spa3h@skbuf>
Date:   Sun, 18 Apr 2021 12:27:31 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Yangbo Lu <yangbo.lu@....com>
Cc:     netdev@...r.kernel.org, Richard Cochran <richardcochran@...il.com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jonathan Corbet <corbet@....net>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        UNGLinuxDriver@...rochip.com, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [net-next 2/3] net: mscc: ocelot: convert to
 ocelot_port_txtstamp_request()

On Fri, Apr 16, 2021 at 08:36:54PM +0800, Yangbo Lu wrote:
> Convert to a common ocelot_port_txtstamp_request() for TX timestamp
> request handling.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@....com>
> ---
>  drivers/net/dsa/ocelot/felix.c         | 14 +++++---------
>  drivers/net/ethernet/mscc/ocelot.c     | 24 +++++++++++++++++++++---
>  drivers/net/ethernet/mscc/ocelot_net.c | 18 +++++++-----------
>  include/soc/mscc/ocelot.h              |  5 +++--
>  4 files changed, 36 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
> index cdec2f5e271c..5f2cf0f31253 100644
> --- a/drivers/net/dsa/ocelot/felix.c
> +++ b/drivers/net/dsa/ocelot/felix.c
> @@ -1399,18 +1399,14 @@ static bool felix_txtstamp(struct dsa_switch *ds, int port,
>  			   struct sk_buff *skb, struct sk_buff **clone)
>  {
>  	struct ocelot *ocelot = ds->priv;
> -	struct ocelot_port *ocelot_port = ocelot->ports[port];
>  
> -	if (ocelot->ptp && ocelot_port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP) {
> -		*clone = skb_clone_sk(skb);
> -		if (!(*clone))
> -			return false;
> +	if (!ocelot->ptp)
> +		return false;
>  
> -		ocelot_port_add_txtstamp_skb(ocelot, port, *clone);
> -		return true;
> -	}
> +	if (ocelot_port_txtstamp_request(ocelot, port, skb, clone))
> +		return false;
>  
> -	return false;
> +	return true;

Considering the changes you'll have to make to patch 1 (changing the
return value and populating DSA_SKB_CB(skb)->clone at the end of this
function:

Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ