kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* I want to contribute a uledtriggers driver
@ 2025-03-02 12:48 Craig McQueen
  2025-03-02 14:33 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Craig McQueen @ 2025-03-02 12:48 UTC (permalink / raw)
  To: kernelnewbies

I have written a uledtriggers driver -- a userspace LED triggers driver -- similar in concept to uleds but for LED triggers. I currently have it as an out-of-tree driver, targeting kernel v6.8:

https://github.com/cmcqueen/linux-kernel-uledtriggers

I am interested to contribute it to the mainline kernel. I have done drivers in the kernel tree before, within a company, so I know how to do the Kconfig and Makefile etc. But I don't know how to do the processes of liaising with the appropriate kernel maintainers to do a driver contribution. I know linux-leds mailing list exists.

-- 
Craig McQueen


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I want to contribute a uledtriggers driver
  2025-03-02 12:48 I want to contribute a uledtriggers driver Craig McQueen
@ 2025-03-02 14:33 ` Greg KH
  2025-03-23 22:05   ` [RFC BUG] Send queue accounting of AF_PACKET is always zero Alexandre Ferrieux
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2025-03-02 14:33 UTC (permalink / raw)
  To: Craig McQueen; +Cc: kernelnewbies

On Sun, Mar 02, 2025 at 11:48:18PM +1100, Craig McQueen wrote:
> I have written a uledtriggers driver -- a userspace LED triggers driver -- similar in concept to uleds but for LED triggers. I currently have it as an out-of-tree driver, targeting kernel v6.8:
> 
> https://github.com/cmcqueen/linux-kernel-uledtriggers
> 
> I am interested to contribute it to the mainline kernel. I have done drivers in the kernel tree before, within a company, so I know how to do the Kconfig and Makefile etc. But I don't know how to do the processes of liaising with the appropriate kernel maintainers to do a driver contribution. I know linux-leds mailing list exists.

It's the same as for any other kernel change, make a patch, run it
through 'scripts/get_maintainer.pl' to determine where to send it to,
and then send it to them :)

The kernel has loads of documentation on how to submit a patch, I
recommend reading that and if you have specific questions afterward,
please ask.

hope this helps,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [RFC BUG] Send queue accounting of AF_PACKET is always zero
  2025-03-02 14:33 ` Greg KH
@ 2025-03-23 22:05   ` Alexandre Ferrieux
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Ferrieux @ 2025-03-23 22:05 UTC (permalink / raw)
  To: kernelnewbies; +Cc: kernel-janitors

Hi,

When sending raw ethernet frames over an AF_PACKET/SOCK_RAW socket, "ss" always
reports a empty send queue, even when it is obviously full of packets.

The root cause is that packet_snd() never updates sk->sk_wmem_alloc, which is
the counter used by "ss" for the send queue occupation. All other socket types
end up calling something like:

   refcount_add(SOME_SIZE, &sk->sk_wmem_alloc)

Unfortunately, the way it is done is extremely varied across socket families, so
it is not immediately obvious to a newbie where to add this increment, and
associated decrement on skb free.

I'd appreciate any insight on (1) perhaps why it is deemed unimportant to do
send queue accounting for AF_PACKET; and (2) if it is just a bug, where the
incr/decr should take place.

Additionally, an explanation of "tpacket_snd()" vs "packet_snd()" would be very
welcome, as the former does proper send queue accounting, while the latter doesn't.

Thanks in advance,

-Alex



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-23 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-02 12:48 I want to contribute a uledtriggers driver Craig McQueen
2025-03-02 14:33 ` Greg KH
2025-03-23 22:05   ` [RFC BUG] Send queue accounting of AF_PACKET is always zero Alexandre Ferrieux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).