All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: Lukasz Majewski <lukma@denx.de>
Cc: <netdev@vger.kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	<Tristram.Ha@microchip.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Paolo Abeni <pabeni@redhat.com>,
	Ravi Gunasekaran <r-gunasekaran@ti.com>,
	Simon Horman <horms@kernel.org>,
	Nikita Zhandarovich <n.zhandarovich@fintech.ru>,
	Murali Karicheri <m-karicheri2@ti.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Ziyang Xuan <william.xuanziyang@huawei.com>,
	Shigeru Yoshida <syoshida@redhat.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 RESEND] net: hsr: Provide RedBox support
Date: Wed, 27 Mar 2024 09:05:12 +0530	[thread overview]
Message-ID: <20240327033512.GA1371300@maili.marvell.com> (raw)
In-Reply-To: <20240326090220.3259927-1-lukma@denx.de>

On 2024-03-26 at 14:32:20, Lukasz Majewski (lukma@denx.de) wrote:
> --- a/net/hsr/hsr_device.h
> +++ b/net/hsr/hsr_device.h
> @@ -16,8 +16,8 @@
>  void hsr_del_ports(struct hsr_priv *hsr);
>  void hsr_dev_setup(struct net_device *dev);
>  int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
> -		     unsigned char multicast_spec, u8 protocol_version,
> -		     struct netlink_ext_ack *extack);
> +		     struct net_device *interlink, unsigned char multicast_spec,
> +		     u8 protocol_version, struct netlink_ext_ack *extack);
>  void hsr_check_carrier_and_operstate(struct hsr_priv *hsr);
>  int hsr_get_max_mtu(struct hsr_priv *hsr);
>  #endif /* __HSR_DEVICE_H */
> diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
> index 5d68cb181695..7c5a4bda1cca 100644
> --- a/net/hsr/hsr_forward.c
> +++ b/net/hsr/hsr_forward.c
> @@ -377,6 +377,15 @@ static int hsr_xmit(struct sk_buff *skb, struct hsr_port *port,
>  		 */
>  		ether_addr_copy(eth_hdr(skb)->h_source, port->dev->dev_addr);
>  	}
> +
> +	/* When HSR node is used as RedBox - the frame received from HSR ring
> +	 * requires source MAC address (SA) replacement to one which can be
> +	 * recognized by SAN devices (otherwise, frames are dropped by switch)
> +	 */
> +	if (port->type == HSR_PT_INTERLINK)
> +		memcpy(&eth_hdr(skb)->h_source, port->hsr->macaddress_redbox,
> +		       ETH_ALEN);
why not ether_addr_copy here too ?

  parent reply	other threads:[~2024-03-27  3:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26  9:02 [PATCH v3 RESEND] net: hsr: Provide RedBox support Lukasz Majewski
2024-03-26 17:12 ` Stephen Hemminger
2024-03-27  8:41   ` Lukasz Majewski
2024-03-27  3:35 ` Ratheesh Kannoth [this message]
2024-03-27  8:40   ` Lukasz Majewski
2024-03-28 12:25 ` Simon Horman
2024-03-28 12:56   ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240327033512.GA1371300@maili.marvell.com \
    --to=rkannoth@marvell.com \
    --cc=Tristram.Ha@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=bigeasy@linutronix.de \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukma@denx.de \
    --cc=m-karicheri2@ti.com \
    --cc=n.zhandarovich@fintech.ru \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=r-gunasekaran@ti.com \
    --cc=syoshida@redhat.com \
    --cc=william.xuanziyang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.