On Thu, 18 Jan 2018 02:12:34 +0100, grzegorz.ha...@gmail.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.ha...@gmail.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

Reply via email to