lkml.org 
[lkml]   [2023]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH net-next v5 08/16] net: ethtool: Add a command to expose current time stamping layer
    From
    On 10/9/23 08:51, Köry Maincent wrote:
    > From: Kory Maincent <kory.maincent@bootlin.com>
    >
    > Time stamping on network packets may happen either in the MAC or in
    > the PHY, but not both. In preparation for making the choice
    > selectable, expose both the current and available layers via ethtool.
    >
    > In accordance with the kernel implementation as it stands, the current
    > layer will always read as "phy" when a PHY time stamping device is
    > present. Future patches will allow changing the current layer
    > administratively.
    >
    > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    >
    > ---

    [snip]

    > +/*
    > + * Hardware layer of the TIMESTAMPING provider
    > + * New description layer should have the NETDEV_TIMESTAMPING or
    > + * PHYLIB_TIMESTAMPING bit set to know which API to use for timestamping.

    If we are talking about hardware layers, then we shall use either
    PHY_TIMESTAMPING or MAC_TIMESTAMPING. PHYLIB is the sub-subsystem to
    deal with Ethernet PHYs, and netdev is the object through which we
    represent network devices, so they are not even quite describing similar
    things. If you go with the {PHY,MAC}_TIMESTAMPING suggestion, then I
    could see how we could somewhat easily add PCS_TIMESTAMPING for instance.

    > + */
    > +enum {
    > + NO_TIMESTAMPING = 0,
    > + NETDEV_TIMESTAMPING = (1 << 0),
    > + PHYLIB_TIMESTAMPING = (1 << 1),
    > + SOFTWARE_TIMESTAMPING = (1 << 2) | (1 << 0),

    Why do we have to set NETDEV_TIMESTAMPING here, or is this a round-about
    way of enumerating 0, 1, 2 and 3?
    --
    Florian

    [unhandled content-type:application/pkcs7-signature]
    \
     
     \ /
      Last update: 2023-10-09 23:21    [W:3.617 / U:0.440 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site