Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2879771lqz; Wed, 3 Apr 2024 11:05:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUX0VDJdHB3QrUkmCloq4ne67ziZkLMtTKXK0mFyqr1AGF3A418fVGeH6YwJ6IXei6Qu5ej66trByXqY77OjqhPuH1Z6ko7jeOyv3+E9A== X-Google-Smtp-Source: AGHT+IECEgxWGNGF0YaA80MwqSofLQdUteeefXD4hLIuWgZ8873MjbD2iCLJPrfgTZux9OK+U4i4 X-Received: by 2002:a17:906:393:b0:a4e:768a:1445 with SMTP id b19-20020a170906039300b00a4e768a1445mr54087eja.16.1712167559009; Wed, 03 Apr 2024 11:05:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712167558; cv=pass; d=google.com; s=arc-20160816; b=KPHWn3uUQZLLf0vG0jDHmH1XhzNO8lKpF4udlJP/Ccja3MzhKSeROgebXc3oCRLvor EXCRvGeaUDacgQ8aCe8n3JAsJhOTJnTTm4lpbL5V0eoEZMJxlT0NYUMEUBwKnoOARyvx RBULkGEOq04QRMpLbKiWuxqyhPWqrWUEUYOljEGoiGSyYBQ/OjHxiuAXdxyafPpoQ6j8 HYYR3/Nw7PQPCHfGU9Vkw4ZeG9rdYHZQsG/hyOMH1riSTboxJZb9M9h1IFzwvb5dEuGh 8wPERGLT5x7F/+GfBRHmY7OPKBIbSrQYxoCK/1HrWyIzNEdheuJzGRHPyEmqLMrBPThb gz9Q== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=A/GPjX1bC89s3pKDiOr4iTqFW1vCdSA+wrVsNDwDxNc=; fh=5eQgQPRJioCHOWRU1pVQ1NRIJ82zSynXTaLqFYswgqM=; b=DibeGGKz1y1LhJuJwfDHNwP+uDPwKsq+oskkvEnDVflk29a6vIoaA6Ae9YrA0dpDvJ heDt4ocKMS40j2QE7i6EhhW+1UJvAZpZnre2l06Sum3YqLyadIS9SlHXu3jLORChEtAl 0pvhmuqUmJtlISDsdlm/8xWlJK2uQ8TZ8P3wZxAWE2IrlRI7GSMV/iaL81yFOKHOkYoP 7oxlNld3Ke8maqQYvXw+nOCaBRZxdOS0Uk0z+tkVfRFp7vELY4dtBQwE0yVqTcp+6dCa JQdFMM2Fa5yslLTLRaZXv6UoNSkFVW6mWos3X4Jux9xOCbaBtCLCgrT+Eltr0SkFFcGn CkcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cCduND7N; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-130412-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130412-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qk35-20020a1709077fa300b00a4e2816280bsi7058324ejc.36.2024.04.03.11.05.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 11:05:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130412-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=@gmail.com header.s=20230601 header.b=cCduND7N; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-130412-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130412-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 A2B7E1F21ACD for ; Wed, 3 Apr 2024 18:03:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCA2B15350E; Wed, 3 Apr 2024 18:03:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cCduND7N" Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 82A6B433CB; Wed, 3 Apr 2024 18:03:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712167408; cv=none; b=ozhraiIgl/tI/t6+p6x2iSYp1r/T68Iqopuv9qmKh4I6s/C4gOnUtY+nyWGe6mr/fJ3M1hfI/rPoqzGksTr5X5KvWliFd3yCMjPmz78aaj/e4g6ZUuaD9jz2pSNyhir/Z52yO27ZzKjUzkSfszBBT6DeJevTob+irE028KgD3tA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712167408; c=relaxed/simple; bh=ylgZVFHrWdJiZJ1iW6APhUGogXswDFL7SuFFgkc0/po=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=S6oII9Ht/6FMcTQFv81c9TOfD9oLp/N6hEQg7CRJ9tTXP+BcSvREv4DJUFICV5wwq/Ot0R5TZ21CyU2xUxFGCDp37aBmwB8ljsKfPOwM4AL1dfM1HeBxNgVuTk/kBhu7WJ6Ivw4kB76gNl6QtHyD8yhA65rt7ajgvOKzCJY7ufE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cCduND7N; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-516bfcc76efso125269e87.3; Wed, 03 Apr 2024 11:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712167405; x=1712772205; darn=vger.kernel.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=A/GPjX1bC89s3pKDiOr4iTqFW1vCdSA+wrVsNDwDxNc=; b=cCduND7NgACZ0ze8ImTboEr7cuZryMcm+322JUUsheQtTFFZejrB46risqOE5THJIr Db+1EryOK1jDIgD67bml+433itbZTUh1OTUlC8E2guzrY6tEPHsvWV0NLP6fQECplehw NZcVMoPKXHrWnjKhXDIt+azNS0mcfftrbPSde6+TWaTiQwp2gviKPDwpL9M5QPZQPGAu A4jesV50b+lB/o602n0ffxfanQP+lxwB72pjewq+dJrCOxYokioAPEwPimpgoS9L02Fp f1vnt1dsPSR9EMABGdpwPm83w7QtCp8OD3COe751PiS+R5coOGyC7IwtNTvejfBgmBhq 6HIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712167405; x=1712772205; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=A/GPjX1bC89s3pKDiOr4iTqFW1vCdSA+wrVsNDwDxNc=; b=e1LFMymJmMROEDYL+o8c7H34Hf2IXEwlITcoelNwgNB3n6E6pA7MupwG41tQSBzwDl JjS6FHhnP55F2c2ktdDkwn1lFno+mLV5j2gctS2p+ZGb+ogFL/zN5MrcF3clY6SXvG94 6k+uwfADqRpQlJa9dEwODYdRRLwzvMKcfLBIh+YLsM98JS2GlH3ROw2OfUY1LMwpmFR8 6p0+p739u2UZ2b28+owtD5Mn9IdfGbCTpKjFMx+IR3PSMEVUfsMNZuyNaxAJgEWjmdbP K29BqvPbFDIrFaab6WlHDQbEbJa+1ZU1CSqk9GdMJS1jJFX5eBM4gfOdRJ0klhwarZxK Fnwg== X-Forwarded-Encrypted: i=1; AJvYcCUptbj1O9H+PRsjFzdvP92OaTmMzyg5dE18DuXY5/0Kb/+gb/zzhfBHsQdBFq+ujrxWCmzCDHkmU9mz+g1P+UE9Yt/VZ2BfRU8sbmI1VNcXMDdLhW28Lzrf1QY+LPJ3an7mFy9f X-Gm-Message-State: AOJu0YwWvXZC0a2JHOFEgbj4qGhWqgr7ZPZR/BNi4U0IASkSx9TMBcHo NmKibtfbXgAqBpwbiRAE9ELI6t8WMbRIXgcUZdE5CqPmWR1/rRwh X-Received: by 2002:a05:6512:20a:b0:515:bf94:cd38 with SMTP id a10-20020a056512020a00b00515bf94cd38mr153383lfo.36.1712167404358; Wed, 03 Apr 2024 11:03:24 -0700 (PDT) Received: from localhost (c90-143-176-166.bredband.tele2.se. [90.143.176.166]) by smtp.gmail.com with ESMTPSA id bi15-20020a0565120e8f00b005159412ab81sm2092597lfb.216.2024.04.03.11.03.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 11:03:23 -0700 (PDT) From: Casper Andersson To: Lukasz Majewski , netdev@vger.kernel.org Cc: Andrew Lunn , Eric Dumazet , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Oleksij Rempel , Tristram.Ha@microchip.com, Sebastian Andrzej Siewior , Paolo Abeni , Ravi Gunasekaran , Simon Horman , Nikita Zhandarovich , Murali Karicheri , Jiri Pirko , Dan Carpenter , Ziyang Xuan , Shigeru Yoshida , linux-kernel@vger.kernel.org, Lukasz Majewski Subject: Re: [PATCH v4] net: hsr: Provide RedBox support (HSR-SAN) In-Reply-To: <20240402085850.229058-1-lukma@denx.de> References: <20240402085850.229058-1-lukma@denx.de> Date: Wed, 03 Apr 2024 20:03:22 +0200 Message-ID: <86v84yfhn9.fsf@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Hi, Out of curiosity, are you planning to implement the remaining RedBox modes too (PRP-SAN, HSR-HSR, HSR-PRP)? On 2024-04-02 10:58 +0200, Lukasz Majewski wrote: > Changes for v3: > > - Modify frame passed Port C (Interlink) to have RedBox's source address (SA) > This fixes issue with connecting L2 switch to Interlink Port as switches > drop frames with SA other than one registered in their (internal) routing > tables. > + /* 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) > + ether_addr_copy(eth_hdr(skb)->h_source, > + port->hsr->macaddress_redbox); I'm not really understanding the reason for this change. Can you explain it in more detail? The standard does not say to modify the SA. However, it also does not say to *not* modify it in HSR-SAN mode like it does in other places. In HSR-HSR and HSR-PRP mode modifying SA breaks the duplicate discard. So keeping the same behavior for all modes would be ideal. I imagine any HW offloaded solutions will not modify the SA, so if possible the SW should also behave as such. BR, Casper