From: ALOK TIWARI <alok.a.tiwari@oracle.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
andrew+netdev@lunn.ch
Cc: sgoutham@marvell.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com
Subject: Re: [PATCH net-next v2 07/10] octeontx2: switch: L2 offload support
Date: Thu, 8 Jan 2026 14:37:38 +0530 [thread overview]
Message-ID: <99647efb-537c-462e-bbef-a3c01ef1bd8c@oracle.com> (raw)
In-Reply-To: <20260107132408.3904352-8-rkannoth@marvell.com>
On 1/7/2026 6:54 PM, Ratheesh Kannoth wrote:
> +
> +static void rvu_sw_l2_offl_rule_wq_handler(struct work_struct *work)
> +{
> + struct rvu_sw_l2_work *offl_work;
> + struct l2_entry *l2_entry;
> + int budget = 16;
> + bool add_fdb;
> +
> + offl_work = container_of(work, struct rvu_sw_l2_work, work);
> +
> + while (budget--) {
> + mutex_lock(&l2_offl_list_lock);
> + l2_entry = list_first_entry_or_null(&l2_offl_lh, struct l2_entry, list);
> + if (!l2_entry) {
> + mutex_unlock(&l2_offl_list_lock);
> + return;
> + }
> +
> + list_del_init(&l2_entry->list);
> + mutex_unlock(&l2_offl_list_lock);
> +
> + add_fdb = !!(l2_entry->flags & FDB_ADD);
> +
> + if (add_fdb)
> + rvu_sw_l2_offl_cancel_add_if_del_reqs_exist(l2_entry->mac);
> +
> + rvu_sw_l2_offl_rule_push(offl_work->rvu, l2_entry);
> + kfree(l2_entry);
> + }
> +
> + if (!list_empty(&l2_offl_lh))
> + queue_work(rvu_sw_l2_offl_wq, &l2_offl_work.work);
> +}
> +
> +int rvu_sw_l2_init_offl_wq(struct rvu *rvu, u16 pcifunc, bool fw_up)
> +{
> + struct rvu_switch *rswitch;
> +
> + rswitch = &rvu->rswitch;
> +
> + if (fw_up) {
> + rswitch->flags |= RVU_SWITCH_FLAG_FW_READY;
> + rswitch->pcifunc = pcifunc;
> +
> + l2_offl_work.rvu = rvu;
> + INIT_WORK(&l2_offl_work.work, rvu_sw_l2_offl_rule_wq_handler);
> + rvu_sw_l2_offl_wq = alloc_workqueue("swdev_rvu_sw_l2_offl_wq", 0, 0);
> + if (!rvu_sw_l2_offl_wq) {
> + dev_err(rvu->dev, "L2 offl workqueue allocation failed\n");
> + return -ENOMEM;
> + }
> +
> + fdb_refresh_work.rvu = rvu;
> + INIT_WORK(&fdb_refresh_work.work, rvu_sw_l2_fdb_refresh_wq_handler);
> + fdb_refresh_wq = alloc_workqueue("swdev_fdb_refresg_wq", 0, 0);
consider, "swdev_fdb_refresg_wq" -> "swdev_fdb_refresh_wq"
> + if (!rvu_sw_l2_offl_wq) {
Checks rvu_sw_l2_offl_wq instead of fdb_refresh_wq
> + dev_err(rvu->dev, "L2 offl workqueue allocation failed\n");
offl -> fbd
> + return -ENOMEM;
> + }
> +
> + return 0;
> + }
> +
> + rswitch->flags &= ~RVU_SWITCH_FLAG_FW_READY;
> + rswitch->pcifunc = -1;
> + flush_work(&l2_offl_work.work);
> + return 0;
> +}
Thanks,
Alok
next prev parent reply other threads:[~2026-01-08 9:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 13:23 [PATCH net-next v2 00/10] Switch support Ratheesh Kannoth
2026-01-07 13:23 ` [PATCH net-next v2 01/10] octeontx2-af: switch: Add AF to switch mbox and skeleton files Ratheesh Kannoth
2026-01-08 9:02 ` ALOK TIWARI
2026-01-08 9:22 ` Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 02/10] octeontx2-af: switch: Add switch dev to AF mboxes Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 03/10] octeontx2-pf: switch: Add pf files hierarchy Ratheesh Kannoth
2026-01-08 9:13 ` ALOK TIWARI
2026-01-08 9:27 ` Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 04/10] octeontx2-af: switch: Representor for switch port Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 05/10] octeontx2-af: switch: Enable Switch hw port for all channels Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 06/10] octeontx2-pf: switch: Register for notifier chains Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 07/10] octeontx2: switch: L2 offload support Ratheesh Kannoth
2026-01-08 9:07 ` ALOK TIWARI [this message]
2026-01-08 9:35 ` Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 08/10] octeontx2: switch: L3 " Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 09/10] octeontx2: switch: Flow " Ratheesh Kannoth
2026-01-08 9:09 ` ALOK TIWARI
2026-01-08 10:05 ` Ratheesh Kannoth
2026-01-08 16:07 ` Kalesh Anakkur Purayil
2026-01-09 4:43 ` Ratheesh Kannoth
2026-01-07 13:24 ` [PATCH net-next v2 10/10] octeontx2: switch: trace support Ratheesh Kannoth
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=99647efb-537c-462e-bbef-a3c01ef1bd8c@oracle.com \
--to=alok.a.tiwari@oracle.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=sgoutham@marvell.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