From: Daniel Borkmann <daniel@iogearbox.net>
To: Sean Young <sean@mess.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Alexei Starovoitov <ast@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
netdev@vger.kernel.org, Matthias Reichl <hias@horus.com>,
Devin Heitmueller <dheitmueller@kernellabs.com>,
Y Song <ys114321@gmail.com>,
Quentin Monnet <quentin.monnet@netronome.com>
Subject: Re: [PATCH v5 0/3] IR decoding using BPF
Date: Wed, 30 May 2018 12:57:09 +0200 [thread overview]
Message-ID: <ddee9d3a-6464-1e41-d475-ede0918a17c3@iogearbox.net> (raw)
In-Reply-To: <cover.1527419762.git.sean@mess.org>
On 05/27/2018 01:24 PM, Sean Young wrote:
> The kernel IR decoders (drivers/media/rc/ir-*-decoder.c) support the most
> widely used IR protocols, but there are many protocols which are not
> supported[1]. For example, the lirc-remotes[2] repo has over 2700 remotes,
> many of which are not supported by rc-core. There is a "long tail" of
> unsupported IR protocols, for which lircd is need to decode the IR .
>
> IR encoding is done in such a way that some simple circuit can decode it;
> therefore, bpf is ideal.
>
> In order to support all these protocols, here we have bpf based IR decoding.
> The idea is that user-space can define a decoder in bpf, attach it to
> the rc device through the lirc chardev.
>
> Separate work is underway to extend ir-keytable to have an extensive library
> of bpf-based decoders, and a much expanded library of rc keymaps.
>
> Another future application would be to compile IRP[3] to a IR BPF program, and
> so support virtually every remote without having to write a decoder for each.
> It might also be possible to support non-button devices such as analog
> directional pads or air conditioning remote controls and decode the target
> temperature in bpf, and pass that to an input device.
>
> Thanks,
>
> Sean Young
>
> [1] http://www.hifi-remote.com/wiki/index.php?title=DecodeIR
> [2] https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/
> [3] http://www.hifi-remote.com/wiki/index.php?title=IRP_Notation
>
> Changes since v4:
> - Renamed rc_dev_bpf_{attach,detach,query} to lirc_bpf_{attach,detach,query}
> - Fixed error path in lirc_bpf_query
> - Rebased on bpf-next
>
> Changes since v3:
> - Implemented review comments from Quentin Monnet and Y Song (thanks!)
> - More helpful and better formatted bpf helper documentation
> - Changed back to bpf_prog_array rather than open-coded implementation
> - scancodes can be 64 bit
> - bpf gets passed values in microseconds, not nanoseconds.
> microseconds is more than than enough (IR receivers support carriers upto
> 70kHz, at which point a single period is already 14 microseconds). Also,
> this makes it much more consistent with lirc mode2.
> - Since it looks much more like lirc mode2, rename the program type to
> BPF_PROG_TYPE_LIRC_MODE2.
> - Rebased on bpf-next
>
> Changes since v2:
> - Fixed locking issues
> - Improved self-test to cover more cases
> - Rebased on bpf-next again
>
> Changes since v1:
> - Code review comments from Y Song <ys114321@gmail.com> and
> Randy Dunlap <rdunlap@infradead.org>
> - Re-wrote sample bpf to be selftest
> - Renamed RAWIR_DECODER -> RAWIR_EVENT (Kconfig, context, bpf prog type)
> - Rebase on bpf-next
> - Introduced bpf_rawir_event context structure with simpler access checking
Applied to bpf-next, thanks Sean!
prev parent reply other threads:[~2018-05-30 10:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-27 11:24 Sean Young
2018-05-27 11:24 ` [PATCH v5 1/3] bpf: bpf_prog_array_copy() should return -ENOENT if exclude_prog not found Sean Young
2018-05-27 11:24 ` [PATCH v5 2/3] media: rc: introduce BPF_PROG_LIRC_MODE2 Sean Young
2018-06-04 17:47 ` Matthias Reichl
2018-06-05 10:16 ` Sean Young
2018-06-05 10:33 ` Daniel Borkmann
2018-06-06 21:09 ` [PATCH] bpf: attach type BPF_LIRC_MODE2 should not depend on CONFIG_BPF_CGROUP Sean Young
2018-06-07 18:12 ` Simon Horman
2018-06-07 18:14 ` Y Song
2018-06-07 22:40 ` Daniel Borkmann
2018-06-14 18:42 ` [PATCH] bpf: attach type BPF_LIRC_MODE2 should not depend on CONFIG_CGROUP_BPF Sean Young
2018-06-15 14:03 ` Daniel Borkmann
2018-06-18 17:12 ` [PATCH v3] " Sean Young
2018-06-18 18:46 ` kbuild test robot
2018-06-18 22:56 ` Sean Young
2018-06-18 23:04 ` [PATCH v4] " Sean Young
2018-06-26 10:03 ` Daniel Borkmann
2018-05-27 11:24 ` [PATCH v5 3/3] bpf: add selftest for lirc_mode2 type program Sean Young
2018-05-30 10:57 ` Daniel Borkmann [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=ddee9d3a-6464-1e41-d475-ede0918a17c3@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=dheitmueller@kernellabs.com \
--cc=hias@horus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=quentin.monnet@netronome.com \
--cc=sean@mess.org \
--cc=ys114321@gmail.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
all inboxes | Powered by JetHome®