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:   Thu, 26 Oct 2017 13:55:19 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     Alexander Duyck <alexander.duyck@...il.com>,
        David Miller <davem@...emloft.net>,
        Netdev <netdev@...r.kernel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>, mlxsw@...lanox.com,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Michael Chan <michael.chan@...adcom.com>,
        Ganesh Goudar <ganeshgr@...lsio.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        Saeed Mahameed <saeedm@...lanox.com>,
        Matan Barak <matanb@...lanox.com>,
        Leon Romanovsky <leonro@...lanox.com>, idosch@...lanox.com,
        Simon Horman <simon.horman@...ronome.com>,
        pieter.jansenvanvuuren@...ronome.com, john.hurley@...ronome.com,
        "Duyck, Alexander H" <alexander.h.duyck@...el.com>
Subject: Re: [patch net-next 2/4] net: sched: move the can_offload check
 from binding phase to rule insertion phase

On Thu, 26 Oct 2017 17:40:19 +0200, Jiri Pirko wrote:
> Thu, Oct 26, 2017 at 05:29:08PM CEST, alexander.duyck@...il.com wrote:
> >On Wed, Oct 25, 2017 at 11:07 PM, Jiri Pirko <jiri@...nulli.us> wrote:  
> >> Thu, Oct 26, 2017 at 03:01:31AM CEST, davem@...emloft.net wrote:  
> >>>From: Jiri Pirko <jiri@...nulli.us>
> >>>Date: Wed, 25 Oct 2017 16:34:58 +0200
> >>>  
> >>>> From: Jiri Pirko <jiri@...lanox.com>
> >>>>
> >>>> This restores the original behaviour before the block callbacks were
> >>>> introduced. Allow the drivers to do binding of block always, no matter
> >>>> if the NETIF_F_HW_TC feature is on or off. Move the check to the block
> >>>> callback which is called for rule insertion.
> >>>>
> >>>> Reported-by: Alexander Duyck <alexander.duyck@...il.com>
> >>>> Signed-off-by: Jiri Pirko <jiri@...lanox.com>  
> >>>
> >>>I agree with Jakub's feedback, if every callback has to make this check
> >>>why not just do it in the core where the callback is invoked?  
> >>
> >> We cannot add it to the core. The idea of the block callbacks is to get
> >> independent of the "dev". For the block sharing, driver registers one
> >> block callback for multiple devs. Core has no access to "dev".  
> >
> >If the plan is to have one block represent multiple devices are we
> >then looking at the offload flag potentially being tied together for
> >all those devices then at some point in the future? I assume that
> >means that this workaround will have to eventually go away for some of
> >the Mellanox devices since it wouldn't make sense to have a netdev
> >pointer if the context block supports multiple netdevices. Do I have
> >that right? If so, is the idea to just assume the offload is always-on  
> 
> You do.
> 
> >(fixed) or do you have some other idea in mind for how to deal with a
> >feature that is controlled globally for the device versus a port?  
> 
> I plan to check the offload feature flag for all ports that share the
> block and allow the offload only in case all are on.

Clearly we draw the line between what should the responsibility of the
driver do and what belongs higher in the stack differently :)

> Also, there would be forbidden to turn the offload flag off in case
> there is at least one offloaded rule for the block. This is how mlx5
> does it.

My grep-foo fails me I only see that check in nfp.  I though John
already did that in ixgbe.  And then everyone copied, since it's
sort-of UAPI?  Or at least users may come to expect certain
consistent behaviour.  Same story for phys_port_name for representors,
and OpenStack expect certain names by now.  That copying of behaviour
concerns me, not necessarily multiplication of code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ