On Tue, Apr 23, 2019 at 10:31:41AM +0200, Miroslav Lichvar wrote:
> On Tue, Apr 23, 2019 at 12:18:17PM +0800, Hangbin Liu wrote:
> > On Thu, Apr 18, 2019 at 10:05:09AM +0200, Miroslav Lichvar wrote:
> > > select a more general filter. A container could run a PTP clock if it
> > 
> > Do you have an idea about how to select a general filter? If we have enabled
> > HWTSTAMP_FILTER_PTP_V2_L4_SYNC on host and a user in container want to 
> > enable
> > HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ, then which one is more general?
> 
> In this case neither is a more general filter of the other. If

Yes, that what I mean, some times it's hard to say which one is more general.
like PTP_V2_L4_EVENT and PTP_V2_L2_SYNC.

> V2_L4_SYNC is already selected, only the following filters could be
> selected on the macvlan interface:
> 
>       HWTSTAMP_FILTER_PTP_V2_L4_SYNC,
>       HWTSTAMP_FILTER_PTP_V2_L4_EVENT,
>       HWTSTAMP_FILTER_PTP_V2_SYNC,
>       HWTSTAMP_FILTER_PTP_V2_EVENT,
>       HWTSTAMP_FILTER_ALL,
> 
> I think one way to check this would be to assign each filter a
> (16-bit?) value where the individual bits correspond to the message
> types and the newly selected filter would have to contain all bits of
> the old one.

Just like I said, how to compare with different types.

Thanks
Hangbin

Reply via email to