Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp56219lqe; Tue, 26 Mar 2024 20:36:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXpaaReuLsxmJ/qoD2dUaR3FbCiXF0kXBouyB1+06EG9tTy4k111P20enN7efogXRQ/6Tn4Gid3dKpvCz1Jkf5t5A+DXZ4yu/pOF1K3dg== X-Google-Smtp-Source: AGHT+IEVS97o+OX6EJsaJukZtUBJWBxgJq57OcbVhVtcnkxB1un6r6yKi4ae7lFr7wTC2XKtztgv X-Received: by 2002:a17:906:4a1a:b0:a46:aed5:2552 with SMTP id w26-20020a1709064a1a00b00a46aed52552mr8448972eju.45.1711510593750; Tue, 26 Mar 2024 20:36:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711510593; cv=pass; d=google.com; s=arc-20160816; b=sGBN5Z2kbYm5ApoAdCWsCBMyU1V15B7es+zClDD1oE3bXpYvftBGLodUm9mDP/9fCP zGBfrpHhoihtZOsjitn1EP8G2iiKzvlGUW2Tt0WykXHFRTMuIaxOJsb3gmcfNXeBVrWu Q/kH1hz/xR3vW+59wDi9WD0lA7h/XBAWk3wZO40c5abPLn6cydlDRk01HoaNLSqYKwmY GsdAc48TJpVyaYdn+SIvLbuYjtDn/xOLD8GwElhQtnj9zj45BnPP806uPQQm1kuFVdCu Mdz7isCPNnXeniSjsQ+Z9dmnKz6IHRpt1LUR0lmX1wMijm05UHvcfe6/eZALoTh0jPvD ZseA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/3g8+gcN/N/fkBBn2xX9LbNNMGPt0xdxXZxOaqbWxH8=; fh=Wh2RuoOmoXeaLe2hheHXya/2k5mtY5fODgY9LgUeOs8=; b=F7fsvbzSsUIWCdGUP/DJHo1QxkBKlKFqc25qmES0BQJmbsuxd1GQ6HvA2Cvp6ptZz/ qTzVornAcPxYWwpL6Ig7PO6Ai5WWyU+gBm/OkwQM+wBx1getvYqzJsxQMtd8lXijFZDt NaRK/IfJh21V9omyXIOY8i2nqs/3zdj4pqkQNMXB5+aSYj+QwssajiRyn8dfuIldghAW HAaRHCwBd8fpuKF1We4XzSRo1kt/WcpLxXoihQqqqvf6jHseR8YqSfSc4tUlgn6cRqKo Gb6O5ExrojW/3ixUSlisk0J8fvIz998Mu+qdUIVwWEekaYs3U+PTBXfn5OS/0IK+VQY8 +O8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=TjUIK2c6; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-120265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120265-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id kl18-20020a170907995200b00a48f582b4b1si2644062ejc.73.2024.03.26.20.36.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 20:36:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=TjUIK2c6; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-120265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120265-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7B3B01F2E47D for ; Wed, 27 Mar 2024 03:36:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 198A322EF3; Wed, 27 Mar 2024 03:36:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="TjUIK2c6" Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 381D1380; Wed, 27 Mar 2024 03:36:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.148.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711510584; cv=none; b=Sz5q6se6ZZ++lIqqzvZNbDtoEQqkRgbtXPkNB94R9izka5uySqK0JQfcwdlcjTzBo1Xwgpw3aAOQabbCh70fO6M1GK8vK4+j/AxB6H+y2Enu8+M2wSoKS/pkUc8lgRxk7hVjgoU0BuJSZgX8V/Il3c1r9vKnp3KPyoRz6USRviQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711510584; c=relaxed/simple; bh=ELn58N+L0xZPkRNnH2tXMHqdiTIRFhrdZS8Co23GSYE=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r4CPhQmT9KMxkjXEA/B7dJLwCkSEn+0LnDfEvbDzYm9Wa1C8f5BYe9JFTiVvfDyka3XDOqSu9CpxaiYwH6MY6KPX5VRQejXI3ie8qmlyiodzIx21PK3fklJac/Ino104gswMiO4E2VVrr101qy81niYO3/FFCFuRBpqwYczMcGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=TjUIK2c6; arc=none smtp.client-ip=67.231.148.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42R2QxMh000777; Tue, 26 Mar 2024 20:35:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=pfpt0220; bh=/3g8+gcN/N/fkBBn2xX9Lb NNMGPt0xdxXZxOaqbWxH8=; b=TjUIK2c6AEnSxCK1i/ej+oHRMvHhCCtQsX0Hxh X9E0HOg3JIjh5Y67QTWFjwvAAh6Q0l20AUaqFg11o5cWEhzu+mkLpHKrP8hKV9nU U5Bjg+fWXTgmoIWlmLaXITIfVwr6jhsbuaks1XmJLeLWAjBIXzLdNRDh5XlpmKqN 5mBwmjGegHFNgZa94k5BdYnsEmKtPx0EsMbPINQfNI48SJ9D6vI9DQkO/EODyDVn nBMSEzJ/v3EHplULRG2l2FfDqGrbSg9Yqq9Op3yU8QR7TqPpvKYAEpFFCGRKNQMU bJaW3KfisNl6xK6svMlaDZNbeY5aS7+Hlo9ATRQmT1y/IL0Q== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3x4ap806nf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Mar 2024 20:35:20 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 26 Mar 2024 20:35:19 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Tue, 26 Mar 2024 20:35:19 -0700 Received: from maili.marvell.com (unknown [10.28.36.165]) by maili.marvell.com (Postfix) with SMTP id 1CAB63F70C2; Tue, 26 Mar 2024 20:35:13 -0700 (PDT) Date: Wed, 27 Mar 2024 09:05:12 +0530 From: Ratheesh Kannoth To: Lukasz Majewski 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: <20240327033512.GA1371300@maili.marvell.com> References: <20240326090220.3259927-1-lukma@denx.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240326090220.3259927-1-lukma@denx.de> X-Proofpoint-GUID: TMpQI2rxpqqFpSpd-C4xTzuUy0S4KnaZ X-Proofpoint-ORIG-GUID: TMpQI2rxpqqFpSpd-C4xTzuUy0S4KnaZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-26_12,2024-03-21_02,2023-05-22_02 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(ð_hdr(skb)->h_source, port->hsr->macaddress_redbox, > + ETH_ALEN); why not ether_addr_copy here too ?