From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CE5EACD1288 for ; Mon, 1 Apr 2024 17:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+/fK+XAQMn80GdFwU4upetYV+BBPbhAWfC9Rfv96luE=; b=4/DRQ/j9xBq06f ouOxn/42rqhULawgO4xb603lENQCjlhk3ucJonsXc8v++00J4GsLbeTw8pk4ZoNBZ/K4hSV0CwPgU JJo94cJeXV9hp0F7+NbXLb4hYJhUobJlcLyXeWSHfXwa2+DWEP2gMS3oh92IDPuDw0mwVzwtLrTSr 5xrLYSL73+rB4cX/jdyHcASB8Lub7L42aZLo4lIxv03vcm6EcKNZ6xkJjB9TupMDXTo8MDmaFYlzJ vi2V09FGInqWxzY369wxd8DU0ZwWT3Zx1mDoNY1Pe5tpshEuhRXOeSLQDzhNBKrhRN3QdEAUQpWRb Iwf93iCWllW+l4f3noKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrLll-00000008UpJ-0gZK; Mon, 01 Apr 2024 17:48:29 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrLlh-00000008UoP-3ANZ for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2024 17:48:27 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-415584360c0so12771625e9.1 for ; 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=lists.infradead.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=mBc7U5LFvPW4IeJrECuEuFCszmYzNNcd5n3XgsDHdfeyp2KA9gwxQMdnpdBWM8ZKTN TdLU0FJ6NOQUZ6iOd8oOC+v2Hgdm0k/9+L55LE3XWTnnNR877v7lMJhX31ChyUImlL4I URNAQjhwob0EUlpdkKRK9F8RSKbwQtouihhSE4YaIQuHp6kF961eIFip33UZFN04Ck/L teaNJDR0uSTRsV7CccZ4qvgsJz+ySY+XwNMkLk4tZGZyhEAP9lHDAVgfODp8RpcfbAXA Jt+pDRFoloKoHHyjfwL/lXCOHqDSxN6jVPlq9o8Q2WYoIT3gQcl6CghQ+W/hTrGpu9FJ 1Qhg== 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=VqJ+LyDyVlcREA2vhC5coollIyZVOpGWWXQ6euRF2LtamDVCszTI/DuTrlOeIsNfvj Mx0eFdwG9C7GS5qttoQNxitHjFXy7jxMDa0HNaRJy51D6JVbXQwUDTcD+B1eyydH1v8/ MBjyQuuiR3N9o/NdrXbBtn7432cHMZavNQsg7BYwnAbZcLDZ4L2KtOCdg9JIrwaz5P8z +tPlWTHy9Lc6z0NrskWeLRLHoRd4xZSHFJ4Ot3970ZR69gm6kz6M44pub3o2tKY2Tdge WFCdxjxuz/VS16DqxoR/N9uxmj4UPmq14ABh3KAjLdvicncCkO3IGafTPAuGn+TSa8D8 5S8g== X-Forwarded-Encrypted: i=1; AJvYcCVPT/uP/O+4nUbav4NG19/dkEr33V1/9GdN/H0bFWEiJLWIAsSOOm501hYhr69T5nZBAzOUQN+sHPJTjhOywNJj59OkkdmyGzo+QeYcHIE1kKaNZS0= X-Gm-Message-State: AOJu0YwydMwXFcvAiKbuzCYI25mPaPjx4RvaRrWth9rOwm0iDq2FrNix caHKh601Y5jjSOvFme9sAssLhMvO6JcdJtvSmCFYHsABA9V4+YLV X-Google-Smtp-Source: AGHT+IFFKEPqYBqhXPvo3d9e2KGAB3GpC18x3pZ1hRTgMveG4viHnSGaLgA5CQDjSMLrjG8QFtrf1A== 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240311134144.7b1e1a34@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240401_104825_822851_C4FEBCA8 X-CRM114-Status: GOOD ( 22.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel