Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp157242lqe; Wed, 27 Mar 2024 01:40:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVB43ytTiWkUnxAlCA8DWO0IjzDoyj2ynsZb3btadQwLXmdEup0U4HqWeyOfUs0/vc9UpOjw7111qgKVD4U5ERI4H/34y4GuCXxPzPtvg== X-Google-Smtp-Source: AGHT+IGhGCUYo1OQoIYyGUxrqLx2q4jJ1asZTvcRiCIns8j9LBiAjHUW8NNgMiHCKD28/kANadUA X-Received: by 2002:a05:620a:5748:b0:78a:1327:13b2 with SMTP id wj8-20020a05620a574800b0078a132713b2mr3409329qkn.26.1711528844728; Wed, 27 Mar 2024 01:40:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711528844; cv=pass; d=google.com; s=arc-20160816; b=bsaicCT5CtcFkVH3glUgLZJnVokXsZZaGFsk52cKZtbk9gzlUs145cJ/le8ZabAVLI /cL3xpKCdM5W/5IeJPVFLW/SPH6hZN7TB7fHP2xPpmiCPvSVu1AzL92i6v6bRtbjIVMe C1l6UYn+69qRxWFTfngrcbK5UULZm1vo0uDDU4LVhYpddqbVU+Q9ZdwPm6Sdgf8DrS63 MykpNhdUteJrDMSDw1uSKRcyYvq7L/+kmeogUkCWa6/DhbUBZw34Q9l9M8XFrYpORxTM c8w9mPJjMP60zkKkpnPJLALjvvXYlqJR8yeznt8FWS3l+AwTklm1UB5kk44KKneUWxhD Sm2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=Q8ShEKulJS2t/RaIJVmNPYxB7tPMAJ4wYuwJT4NRjz4=; fh=YYp4gHl/ifJ3IX2srmmDSt9LJw4rw186gw4jZZufqO0=; b=R0aM27bm6wD5s2MKAED+BsiPpfcZcIHYFsly5UF3JJICSse28BVwHaeMN6QGwMN5Vw SStAiYvBz+gJix4SNgivRMLMb+LJJIj9eK+6JU8ZcLqqKI3R0euX9llB0BNwa0fht1fO eqXELjujJgeWb92yt97wZ6F+YGi5+xAS/+odABTNnMUWI/KntASNIsp57fJ932wfmBkp eWNvUoSfLJtWuGbU61VCyIuryxFl620HhC+1s2asT6V4IQ0p/c65wFhTQlsvpM9lm+F+ uM2noSWbhF4lRgpNw4bitGefKZF/3i9MQJRgo9RPhAJDLxpn5JytWtmDiNcHqQ9N8OI0 YH0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=yvd26rQF; arc=pass (i=1 spf=pass spfdomain=denx.de dkim=pass dkdomain=denx.de dmarc=pass fromdomain=denx.de); spf=pass (google.com: domain of linux-kernel+bounces-120556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120556-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x25-20020ae9e919000000b0078a32fede53si9266836qkf.318.2024.03.27.01.40.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 01:40:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=yvd26rQF; arc=pass (i=1 spf=pass spfdomain=denx.de dkim=pass dkdomain=denx.de dmarc=pass fromdomain=denx.de); spf=pass (google.com: domain of linux-kernel+bounces-120556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120556-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6FF8D1C25293 for ; Wed, 27 Mar 2024 08:40:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8736364A7; Wed, 27 Mar 2024 08:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.b="yvd26rQF" Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CD0536133; Wed, 27 Mar 2024 08:40:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.62.61 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711528827; cv=none; b=c4LFchDNTVgM5ZotEw22l2xP8jFfUlxsGM+dESyFco4ArbpXUuWCLVuOGUSKDsmHse27Jpzlu4td9miq+ji2H7OZrhM/Mmnt7BjRAwCdZw2l6Ar6t3VxRtzp6GTv8sa7IYkGITv2KMitgNb8wQBSw9EjzJryNOKWqgXnd5in2K4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711528827; c=relaxed/simple; bh=2cHvX2C1EUb4ZihP2jus1JA5EJeiOZXe6b2Yw+HyARA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ck2/PH6lUSz6NXN+4e7LSuMy072CZgC6CJsYvYI/PUuWoOJSyWayYOgny9NEwDSDbNXaSHasbt4vLs79yTt0DU1SCg5DKttk7AqkKYF7tGBPrjxz/cOeeXF7uvdmHMfL4994GU7i7caJT27UaraIiwClG4zUXOl8+2xz3B1sv9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=denx.de; spf=pass smtp.mailfrom=denx.de; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.b=yvd26rQF; arc=none smtp.client-ip=85.214.62.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=denx.de Received: from wsk (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 489DD8803A; Wed, 27 Mar 2024 09:40:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1711528823; bh=Q8ShEKulJS2t/RaIJVmNPYxB7tPMAJ4wYuwJT4NRjz4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=yvd26rQFjPQKq/wEIkNDNEs5+3WaGPNlf3CKXDfkTUJWlIwxp2ajGHKpUKylonGzJ YU0KYsb1oU1Ufo7w6CGHZoQmAkOMcSS2KYHxQPVQFqcodTNU/IOJTIFsY08HTS1wNK Q/QaJW7Qo+8JwYVAX9B5aK4Bh9jM6hXhcdp4AzlTBaVjnYgka+f+bcm/6YepttIWyZ s45y3Yadualx+VUyJ/3RTDk2ZWstliEtrU1SNPPAIYI4J1J4p9lPPT7aCXzeU9v5jS bp2n5h9SCVH6uC8uu8VAGB7MNgbeNyje2akPviUXjE6WWRG2lMeeydKhajoExrezE/ N97HFI9ubdc2w== Date: Wed, 27 Mar 2024 09:40:15 +0100 From: Lukasz Majewski To: Ratheesh Kannoth Cc: , Andrew Lunn , Eric Dumazet , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Oleksij Rempel , , Sebastian Andrzej Siewior , Paolo Abeni , Ravi Gunasekaran , Simon Horman , Nikita Zhandarovich , Murali Karicheri , Jiri Pirko , Dan Carpenter , Ziyang Xuan , Shigeru Yoshida , Subject: Re: [PATCH v3 RESEND] net: hsr: Provide RedBox support Message-ID: <20240327094015.3d2580b0@wsk> In-Reply-To: <20240327033512.GA1371300@maili.marvell.com> References: <20240326090220.3259927-1-lukma@denx.de> <20240327033512.GA1371300@maili.marvell.com> Organization: denx.de X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/i4=XqKExMgdCHq8s3zAcw2a"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --Sig_/i4=XqKExMgdCHq8s3zAcw2a Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Ratheesh, > 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 =3D=3D HSR_PT_INTERLINK) > > + memcpy(ð_hdr(skb)->h_source, > > port->hsr->macaddress_redbox, > > + ETH_ALEN); =20 > why not ether_addr_copy here too ? Good point. I will add it here too. Thanks for review. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/i4=XqKExMgdCHq8s3zAcw2a Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAmYD228ACgkQAR8vZIA0 zr0LUggAtzFAXWvLp8aKstfZZplKjvTGe1KpdvV/x35Zgy7CLyU91benf2V5U3y3 fvK70bzEQFLekvrZc60yXq1OMuc6toXj0p8kNf4aJAmoSs4S7+zCTrwGs33J3rV2 MSDTmU8K3foQ2PLEL9wOokriNngu9bREk58p//ABCphDsA6tx/bfOSYvNllyruiB ASkXP3ECM6aHSdmiPKd6S46hg+fgEaSjigHDX6lE5kkqSTQ3aDUtab2K7dbSQXEO GNVj3SKFKj37Yk0JdPS/AGuKBAnOTun2v6CnlGwtAYT6PP/8Hs5h4sScWPruDszX L+yBWf7zfXJUGdmYllwMjYmgWzoWqA== =/l2d -----END PGP SIGNATURE----- --Sig_/i4=XqKExMgdCHq8s3zAcw2a--