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: <20180118115719.3c5efc67@redhat.com>
Date:   Thu, 18 Jan 2018 11:57:19 +0100
From:   Jiri Benc <jbenc@...hat.com>
To:     grzegorz.halat@...il.com
Cc:     netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net-next] macvlan: Pass SIOC[SG]HWTSTAMP ioctls and
 get_ts_info to lower device

On Thu, 18 Jan 2018 02:12:34 +0100, grzegorz.halat@...il.com wrote:
> This patch allows to enable hardware timestamping on macvlan intefaces and find out capabilities of the lower device.
> 
> Signed-off-by: Grzegorz Halat <grzegorz.halat@...il.com>

NACK. This does not work.

For start, how do you deal with fwd_priv? When a packet is sent to
other software ports, it wouldn't be time stamped. And I expect more
cases like this to be there in macvlan, I only spent 10 seconds
checking it.

Please study how time stamping in the kernel works. A good start is
Documentation/networking/timestamping.txt. Then examine all possible
packet paths with macvlan, both egress and ingress.

> +static int macvlan_ethtool_get_ts_info(struct net_device *dev,
> +					struct ethtool_ts_info *ts_info)
> +{
> +	const struct macvlan_dev *vlan = netdev_priv(dev);
> +	const struct ethtool_ops *eth_ops = vlan->lowerdev->ethtool_ops;
> +
> +	if (eth_ops->get_ts_info)
> +		return eth_ops->get_ts_info(vlan->lowerdev, ts_info);
> +
> +	ts_info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
> +				   SOF_TIMESTAMPING_SOFTWARE;
> +	ts_info->phc_index = -1;

What calls skb_tx_timestamp if the driver does not support it?

 Jiri

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ