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]
Message-ID: <20210217103433.bilnuo2tfvgvjmxy@skbuf>
Date:   Wed, 17 Feb 2021 10:34:35 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "ivecera@...hat.com" <ivecera@...hat.com>,
        "nikolay@...dia.com" <nikolay@...dia.com>,
        "roopa@...dia.com" <roopa@...dia.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        "alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "vivien.didelot@...il.com" <vivien.didelot@...il.com>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "rasmus.villemoes@...vas.dk" <rasmus.villemoes@...vas.dk>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bridge@...ts.linux-foundation.org" 
        <bridge@...ts.linux-foundation.org>
Subject: Re: [PATCH net-next v4 2/8] switchdev: mrp: Extend ring_role_mrp and
 in_role_mrp

On Tue, Feb 16, 2021 at 10:41:59PM +0100, Horatiu Vultur wrote:
> Add the member sw_backup to the structures switchdev_obj_ring_role_mrp
> and switchdev_obj_in_role_mrp. In this way the SW can call the driver in
> 2 ways, once when sw_backup is set to false, meaning that the driver
> should implement this completely in HW. And if that is not supported the
> SW will call again but with sw_backup set to true, meaning that the
> HW should help or allow the SW to run the protocol.
> 
> For example when role is MRM, if the HW can't detect when it stops
> receiving MRP Test frames but it can trap these frames to CPU, then it
> needs to return -EOPNOTSUPP when sw_backup is false and return 0 when
> sw_backup is true.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> ---
>  include/net/switchdev.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/net/switchdev.h b/include/net/switchdev.h
> index 465362d9d063..b7fc7d0f54e2 100644
> --- a/include/net/switchdev.h
> +++ b/include/net/switchdev.h
> @@ -127,6 +127,7 @@ struct switchdev_obj_ring_role_mrp {
>  	struct switchdev_obj obj;
>  	u8 ring_role;
>  	u32 ring_id;
> +	u8 sw_backup;
>  };
>  
>  #define SWITCHDEV_OBJ_RING_ROLE_MRP(OBJ) \
> @@ -161,6 +162,7 @@ struct switchdev_obj_in_role_mrp {
>  	u32 ring_id;
>  	u16 in_id;
>  	u8 in_role;
> +	u8 sw_backup;

What was wrong with 'bool'?

>  };
>  
>  #define SWITCHDEV_OBJ_IN_ROLE_MRP(OBJ) \
> -- 
> 2.27.0
> 

If a driver implements full MRP offload for a ring/interconnect
manager/automanager, should it return -EOPNOTSUPP when sw_backup=false?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ