Bug#1014887: ir-ctl: increase the size of the buffer used to read raw files

2023-12-04 Thread Sean Young
Hi Gregor, Joe,

On Sun, Dec 03, 2023 at 10:03:05PM +0100, Gregor Jasny wrote:
> Hello Joe,
> 
> thanks for your bug report. I looked through the current code base of ir-ctl
> and saw that Sean committed the following change to increase the limit from
> 1k to 8k:
> 
> > https://git.linuxtv.org/v4l-utils.git/commit/utils/ir-ctl/ir-ctl.c?id=1874b2d0dfbb8a38b0c8b75a23a4b9a60e52fd6a
> 
> Maybe that's already large enough for your use case, too?
> 
> But replacing fgets with getline should be a straight-forward fix to get rid
> of the limit once and for all.
> 
> Sean, what do you think about that replacement and do you have time to work
> on the change?

I did not know about getline(), it's a very nice interface! I've written
a patch for ir-ctl to use it. If you have a chance to test it, that would
be great. 

https://patchwork.linuxtv.org/project/linux-media/patch/20231204085620.81213-1-s...@mess.org/

Thanks,
Sean



Bug#1018915: v4l-utils: FTBFS with libbpf 1.0.0

2022-11-01 Thread Sean Young
Hi Sudip,

On Sat, Oct 29, 2022 at 11:17:03PM +0100, Sudip Mukherjee wrote:
> Can you please test the attached patch and confirm that it does not break
> any of the functionality. This is the only one now which is blocking me
> from requesting libbbpf transition.

Looks good, everything is working fine.

Thanks for writing the patch. Before it can be accepted, it should be posted
on linux-me...@vger.kernel.org with a `Signed-off-by:`. If there are no
review comments I can merge it into v4l-utils upstream.

Thanks,

Sean



Bug#1018915: v4l-utils: FTBFS with libbpf 1.0.0

2022-11-01 Thread Sean Young
Hi Sudip, Gregor,

On Mon, Oct 31, 2022 at 11:29:29AM +, Sudip Mukherjee wrote:
> On Mon, Oct 31, 2022 at 10:44 AM Gregor Jasny  wrote:
> > One thing I miss in the patch is tightening the pkg-config rule to a
> > minimum required version which provides LIBBPF_OPTS. Proper place would
> > be here:
> >
> > https://git.linuxtv.org/v4l-utils.git/tree/configure.ac#n567
> 
> Ok, I might need help for this one. I will first check what will be
> the minimum libbpf version required for this change. afaik, libbpf/0.8
> is ok with these changes.

Looking at the bpf source code, 0.7 will be the required version. 

I think this is the correct autoconf line, but my autoconf knowledge is
very limited.

PKG_CHECK_MODULES([LIBBPF], [libbpf >= 0.7], [bpf_pc=yes], [bpf_pc=no])

Let me get back to you on testing.


Sean



Bug#1018915: v4l-utils: FTBFS with libbpf 1.0.0

2022-10-30 Thread Sean Young
Hi Sudip,

On Sat, Oct 29, 2022 at 11:17:03PM +0100, Sudip Mukherjee wrote:
> > > Sean, would you be able to port the existing code to libbpf 1.0? I noticed
> > > that the current code already triggers deprecation warnings with libbpf
> > > 0.8.0.
> > 
> > This needs porting, I'll add it to my todo list.
> 
> Can you please test the attached patch and confirm that it does not break
> any of the functionality. This is the only one now which is blocking me
> from requesting libbbpf transition.

That looks great, I'll give some good testing. Thanks for writing this
patch.

The way to get this merged upstream is to send to linux-me...@vger.kernel.org
and then get a review from the wider community.

Thanks,

Sean



Bug#1018915: v4l-utils: FTBFS with libbpf 1.0.0

2022-09-14 Thread Sean Young
Hi Gregor,

On Wed, Sep 07, 2022 at 02:53:49PM +0200, Gregor Jasny wrote:
> Hello Sudip,
> 
> thanks for the report.
> 
> On 02.09.22 01:19, Sudip Mukherjee wrote:
> > Package: v4l-utils
> > Version: 1.22.1-4
> > Severity: important
> > Tags: ftbfs
> > X-Debbugs-Cc: sudipm.mukher...@gmail.com
> > Usertags: libbpf1
> > 
> > Dear Maintainer,
> > 
> > v4l-utils FTBFS with libbpf 1.0.0 (available in experimental).
> > This is the first error from the build log:
> > 
> > bpf_load.c: In function 'load_and_attach':
> > bpf_load.c:66:38: error: storage size of 'load_attr' isn't known
> > 66 | struct bpf_load_program_attr load_attr;
> >|  ^
> > bpf_load.c:69:38: error: invalid application of 'sizeof' to incomplete type 
> > 'struct bpf_load_program_attr'
> > 69 | memset(_attr, 0, sizeof(struct 
> > bpf_load_program_attr));
> >|  ^~
> > bpf_load.c:78:14: warning: implicit declaration of function 
> > 'bpf_load_program_xattr' [-Wimplicit-function-declaration]
> > 78 | fd = bpf_load_program_xattr(_attr, bpf_log_buf, 
> > LOG_BUF_SIZE);
> >|  ^~
> > bpf_load.c:66:38: warning: unused variable 'load_attr' [-Wunused-variable]
> > 66 | struct bpf_load_program_attr load_attr;
> >|  ^
> > bpf_load.c: In function 'build_raw_map':
> > bpf_load.c:113:14: warning: implicit declaration of function 
> > 'bpf_create_map_node' [-Wimplicit-function-declaration]
> >113 | fd = bpf_create_map_node(map->def.type,
> >|  ^~~
> > bpf_load.c: In function 'load_maps':
> > bpf_load.c:179:47: warning: implicit declaration of function 
> > 'bpf_create_map_in_map_node' [-Wimplicit-function-declaration]
> >179 | bpf_file->map_fd[i] = 
> > bpf_create_map_in_map_node(
> >|   
> > ^~
> > 
> 
> Sean, would you be able to port the existing code to libbpf 1.0? I noticed
> that the current code already triggers deprecation warnings with libbpf
> 0.8.0.

This needs porting, I'll add it to my todo list.

Having said that, I am working on an entirely new tooling in rust but this
is not near completion yet: https://github.com/seanyoung/cir


Sean