[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-netdev
Subject:    Re: [PATCH v2 net-next] net: ptp: oki-semi: fix build dependency
From:       Daniel Borkmann <dborkman () redhat ! com>
Date:       2014-03-31 22:26:13
Message-ID: 5339EB85.4050308 () redhat ! com
[Download RAW message or body]

On 03/31/2014 08:55 PM, Richard Cochran wrote:
> On Mon, Mar 31, 2014 at 11:02:21AM -0700, Alexei Starovoitov wrote:
>
>> Richard,
>> thank you for suggestion.
>> oki-semi depends on ptp, so it's cleaner to move ptp_classify_raw there,
>> instead of making it unconditionally available in net/core
>
>> Daniel,
>> timestamping has its own copy of PTP_FILTER, since timestamping
>> doesn't depend on ptp and I didn't want to add circular dependency,
>> since some of ptp pieces depend on timestamping, but not the others
>
> We don't really need two copies. As long as you are refactoring this,
> why not reduce it to just one filter?
>
> Something like
>
> #if defined(CONFIG_PTP_1588_CLOCK) || defined(CONFIG_NETWORK_PHY_TIMESTAMPING)
>
> ... code here ...
>
> #endif
>
> could go into filter.c or somewhere else in the stack.

I'd move that code into it's own file e.g. ptp_classifier.c and while
at it also remove PTP_FILTER stuff from the header file entirely and
hide it all locally in that file. I will cook something tomorrow.

Cheers,

Daniel
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic