From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 5A47F3816E4 for ; Thu, 29 Jan 2026 11:20:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769685612; cv=none; b=RfRjsnfFt6pPAWB9psxN2RLXPeUus6ft2bewN9Jeld/CbhGwqJvaj6xZ3vbFDYcnxPQzznR9dkZ4Olil7OMTmoA6Z/ACR6yYbMU9o0bR78UXruNkb4dcmVtsNr+ROGY5sRDnLL3NNmEcR2cdLQAPxdNW7ox994tBpyjdP7yRTTo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769685612; c=relaxed/simple; bh=3c2UpRNRPcNADyWDct72e6Ft1GfHMTkWulKblwm+x7Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=B2yBwBhupSRV97vdiriatMse9QU/GnGpHeob14aDcwIyD3drlqpZVBbmJmpyEq16g0w3Jk0N6s/UePlxm7ICvU05ig3/HEqoOtFszHL85OGG8Fo4pukh70vrJCbI3vE4kl8b9vpSMtkkSCyNLhuE3vvdgJHUyBdNSX/5lxzx8y8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=BDCtSlPd; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=oT6m03fG; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BDCtSlPd"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="oT6m03fG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769685609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y9KAwwFiWC0huuspRlkL7Z783ifqdkU5r49JiW+Bk/k=; b=BDCtSlPdYDFR7BchcsbVKp0QxulVIwY33l1Pe1znEIKqUiCvDizFZSwuLX0XMFDie/bHEQ GsgY/qOqvM2UPvCog3FMVVACrrb5+5RHhtoCc3/pDRzNdXsOkkObnXNliGr4Oz8//rK+2M udb05fxhsrnMjEwuvjVVzdERwF5uFt4= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-167-DcePAgIyPJWlA6Hp5QYQng-1; Thu, 29 Jan 2026 06:20:07 -0500 X-MC-Unique: DcePAgIyPJWlA6Hp5QYQng-1 X-Mimecast-MFC-AGG-ID: DcePAgIyPJWlA6Hp5QYQng_1769685607 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-430ffc4dc83so1131173f8f.3 for ; Thu, 29 Jan 2026 03:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769685607; x=1770290407; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Y9KAwwFiWC0huuspRlkL7Z783ifqdkU5r49JiW+Bk/k=; b=oT6m03fGjKaHq7bcERMDLOzXeLc3YwQag2/om5v7P/U9rp3BxESf169zcEPzzgVRw7 zdtA2QZ/3HFDP4YNT1DDgKRVS6ypwTiu/+jOrBxtb2RpdKXjsP4oSTaJD0Q5TLgQptgf m9kGsUlvFgnlvY8xog1HqxXjfHZdn5kLE8InhduE63H7fiwJa2yiCIzHaNUo/a24grLn 6U8RYafXLaVDku6ai5Fp2oGNTaA7e/3zsAIZPumv5RbYT1Ou88ZwN0p4Olk4h/NryWEX 8erEJJr+izSandUBVCgAr9DCIeJlEMpKWa8Jpc9i6DVLLOLjSB+dczpadefsXP/a3yOJ c/Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769685607; x=1770290407; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y9KAwwFiWC0huuspRlkL7Z783ifqdkU5r49JiW+Bk/k=; b=eOYVaFl7SJq42CbIvXN0foHBW8A2/HirD+mdeuL2VRTq5p4paNMpLqu5XqAvspWyfe FkQHpNQgm4OlJqScZMANaV6AjRKaqdvrVG2NfWYogXVxssgNyn/O9fs8X3kZ4ED5MjcB PL0w4wVNuU6nONB6l5+Txwkta6TfBsmC/8gnGkg4f7W4vcbQZJIc/LuutaPckZ5GIuJQ iBhdoD3wHiUKBbDhR88NgFNx/KDiYxZWDWvKjfFqFiwZF7m5LYqI7xdKHmuf6cqAD0R9 4Vv/jKi6gZsGzmAxYn8tX+eASPddFE5m5Jz8ozACJy6jiG+jVwxJxK2STzciA6j7YYBG DkKw== X-Forwarded-Encrypted: i=1; AJvYcCXVd12t+rUP5sdpJFIKXn0ARl+ZywTXu3g1hDV27IYpgwj/5wSPFecwfMNnuQyWkf0Fxj6sxTtQOPnOczc=@vger.kernel.org X-Gm-Message-State: AOJu0YzVrY2bjjXhb08ByFWtVuG4bCMRgVGQaYtUROlQf6YpQh/H9SQY wzf6qpejKTT7pTf4ofm3DAMVn2FJZbmI7s3xMh0s73ido5oAveauwONY8fSmbfe7NDtK4ffNvUX 3c4LsbdL013A2qkWfXW5jOR0GPDz7gTkAjSyhHJE4HFMZCMX9rKtCNo3N/qW+h+NhNg== X-Gm-Gg: AZuq6aLsjjE+q9QYSkpDPlkp3vPNG4fzN71VLIgdGP4+YCw4eK+/DL1PSpEMmOafabe +k4/jEiesPa8KuYev/hsPXSLl/EGuM7VlbEWXtnBrVKkw58bigB3kDrJ1oJe9MdCw1e0eLlGqcw M9GgVYX1rX+62jBEzdD8zlKSCFgbLjSqC3IMpZfCZNyu5828vu5MwcOHkeD1IS9afBQxRiCr1sY XBTubK11157YvnbNUre5UxtztBJSLRFjoUgbZgnrvLapGMcAjkgtCt4Rux+3w/slCzcjrWzYgzX YHEUB6mIgQBvMePoF4pbl86R9crQzifp3LfRU1475cW8dOHkf243xqlzL+ZFYLr+K3ltZaswGMV MU5ia3GZaO+pq X-Received: by 2002:a05:6000:2312:b0:430:ff81:2961 with SMTP id ffacd0b85a97d-435dd1c8f14mr11363841f8f.51.1769685606523; Thu, 29 Jan 2026 03:20:06 -0800 (PST) X-Received: by 2002:a05:6000:2312:b0:430:ff81:2961 with SMTP id ffacd0b85a97d-435dd1c8f14mr11363779f8f.51.1769685605948; Thu, 29 Jan 2026 03:20:05 -0800 (PST) Received: from [192.168.88.32] ([212.105.153.56]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e1353ac2sm14589049f8f.38.2026.01.29.03.20.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jan 2026 03:20:05 -0800 (PST) Message-ID: Date: Thu, 29 Jan 2026 12:20:02 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 3/3] net: dsa: ocelot: check policer entry To: David Yang , netdev@vger.kernel.org Cc: Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Simon Horman , Russell King , linux-kernel@vger.kernel.org References: <20260126061340.757543-1-mmyangfl@gmail.com> <20260126061340.757543-4-mmyangfl@gmail.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: <20260126061340.757543-4-mmyangfl@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/26/26 7:13 AM, David Yang wrote: > rate_bytes_per_sec might be 0, check for it. > > Signed-off-by: David Yang > --- > drivers/net/dsa/ocelot/felix.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c > index 9e5ede932b42..fb2d02ff0fe7 100644 > --- a/drivers/net/dsa/ocelot/felix.c > +++ b/drivers/net/dsa/ocelot/felix.c > @@ -2011,6 +2011,10 @@ static int felix_port_policer_add(struct dsa_switch *ds, int port, > .burst = policer->burst, > }; > > + if (dsa_mall_policer_tc_entry_type(policer) != > + DSA_MALL_POLICER_TC_KNOWN) > + return -EOPNOTSUPP; I'm not sure this strict mode is what we want or even we can apply it now: it could cause functional regression with setup previously completing successfully in presence of 'new' params and working to some degree and now failing to start. Generally speaking some/most offloads are free to ignore tunable/parameter not available in the H/W. I think a way to opt-in the new behavior could help. /P