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, 14 Jun 2023 11:44:10 +0200
From:   Paolo Abeni <pabeni@...hat.com>
To:     Ravi Gunasekaran <r-gunasekaran@...com>, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, bigeasy@...utronix.de
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        rogerq@...nel.org
Subject: Re: [PATCH] net: hsr: Disable promiscuous mode in offload mode

On Wed, 2023-06-14 at 11:42 +0200, Paolo Abeni wrote:
> On Mon, 2023-06-12 at 15:09 +0530, Ravi Gunasekaran wrote:
> > When port-to-port forwarding for interfaces in HSR node is enabled,
> > disable promiscuous mode since L2 frame forward happens at the
> > offloaded hardware.
> > 
> > Signed-off-by: Ravi Gunasekaran <r-gunasekaran@...com>
> > ---
> >  net/hsr/hsr_device.c |  5 +++++
> >  net/hsr/hsr_main.h   |  1 +
> >  net/hsr/hsr_slave.c  | 15 +++++++++++----
> >  3 files changed, 17 insertions(+), 4 deletions(-)
> > 
> > diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
> > index 5a236aae2366..306f942c3b28 100644
> > --- a/net/hsr/hsr_device.c
> > +++ b/net/hsr/hsr_device.c
> > @@ -531,6 +531,11 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
> >  	if (res)
> >  		goto err_add_master;
> >  
> > +	/* HSR forwarding offload supported in lower device? */
> > +	if ((slave[0]->features & NETIF_F_HW_HSR_FWD) &&
> > +	    (slave[1]->features & NETIF_F_HW_HSR_FWD))
> > +		hsr->fwd_offloaded = true;
> > +
> >  	res = register_netdevice(hsr_dev);
> >  	if (res)
> >  		goto err_unregister;
> > diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
> > index 5584c80a5c79..0225fabbe6d1 100644
> > --- a/net/hsr/hsr_main.h
> > +++ b/net/hsr/hsr_main.h
> > @@ -195,6 +195,7 @@ struct hsr_priv {
> >  	struct hsr_self_node	__rcu *self_node;	/* MACs of slaves */
> >  	struct timer_list	announce_timer;	/* Supervision frame dispatch */
> >  	struct timer_list	prune_timer;
> > +	unsigned int            fwd_offloaded : 1; /* Forwarding offloaded to HW */
> 
> Please use plain 'bool' instead.
> 
> Also there is an hole in 'struct hsr_priv' just after 'net_id', you
> could consider moving this new field there.

Oops, I almost forgot! Please include the target tree (net-next in this
case) in the subj prefix on your next submission.

Thanks,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ