lkml.org 
[lkml]   [2023]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/5] net: Let the active time stamping layer be selectable.
(trimmed CC list of bouncing email addresses)

On Wed, Mar 08, 2023 at 02:59:27PM +0100, Köry Maincent wrote:
> +void of_set_timestamp(struct net_device *netdev, struct phy_device *phydev)
> +{
> + struct device_node *node = phydev->mdio.dev.of_node;
> + const struct ethtool_ops *ops = netdev->ethtool_ops;
> + const char *s;
> + enum timestamping_layer ts_layer = 0;
> +
> + if (phy_has_hwtstamp(phydev))
> + ts_layer = PHY_TIMESTAMPING;
> + else if (ops->get_ts_info)
> + ts_layer = MAC_TIMESTAMPING;
> +
> + if (of_property_read_string(node, "preferred-timestamp", &s))
> + goto out;
> +
> + if (!s)
> + goto out;
> +
> + if (phy_has_hwtstamp(phydev) && !strcmp(s, "phy"))
> + ts_layer = PHY_TIMESTAMPING;
> +
> + if (ops->get_ts_info && !strcmp(s, "mac"))
> + ts_layer = MAC_TIMESTAMPING;
> +
> +out:
> + netdev->selected_timestamping_layer = ts_layer;
> +}

From previous discussions, I believe that a device tree property was
added in order to prevent perceived performance regressions when
timestamping support is added to a PHY driver, correct?

I have a dumb question: if updating the device trees is needed in order
to prevent these behavior changes, then how is the regression problem
addressed for those device trees which don't contain this new property
(all device trees)?

\
 
 \ /
  Last update: 2023-03-27 00:50    [W:1.206 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site