Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp438808lqp; Wed, 22 May 2024 08:53:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmNF9EqHvwG5PWNHjiSIkF9MrrDEF5vW2DUNBGxqt47D6XYRV7EyCLA+ihrvHhmyjwdqGK5VnLkjH8oh8cg8FDTLvv2d3dHzWt7jFUqQ== X-Google-Smtp-Source: AGHT+IH0qqwd9UnLNeSnpw6qLTC/+NkM2xHxscUxr1tktB921P8kYttyY7jruksIFfOnpyyttS78 X-Received: by 2002:a17:902:d4c7:b0:1e5:3684:617e with SMTP id d9443c01a7336-1f31c9f4dcfmr27782745ad.52.1716393233888; Wed, 22 May 2024 08:53:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716393233; cv=pass; d=google.com; s=arc-20160816; b=b5cr4IweoFrkaz8+hp0Aop24+4GrQPSG8aMIIh+5HJzWonKleSq+jYhho+cdu8fyXe eI3d6BZE7xaun4QCvqF2zHNvYRFN1iXyvlCQTpbjlDpWPTUnj8Y3SCcEsMzgjQRosa1S bqkh2HA6WbwJcIbgDo7DGEmdqEkaYmRIP1kjdsTwiEoYD9rbiAGIotHi9UWYiVuoCAAo I+BMrQRktKYYjUgVhTdQMMteeTGuqoi+hKz5xt3tOQOOnwiHSjgRPLXLKitaTukodJOn rKjjnGp9jJwbah90+vi5y/nxFk/yn9C/0+Q8K2k+Lu4CpnGKMKXEJIe7h+KFNGZCpkgC MkLA== 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=j5KF2SIwMMUsmBk9Du88oWOyPQVZe4acFlw2uIjhA8E=; fh=DB5yUXOhRg8cl/G2+VBxKNleqW5Gby7uwQrP/0HdStM=; b=r0CNdqgfOuHixWJdmd2egT6RO0ZZC127RVD+NUxO2KphOI4iZRKk+WwGzpJ4NxBPh8 0+NSsH7RyXED7V24W+vEHo3isDT84hjCVIV1nwE/wQ9ayTlJO1waPhC30ctPA06AJje+ pEqNzj7xT4+K7Be311Z0OuczLnwOV5TfTmIeY9p2EdoXs4hvM5IyN72P6XvsCe9TlyVv snmbkmyayKx27lpgtoyys6etC+cFH14UntzFiV/k8zFRsBu2IZw8+tR8nYSiw9piyGcG NSnR8Cr7duTiOgTYfAueU0QuN/cn5KSg8dQMgCwibTKfIWsbqKtth6yclwTzj0a/EPIo ueZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=TtrNXMGS; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-186465-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186465-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bad7e16si65407855ad.180.2024.05.22.08.53.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 08:53:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186465-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=TtrNXMGS; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-186465-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186465-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 87291281DA8 for ; Wed, 22 May 2024 15:53:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 668CD140E40; Wed, 22 May 2024 15:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="TtrNXMGS" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 90EAA7D3F6; Wed, 22 May 2024 15:53:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716393219; cv=none; b=PopDoGgiHIgs1sTck57RrXE/+ovgEyZik3kQG0JpTCGBimv+P9/N9XMDhpwx67Zu0mDnfzmXJiQ6/9hh9Fm7o1veS7bX9UGLm4ws4sLi0kmF7uqHJOHhRo974Slg5RLKBoDcqsirvWfLezfE8+rvTqufUCLJM6wvN9tEm6jB4ew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716393219; c=relaxed/simple; bh=WUg7cWo8ckg1ReqpxXpypAGfoa4UdjEWcL6ggvPK+mU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UYoVzy+MvdfM4YqBlpCIRo0oYquKv53dCJSDu7nB6Npp67jwyrVDtUggsqnlFgB2imtpudNCIJQeFQnkLpdhWbYhmXsUhPFUkU2FN9KcSby/nbK8FlywFEbc/EreqZctrUoGFrXGBkthnWrjPMVuOuW0t9J3IPfhsooUFhnzASM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=TtrNXMGS; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=j5KF2SIwMMUsmBk9Du88oWOyPQVZe4acFlw2uIjhA8E=; b=TtrNXMGSZXxbfjvZlyb7UD1p1e gCVzFts2eOx/Jq2AbgyFBjnQAWjQusdyLYU50yJvV6yF1uRE+OXSK44q4lrXEU5P65Hyjora0ePgl Au5h9RUqLdXvzlJLCJ6KaawHvgIYPxRpLSYJ7Z1TiqGGEFWdqKshpV2nbVkh+0BFGPJs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s9oHS-00FphM-GL; Wed, 22 May 2024 17:53:30 +0200 Date: Wed, 22 May 2024 17:53:30 +0200 From: Andrew Lunn To: Larry Chiu Cc: Justin Lai , "kuba@kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "jiri@resnulli.us" , "horms@kernel.org" , Ping-Ke Shih Subject: Re: [PATCH net-next v19 01/13] rtase: Add pci table supported in this module Message-ID: <0ec88b78-a9d3-4934-96cb-083b2abf7e2b@lunn.ch> References: <20240517075302.7653-1-justinlai0215@realtek.com> <20240517075302.7653-2-justinlai0215@realtek.com> <97e30c5f-1656-46d0-b06c-3607a90ec96f@lunn.ch> <7aab03ba-d8ed-4c9c-8bfd-b2bbed0a922d@lunn.ch> <5270598ca3fc4712ac46600fcc844d73@realtek.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; charset=us-ascii Content-Disposition: inline In-Reply-To: <5270598ca3fc4712ac46600fcc844d73@realtek.com> > Thank you very much for your clear reply. > > As I mentioned, it works like a NIC connected to an Ethernet Switch, not a > Management port. > The packets from this GMAC are routed according to switch rules such as > ACL, L2, .... and it does not control packet forwarding through any special > header or descriptor. In this case, we have our switch tool which is used > for provisioning these rules in advance. Once the switch boots up, the > rules will be configured into the switch after the initialization. With this > driver and the provisioning by our switch tool, it can make switch forward > the frame as what you want. So it's not a DSA like device. How does spanning tree work? You need to send bridge PDUs out specific ports. Or do you not support STP and your network must never have loops otherwise it dies in a broadcast storm? That does not sound very reliable. There are other protocols which require sending packets out specific ports. Are they simply not supported? > In another case, we do have other function which is used for controlling > the switch registers instead of sending packets from the switch ports. > At the meanwhile, we are investigating how to implement the function to > Integrate into switchdev. In general, we don't support configuration of hardware from user space, which is what your switch tool sounds like. We will want to see a switchdev driver of some form. It might be you need to use VLAN overlays, using net/dsa/tag_8021q.c. Each port of the switch is given a dedicated VLAN, and the switch needs to add/strip the VLAN header. Its not great, but it does allow 'simple' switches to have basic functionality if they are missing header/dma descriptor support for selecting ports. Andrew