Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jakub Raczynski <j.raczynski@samsung.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@foss.st.com, k.domagalski@samsung.com,
	k.tegowski@samsung.com
Subject: Re: [PATCH net-next 1/3] net/stmmac/dwxgmac: Modify DMA functions for future hardware
Date: Mon, 11 May 2026 20:02:14 +0200	[thread overview]
Message-ID: <5b94f49e-5f1a-40fb-af34-f4a9d4738502@lunn.ch> (raw)
In-Reply-To: <20260511165416.3093015-2-j.raczynski@samsung.com>

On Mon, May 11, 2026 at 06:54:14PM +0200, Jakub Raczynski wrote:
> Datasheet for newer hardware of XGMAC (3.20a and 3.40a) list support for
> up to 16 DMA/MTL queues. Currently maximum amount of queues in 8 set by
> STMMAC_CH_MAX, MTL_MAX_TX_QUEUES, MTL_MAX_RX_QUEUES macros.
> But before we set these to higher value there are changes to be made.
> 
> While newer hardware supports up to 16 MTL/DMA queues, there is support only
> for 8 TC's (traffic control) entries. Current source assumes these are equal,
> which might not be true. While in some cases it would be just incorrect value,
> there are possible wrong memory accesses.
> 
> Fix this by saving number of TC supported by hardware in mac_device_info and
> verify it in related functions. Also use TC count rather than MTL_MAX values
> where it applies.
> +	/* Newer XGMAC hardware does support up to 16 MTL/DMA queues but
> +	 * only 8 traffic class queues. Redirect these, but this is error in
> +	 * configuration.
> +	 */

If this is an error in configuration why not return -EINVAL when the
configuration is requested?

	Andrew

  reply	other threads:[~2026-05-11 18:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260511165430eucas1p2d91808b8aa51316842509f19eea4a0a8@eucas1p2.samsung.com>
2026-05-11 16:54 ` [PATCH net-next 0/3] xgmac: Support for 16 MTL/DMA queues Jakub Raczynski
2026-05-11 16:54   ` [PATCH net-next 1/3] net/stmmac/dwxgmac: Modify DMA functions for future hardware Jakub Raczynski
2026-05-11 18:02     ` Andrew Lunn [this message]
2026-05-11 16:54   ` [PATCH net-next 2/3] net/stmmac/dwxgmac: Extend MTL/DMA support to 16 queues Jakub Raczynski
2026-05-11 18:05     ` Andrew Lunn
2026-05-11 16:54   ` [PATCH net-next 3/3] include/stmmac: Increase max DMA/MTL channel count from 8 to 16 Jakub Raczynski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b94f49e-5f1a-40fb-af34-f4a9d4738502@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=j.raczynski@samsung.com \
    --cc=k.domagalski@samsung.com \
    --cc=k.tegowski@samsung.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox