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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 27 Oct 2021 11:46:08 +0300
From:   Ido Schimmel <idosch@...sch.org>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     netdev@...r.kernel.org, Ido Schimmel <idosch@...dia.com>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Roopa Prabhu <roopa@...dia.com>,
        Nikolay Aleksandrov <nikolay@...dia.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next 8/8] net: switchdev: merge
 switchdev_handle_fdb_{add,del}_to_device

On Tue, Oct 26, 2021 at 05:27:43PM +0300, Vladimir Oltean wrote:
> To reduce code churn, the same patch makes multiple changes, since they
> all touch the same lines:
> 
> 1. The implementations for these two are identical, just with different
>    function pointers. Reduce duplications and name the function pointers
>    "mod_cb" instead of "add_cb" and "del_cb". Pass the event as argument.
> 
> 2. Drop the "const" attribute from "orig_dev". If the driver needs to
>    check whether orig_dev belongs to itself and then
>    call_switchdev_notifiers(orig_dev, SWITCHDEV_FDB_OFFLOADED), it
>    can't, because call_switchdev_notifiers takes a non-const struct
>    net_device *.

Regarding 2, I don't mind about the code change itself, but can you
expand on the motivation? Is this required for a subsequent patchset you
plan to submit?

> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

Reviewed-by: Ido Schimmel <idosch@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ