Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1594117lqz; Mon, 1 Apr 2024 10:48:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUy0Ik19eo4SwwyH0oA6vpH+NsH1TVF3+hOTEDbMyztkPSApYrEEQSGPFpUYWo0C5mrrp++yk9HbDK4JaTGU2h6HwzOAKyTTHML8vlwhQ== X-Google-Smtp-Source: AGHT+IFcdo7al7bqu8xhQiBEXqjUyf8kHQR6Ok5EQaUUfKgBH9z6rNkGgnkUNE6oTHxNofnOeVu2 X-Received: by 2002:a0d:df06:0:b0:615:d7e:ea4 with SMTP id i6-20020a0ddf06000000b006150d7e0ea4mr1084700ywe.23.1711993716915; Mon, 01 Apr 2024 10:48:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711993716; cv=pass; d=google.com; s=arc-20160816; b=xIHayqTx83GjctryH9UPl1ZpvegUcxfN69M3VAEkJxgcj4DPaUpghY7nJYSL36tnbA lRbA4F/tE4AXHe2srIU1JhE3wXKREtZBSgVHE/e0g+M6EkRh2J+wxxrVIdUxL/hf5OQD CWcEf3ivlQv9DJ4AF/n9mAOtI2B7B7ZCRJxJgbXxfVwgK7yw/YXUPXEL9bGZPSYagm2x IipuHj7mo3AXQv7oaszKomzJkMc7c3B5JM+xLnUW43k62G4T31J3vGZzPHo00DwBp0GW 0YCGrwkDL3dS8oOzRW2jIKf8bOD6HJyrL3J4PcrNA1MHht9SjVjCbtHNwToUcvayUNvf 7Lhg== 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=zrigaZFXWcx1kCyKa9oGq8jbBkbvJ11REE5OiYoomxk=; fh=U7NVw0SW7YpGRt4Ue3c3oNCzq0s+CtenEm4J0WCgkqg=; b=pGLwMJt2VhwGtRDLxQHZAeDdO729ufYK5/Wf1kqvXHoMjcspKMJfTvdWQ7BK8fhr/z nAMKXUTJY4+BbPa3OSHRIKl9ip/uiy9jnUiCDCOjwCcqCACsV+T5OL7dbSWm4NuIyS/m J1nq3JT0GnvWq11gKs5req10GPjv0V7XTZ1Rs87AdCf8wKxde7Qe5Nbf3cBzRN2n8EXy hOboPjXkpOSImaFH674eI13MiUeSRqIxiL1+R+ZgCPYSAaWcFqw4ca9QJLBVco0jYfgL +qEHuL0VLm/I1USlj5tPPMRXU7XnmUjMkjJUCjZMQeE3fHLhfBjg4pDQr/aR3onVw/E1 RLoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C9pLrKFK; 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-126921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u9-20020a05620a084900b0078a153aa230si10100026qku.202.2024.04.01.10.48.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 10:48:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126921-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=@gmail.com header.s=20230601 header.b=C9pLrKFK; 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-126921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126921-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9FECD1C218D4 for ; Mon, 1 Apr 2024 17:48:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 327324DA05; Mon, 1 Apr 2024 17:48:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C9pLrKFK" Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 D0AD51DFE3; Mon, 1 Apr 2024 17:48:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711993707; cv=none; b=JnkkuWbKWufu8ihAvh/V6Xy9oF1nb20m3zDzr9uJImOA1+6GVX9RfGWaW8iNtsA86mRK2DeaGAJGclDZhSbDILH+0lB+phqiFVM/iNrtT8L695VRH4V5zqbhSykVqkmdxiaPXz1zV38Zb7+6F0QaRB0Ivrgd+Wdj6DUHh4zdHEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711993707; c=relaxed/simple; bh=cGKsto8joijaUzPJ36dDVYKo3X8qow71na/atRrnNpU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Znlcz1PWbKPEV/5c+HQBpSTy+geNLuDMZ3V9YfYjzOQlZm+vyDtdq38y+OynzAd70yYFibtN6swKROxPMA/uCqldGMP/2hI9wqBKbyIw0vqRQsh0Igk41OIx4pXm7dvcBTHeMoZ8vJYLV9YXC4xfrx8aNGFBhpGCmNNR2RFHXfo= 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=C9pLrKFK; arc=none smtp.client-ip=209.85.128.41 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-wm1-f41.google.com with SMTP id 5b1f17b1804b1-41569f1896dso4657445e9.2; Mon, 01 Apr 2024 10:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711993703; x=1712598503; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zrigaZFXWcx1kCyKa9oGq8jbBkbvJ11REE5OiYoomxk=; b=C9pLrKFKkKowmmrAWAlvw8JiqrxhVp3bZL3oZSZr5QoR4cCDqLfUtR3IBf4fxZfLWd pOiMGYXC4Wzjjp28/9GqzWGwP5pC3Po/TA8gKq9079yQnZN6y5EafeoAc+1uncXGs3Zx ZMmrE0ZPcL2WLW+oS04YCWLiDT17bfI4rbIMGvgWsune0IFTjKg0iiC+26pTkzcgvutp R7YwpOqZ57uHiL9/K8D/7384VwRsBuGrkSBMSDo0qsdzyn+tt13KI4DmswFAppUNkWME qy+bbiIjLbKw4K8tVaG5h9AK9RJrL0Z4nweF5KH1YE+jHqYqT0a27/7hglQogPkU/h70 /8tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711993703; x=1712598503; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zrigaZFXWcx1kCyKa9oGq8jbBkbvJ11REE5OiYoomxk=; b=F6/SQCbKyvF5NaRa/gRmmQ/OgyfgNvWK+wgLhZzL/1vcItCj717R+C/5ocMtpj/bmG 7T+DiVHok2kzc1JsNFVibWvZ3LzTPoVZqdxqHN6QL05CLyVd2d1iwQ587yCfSIl6TRT5 fcyblcvGiACgaBqlhL14rbwMXDRTHLqA01fxNsxivbSGdTle2QmKSLUmd+KWMGBrdKTQ WK28Cuu4vXl9RXIAZzR9tMVIZO+vw1n3b3N3upy00Xqg95agZa7acbTfDaLlbt3SRr6o xQx9mR29nLUPlQbrrJRx+BBtvJTVjir7tQGuTvTeFci6TOI/76XTwUMfqh7MJrz7rpJl ouqQ== X-Forwarded-Encrypted: i=1; AJvYcCXSBm2V6+08QmV8CnYS+V+2JeJQP0EcbMTTFhjS/k7KR0ihslrrOMKwN9cId/kl6KIZDVpznSIEO3PD6bf+wSgNbgr2Cl3/H/FLVwTWgjVOq67Bny69Pu0acPguHf2hCzjyj3Au X-Gm-Message-State: AOJu0Yy8EjWSRaZnlhX/R7vFuONy/VWfa9dhJu49BlCgKLrpluX1OzHk UDdKb3xdibe9krZFTIzWCDsEI7XRG6i/32g1NQrppwVyB0MOL8wS X-Received: by 2002:a05:600c:1907:b0:414:869b:dbd9 with SMTP id j7-20020a05600c190700b00414869bdbd9mr7334584wmq.9.1711993702998; Mon, 01 Apr 2024 10:48:22 -0700 (PDT) Received: from Kalray-lp320 ([2a01:e0a:a92:c660:38e3:78b9:48eb:4246]) by smtp.gmail.com with ESMTPSA id n17-20020a05600c3b9100b0041493aae77esm18603515wms.23.2024.04.01.10.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 10:48:22 -0700 (PDT) Date: Mon, 1 Apr 2024 19:48:20 +0200 From: Piotr Wejman To: Jakub Kicinski Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] net: stmmac: fix rx queue priority assignment Message-ID: <20240401174820.GA22684@Kalray-lp320> References: <20240303190339.52496-1-piotrwejman90@gmail.com> <20240311134144.7b1e1a34@kernel.org> 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: <20240311134144.7b1e1a34@kernel.org> On Mon, Mar 11, 2024 at 01:41:44PM -0700, Jakub Kicinski wrote: > On Sun, 3 Mar 2024 20:03:38 +0100 Piotr Wejman wrote: > > The driver should ensure that same priority is not mapped to multiple > > rx queues. Currently rx_queue_priority() function is adding > > priorities for a queue without clearing them from others. > > Do you know what user-visible mis-behavior this may result in? When changing priority to rx queue mapping with tc qdisc taprio command (man tc-taprio), all packets with priority assigned to multiple queues are dropped. > > > From DesignWare Cores Ethernet Quality-of-Service > > Databook, section 17.1.29 MAC_RxQ_Ctrl2: > > "[...]The software must ensure that the content of this field is > > mutually exclusive to the PSRQ fields for other queues, that is, > > the same priority is not mapped to multiple Rx queues[...]" > > > > After this patch, rx_queue_priority() function will: > > - assign desired priorities to a queue > > - remove those priorities from all other queues > > But also you seem to remove clearing all other prios from the queue: > > - value &= ~GMAC_RXQCTRL_PSRQX_MASK(queue); > > and > > - value &= ~XGMAC_PSRQ(queue); > > is that intentional? Commit message should explain why. Yes, that keeps other priorities assigned to that queue and only clears the same priorities from all other queues. > > > The write sequence of CTRL2 and CTRL3 registers is done in the way to > > ensure this order. > > Ensure which order? Looks like you're actually writing in the opposite > order than what I'd expect :S First the register you want to assign to, > and then the register you only clear from. > I meant the order you wrote: first assign new priorities to a queue, then clear them from others queues. > When you repost please include a Fixes tag. > -- > pw-bot: cr