Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1406698lqb; Thu, 30 May 2024 09:13:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqKGkGlKIR+8Ekb4/G0ijwVh3x4yopWCO4yXTHu9+EvtTK0B5Ayc//1v8umPK7H3kvZ4hANSxVjV10oIJM0Qf4jyX39tX5fJLWbSBa8A== X-Google-Smtp-Source: AGHT+IF3yp3Ga/2C2chCkf3fvs8N6/tcMQSLg/2hWuHl0Ph7Z4elhvm9GiOfsE8CYECIT76+h6rU X-Received: by 2002:a37:ef19:0:b0:792:c13a:1a80 with SMTP id af79cd13be357-794e9dba937mr266971985a.44.1717085623364; Thu, 30 May 2024 09:13:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717085623; cv=pass; d=google.com; s=arc-20160816; b=JWT7ZRKHN7gxA2zBoZBpEIwR1aLrR4qVVwMF8aOwEFybeQjy/srcc1Pi3iIaiCahHl Ke+z9lbLBsCWrplXwx+4+y4ib5sEbyRDSe+FTebiTyvKCKaNbB99e/D56oX1DTIa7csD O7tENQro45cedq8vk7Dbt0yM1uJ3o8PxiQZ0YpOTaZyGCMAdjJS93lgg5CIbwlbcwyQm kDUbjYbS72ayl22lvSBg9bQx5OorYvC1RMkkIJcMk2Pg+pQTAyp9C4fnKze1hjZf9ScB anrSG9cYWpvU3XCL+YjZGi3Q8fHoAD6Rd4PhAJnkblXh5xn/EhrjLRbBJfIcl7FPHhNb 7VlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=PfJbQricCfe6xXO/btTWODyoQHxmmR7NyBEvK16OrTA=; fh=RHEJtz8WlKz41PCc0R2pw5tlZFLrSI3T579tCL6gBz4=; b=C3amz9H3rEBINs0yvS1JrHvd72gVcADmjywSK4yxlSpgoR7xZ8wmbB3jFxWW+nluaF 1/iW3ZBjU3WjG0wW/goLpZjIWyRZ8ClyR0disO7sompIBDm68Rt+HxNmhd8wir8xV5kz Es9Ub8lpnV/98A9PxZru057Qejg5T/OHlzVgNpqiwFjQ3rydLz2MxeUZUpE9E1i5zGuM 6WlCw/HFFv4ORN2Gj1wsCGc6K3l0V7yUjO74ndxtF9SDNtoKURyjFrP5krz/mLgxkOTm OKulxiHBtQyWwP3CvqY4bb5nxrhSRBi6/dc5groj7kEEY1PkLuLe9lYMgfa1snAaXoI+ UkiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WK48dhGa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195642-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd607b9si1690977785a.756.2024.05.30.09.13.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 09:13:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WK48dhGa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195642-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 0F2761C223F4 for ; Thu, 30 May 2024 16:13:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E0BF224DE; Thu, 30 May 2024 16:13:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WK48dhGa" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 728CE24B29; Thu, 30 May 2024 16:13:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717085612; cv=none; b=rnJvT3gl1+wGhMepD9UEvoZrN+/kEm6nOgCUejuITWJMBlQCYEiIckufkq4ZUKNTllRaTKebe3Hac8nq0ZtdqZNsf3E4opq91f6SApz6kGGe7JbHdJnQqvNoB/kJhl0KwcBSD624pMIlJ/vXIGttpsDP24EpHBhiVjJ5/AWRQU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717085612; c=relaxed/simple; bh=PfJbQricCfe6xXO/btTWODyoQHxmmR7NyBEvK16OrTA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sXj2qp0fAyy24mTvmeeKrRxZLMnQa81NJwEai5dVPCys8+b211kbGXieJ6S5G0NelJAXudpjSBnhxTRmj/Iibmqggd0sMP8j/VPQHMpsaX+y1a0L/t0BhXqD5CjSfmez2Ot4q9g5iSbK9ZK+eWj5IAYyiv1s+oyVb5C/Stiukrk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WK48dhGa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B350C2BBFC; Thu, 30 May 2024 16:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717085612; bh=PfJbQricCfe6xXO/btTWODyoQHxmmR7NyBEvK16OrTA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WK48dhGa24x2IlutQf0BRwlTmhjcJlIUaUgtVU3SxywObeSgfOJGvUMWBMScFTAZd ISDSGqUTgClDZZTlYoGtEf/UlzzFy6UaOtFHAPMLMSt6tdRgF92PHNHBBmMFk3zdHN yxJobDk4Afff/dA5r5fsiYOhGbD/zTIms4wkhdDAotURS+wxmbKq+76k7fDHnwrRFw lSLl1g/OXNSmV36nqyWL/3hN6l9oYgI9iRMwmcIQBbiU6L8ccc7dAv3lMdsmNkcZIG CFUfsxqHZkfCtM88aDNPUJjZn/N8RZvJikGOTNXk5cIK/kzYUWyTuX/5bmFRR4OmAB Wcoq2bkwa8kmA== Date: Thu, 30 May 2024 09:13:30 -0700 From: Jakub Kicinski To: "Russell King (Oracle)" Cc: Vladimir Oltean , Xiaolei Wang , Andrew Lunn , alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [net v2 PATCH] net: stmmac: Update CBS parameters when speed changes after linking up Message-ID: <20240530091330.13a20fdc@kernel.org> In-Reply-To: References: <20240530061453.561708-1-xiaolei.wang@windriver.com> <20240530132822.xv23at32wj73hzfj@skbuf> 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-Transfer-Encoding: 7bit On Thu, 30 May 2024 14:40:30 +0100 Russell King (Oracle) wrote: > I think what you're proposing leads to the hardware being effectively > "de-programmed" for CBS while "tc qdisc show" will probably report > that CBS is active on the interface - which clearly would be absurd. FWIW the "switch-offloaded" qdiscs do support reporting that they got "de-programmed" given that more complex hierarchies can easily go out of what HW is capable of. They call the driver from the .dump callback, nominally to get stats (e.g. red_dump() -> red_dump_offload_stats()) but it also refreshes the offloaded state (see qdisc_offload_dump_helper()). For "NIC-offloaded" qdiscs (i.e. all traffic passes thru the host, rather than being forwarded) the stats callback makes less sense. But all this is to say that there _is_ precedent for clearing qdisc "offloaded" bits.