From: "Oscar Alejandro Sánchez Lucero via B4 Relay" <devnull+aleszlucero.gmail.com@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
"Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
Subject: [PATCH v4 2/2] staging: octeon: match exact interface names in pow_send_list
Date: Wed, 11 Nov 2026 21:48:33 -0600 [thread overview]
Message-ID: <20261111-octeon-init-pipeline-v1-v4-2-5b4f8e613ae1@gmail.com> (raw)
In-Reply-To: <20261111-octeon-init-pipeline-v1-v4-0-5b4f8e613ae1@gmail.com>
From: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
cvm_oct_common_init() searches pow_send_list using strstr(), which matches
substrings instead of exact interface names.
Split a local copy of pow_send_list on comas with strsep() and compare
each entry using strcmp().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
drivers/staging/octeon/ethernet.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index c77678cb351f..653cf3727ba7 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -431,9 +431,23 @@ int cvm_oct_common_init(struct net_device *dev)
* Force the interface to use the POW send if always_use_pow
* was specified or it is in the pow send list.
*/
- if ((pow_send_group != -1) &&
- (always_use_pow || strstr(pow_send_list, dev->name)))
- priv->queue = -1;
+ if (pow_send_group != -1) {
+ if (always_use_pow) {
+ priv->queue = -1;
+ } else if (pow_send_list[0]) {
+ char list[sizeof(pow_send_list)];
+ char *p = list;
+ char *token;
+
+ strscpy(list, pow_send_list, sizeof(list));
+ while ((token = strsep(&p, ",")) != NULL) {
+ if (!strcmp(token, dev->name)) {
+ priv->queue = -1;
+ break;
+ }
+ }
+ }
+ }
if (priv->queue != -1)
dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
--
2.56.0
prev parent reply other threads:[~2026-11-12 3:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 3:48 [PATCH v4 0/2] staging: octeon: fix probe error path and pow_send_list matching Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-12 3:48 ` [PATCH v4 1/2] staging: octeon: disable PKO before device removal in probe error path Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-12 3:48 ` Oscar Alejandro Sánchez Lucero via B4 Relay [this message]
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=20261111-octeon-init-pipeline-v1-v4-2-5b4f8e613ae1@gmail.com \
--to=devnull+aleszlucero.gmail.com@kernel.org \
--cc=aleszlucero@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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
all inboxes | Powered by JetHome®