[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211228071528.040fd3e3@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date: Tue, 28 Dec 2021 07:15:28 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Jay Vosburgh <j.vosburgh@...il.com>,
Veaceslav Falico <vfalico@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
"David S . Miller" <davem@...emloft.net>,
Richard Cochran <richardcochran@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCHv3 net-next 1/2] net_tstamp: add new flag
HWTSTAMP_FLAG_BONDED_PHC_INDEX
On Tue, 28 Dec 2021 15:01:13 +0800 Hangbin Liu wrote:
> When implement the user space support for this feature. I realized that
> we can't use the new flag directly as the user space tool needs to have
> backward compatibility. Because run the new tool with this flag enabled
> on old kernel will get -EINVAL error. And we also could not use #ifdef
> directly as HWTSTAMP_FLAG_BONDED_PHC_INDEX is a enum.
>
> Do you think if we could add a #define in linux/net_tstamp.h like
>
> #define HWTSTAMP_FLAGS_SUPPORT 1
>
> So that the user space tool could use it like
>
> #ifdef HWTSTAMP_FLAGS_SUPPORT
> cfg->flags = HWTSTAMP_FLAG_BONDED_PHC_INDEX;
> #endif
We could set it on SIOCGHWTSTAMP to let user space know that it's
necessary for a given netdev.
Powered by blists - more mailing lists