lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 23 Oct 2017 16:27:20 +0200
From:   Egil Hjelmeland <privat@...l-hjelmeland.no>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     vivien.didelot@...oirfairelinux.com, f.fainelli@...il.com,
        netdev@...r.kernel.org
Subject: Re: [RFC net-next] net: dsa: lan9303 Cpu port and ARL

Thanks for the response, Andrew!

On 23. okt. 2017 14:58, Andrew Lunn wrote:
>>   #include "dsa_priv.h"
>> +#include "../../drivers/net/dsa/lan9303.h"
> 
> Don't do that. Export the needed parts in an include file in
> include/linux.
> 

Do you mean moving struct definitions from drivers/net/dsa/lan9303.h to 
a include/linux/lan9303.h? That would be like 80% of
drivers/net/dsa/lan9303.h. I am a bit surprised that is deemed better
than the slightly ugly include.

Or do you have other suggestions?

One possibility could be to have lan9303_tx_use_arl() in
drivers/net/dsa/lan9303-core.c. But it has to be exported, and can
not be inlined.

It is also possible to replace the  chip->is_bridged term with:

   struct dsa_switch *ds = dp->ds;
   if (!dsa_to_port(ds, 1)->bridge_dev)
               return false;
   if (dsa_to_port(ds, 1)->bridge_dev != dsa_to_port(ds,2)->bridge_dev)
               return false;

But it feels silly to duplicate that calculation in the data path.


> Otherwise, i think your approach is O.K.
> 
> 	   Andrew
> 

Egil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ