public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Lorenzo Bianconi <lorenzo@kernel.org>
Cc: Christian Marangi <ansuelsmth@gmail.com>,
	 Benjamin Larsson <benjamin.larsson@genexis.eu>,
	 linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,  netdev@vger.kernel.org,
	devicetree@vger.kernel.org,  Xuegang Lu <xuegang.lu@airoha.com>
Subject: [PATCH net-next v2 03/11] net: airoha: Rely on net_device pointer in airoha_dev_setup_tc_block signature
Date: Wed, 01 Apr 2026 08:59:21 +0200	[thread overview]
Message-ID: <20260401-airoha-eth-multi-serdes-v2-3-ac427ae4beeb@kernel.org> (raw)
In-Reply-To: <20260401-airoha-eth-multi-serdes-v2-0-ac427ae4beeb@kernel.org>

Remove airoha_gdm_port dependency in airoha_dev_setup_tc_block routine
signature and rely on net_device pointer instead. Please note this patch
does not introduce any logical change and it is a preliminary patch to
support multiple net_devices connected to the GDM3 or GDM4 ports via an
external hw arbiter.

Tested-by: Xuegang Lu <xuegang.lu@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/airoha/airoha_eth.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
index ff5fc852d7dc3960fdcf6ae7465896340c3f43a0..e1448e01dd69b7d46f0efd8ad4e8531bca0ae1eb 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -2675,7 +2675,7 @@ static int airoha_dev_setup_tc_block_cb(enum tc_setup_type type,
 	}
 }
 
-static int airoha_dev_setup_tc_block(struct airoha_gdm_port *port,
+static int airoha_dev_setup_tc_block(struct net_device *dev,
 				     struct flow_block_offload *f)
 {
 	flow_setup_cb_t *cb = airoha_dev_setup_tc_block_cb;
@@ -2688,12 +2688,12 @@ static int airoha_dev_setup_tc_block(struct airoha_gdm_port *port,
 	f->driver_block_list = &block_cb_list;
 	switch (f->command) {
 	case FLOW_BLOCK_BIND:
-		block_cb = flow_block_cb_lookup(f->block, cb, port->dev);
+		block_cb = flow_block_cb_lookup(f->block, cb, dev);
 		if (block_cb) {
 			flow_block_cb_incref(block_cb);
 			return 0;
 		}
-		block_cb = flow_block_cb_alloc(cb, port->dev, port->dev, NULL);
+		block_cb = flow_block_cb_alloc(cb, dev, dev, NULL);
 		if (IS_ERR(block_cb))
 			return PTR_ERR(block_cb);
 
@@ -2702,7 +2702,7 @@ static int airoha_dev_setup_tc_block(struct airoha_gdm_port *port,
 		list_add_tail(&block_cb->driver_list, &block_cb_list);
 		return 0;
 	case FLOW_BLOCK_UNBIND:
-		block_cb = flow_block_cb_lookup(f->block, cb, port->dev);
+		block_cb = flow_block_cb_lookup(f->block, cb, dev);
 		if (!block_cb)
 			return -ENOENT;
 
@@ -2801,7 +2801,7 @@ static int airoha_dev_tc_setup(struct net_device *dev, enum tc_setup_type type,
 		return airoha_tc_setup_qdisc_htb(port, type_data);
 	case TC_SETUP_BLOCK:
 	case TC_SETUP_FT:
-		return airoha_dev_setup_tc_block(port, type_data);
+		return airoha_dev_setup_tc_block(dev, type_data);
 	default:
 		return -EOPNOTSUPP;
 	}

-- 
2.53.0



  parent reply	other threads:[~2026-04-01  7:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01  6:59 [PATCH net-next v2 00/11] net: airoha: Support multiple net_devices connected to the same GDM port Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 01/11] dt-bindings: net: airoha: Add EN7581 ethernet-ports properties Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 02/11] net: airoha: Set PPE cpu port for GDM2 if loopback is enabled Lorenzo Bianconi
2026-04-01  6:59 ` Lorenzo Bianconi [this message]
2026-04-01  6:59 ` [PATCH net-next v2 04/11] net: airoha: Rely on net_device pointer in HTB callbacks Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 05/11] net: airoha: Rely on net_device pointer in ETS callbacks Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 06/11] net: airoha: Introduce airoha_gdm_dev struct Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 07/11] net: airoha: Move airoha_qdma pointer in " Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 08/11] net: airoha: Rely on airoha_gdm_dev pointer in airhoa_is_lan_gdm_port() Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 09/11] net: airoha: Support multiple net_devices for a single FE GDM port Lorenzo Bianconi
2026-04-03  1:12   ` Jakub Kicinski
2026-04-03 10:18     ` Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 10/11] net: airoha: Do not stop GDM port if it is shared Lorenzo Bianconi
2026-04-03  1:12   ` Jakub Kicinski
2026-04-03 10:18     ` Lorenzo Bianconi
2026-04-01  6:59 ` [PATCH net-next v2 11/11] net: airoha: Rename get_src_port_id callback in get_sport Lorenzo Bianconi

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=20260401-airoha-eth-multi-serdes-v2-3-ac427ae4beeb@kernel.org \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=benjamin.larsson@genexis.eu \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=xuegang.lu@airoha.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