From: Vincent Mailhol <mailhol@kernel.org>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org,
Vincent Mailhol <mailhol@kernel.org>
Subject: [PATCH 1/4] can: slcan: do not allocate unused echo skb
Date: Tue, 04 Aug 2026 21:55:24 +0200 [thread overview]
Message-ID: <20260804-automate_iff_echo_flag-v1-1-26f06ff0f8bc@kernel.org> (raw)
In-Reply-To: <20260804-automate_iff_echo_flag-v1-0-26f06ff0f8bc@kernel.org>
The slcan driver does not use the generic CAN echo skb helpers. It leaves
IFF_ECHO clear and relies on the PF_CAN fallback echo path instead.
There is therefore no need to allocate one generic echo skb slot for
slcan. Request zero echo skb slots when allocating the CAN netdevice.
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
drivers/net/can/slcan/slcan-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c
index 7439849d5c84..546b9dcb08cc 100644
--- a/drivers/net/can/slcan/slcan-core.c
+++ b/drivers/net/can/slcan/slcan-core.c
@@ -826,7 +826,7 @@ static int slcan_open(struct tty_struct *tty)
if (!tty->ops->write)
return -EOPNOTSUPP;
- dev = alloc_candev(sizeof(*sl), 1);
+ dev = alloc_candev(sizeof(*sl), 0);
if (!dev)
return -ENFILE;
--
2.54.0
next prev parent reply other threads:[~2026-08-04 19:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 19:55 [PATCH 0/4] can: automate IFF_ECHO flag for generic echo skbs Vincent Mailhol
2026-08-04 19:55 ` Vincent Mailhol [this message]
2026-08-04 19:55 ` [PATCH 2/4] can: fix IFF_ECHO example in documentation Vincent Mailhol
2026-08-05 6:08 ` Oliver Hartkopp
2026-08-04 19:55 ` [PATCH 3/4] can: dev: set IFF_ECHO when allocating echo skbs Vincent Mailhol
2026-08-04 19:55 ` [PATCH 4/4] can: treewide: remove redundant IFF_ECHO assignments Vincent Mailhol
2026-08-05 6:29 ` [PATCH 0/4] can: automate IFF_ECHO flag for generic echo skbs Oliver Hartkopp
2026-08-05 7:25 ` Vincent Mailhol
2026-08-05 16:17 ` Oliver Hartkopp
2026-08-05 21:06 ` Vincent Mailhol
2026-08-06 12:01 ` Oliver Hartkopp
2026-08-06 20:55 ` Vincent Mailhol
2026-08-07 10:56 ` Oliver Hartkopp
2026-08-07 11:52 ` Vincent Mailhol
2026-08-10 18:07 ` Oliver Hartkopp
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=20260804-automate_iff_echo_flag-v1-1-26f06ff0f8bc@kernel.org \
--to=mailhol@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
/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