Re: [PATCH net-next 1/7] net: dsa: hide dsa_uses_tagged_protocol code

2017-05-30 Thread kbuild test robot
Hi Vivien, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Vivien-Didelot/net-dsa-tagger-simplification/20170531-032911 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubuser

Re: [PATCH net-next 1/7] net: dsa: hide dsa_uses_tagged_protocol code

2017-05-30 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Tue, May 30, 2017 at 11:56:30AM -0400, Vivien Didelot wrote: >> Hi Andrew, David, >> >> David Miller writes: >> >> >>> +bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst) >> >>> +{ >> >>> +return !!dst->rcv; >> >>> +} >> >>> + >> >> >> >> Y

Re: [PATCH net-next 1/7] net: dsa: hide dsa_uses_tagged_protocol code

2017-05-30 Thread Andrew Lunn
On Tue, May 30, 2017 at 11:56:30AM -0400, Vivien Didelot wrote: > Hi Andrew, David, > > David Miller writes: > > >>> +bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst) > >>> +{ > >>> + return !!dst->rcv; > >>> +} > >>> + > >> > >> You need to be careful here. This is in the hot path. E

Re: [PATCH net-next 1/7] net: dsa: hide dsa_uses_tagged_protocol code

2017-05-30 Thread Vivien Didelot
Hi Andrew, David, David Miller writes: >>> +bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst) >>> +{ >>> + return !!dst->rcv; >>> +} >>> + >> >> You need to be careful here. This is in the hot path. Every frame >> received uses this code. And think about a distro kernel, which might

Re: [PATCH net-next 1/7] net: dsa: hide dsa_uses_tagged_protocol code

2017-05-30 Thread David Miller
From: Andrew Lunn Date: Tue, 30 May 2017 17:01:44 +0200 > On Tue, May 30, 2017 at 10:21:25AM -0400, Vivien Didelot wrote: >> Hide the implementation of dsa_uses_tagged_protocol in dsa.c since this >> helper will be extended to access the opaque dsa_device_ops structure. >> >> At the same time, f

Re: [PATCH net-next 1/7] net: dsa: hide dsa_uses_tagged_protocol code

2017-05-30 Thread Andrew Lunn
On Tue, May 30, 2017 at 10:21:25AM -0400, Vivien Didelot wrote: > Hide the implementation of dsa_uses_tagged_protocol in dsa.c since this > helper will be extended to access the opaque dsa_device_ops structure. > > At the same time, fix the checkpatch comparison check: > > CHECK: Comparison t