Re: [PATCH bpf-next v2 6/7] libbpf: add bpf_link based TC-BPF management API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 04, 2021 at 11:31:57PM IST, Alexei Starovoitov wrote:
> On Fri, Jun 04, 2021 at 12:01:15PM +0530, Kumar Kartikeya Dwivedi wrote:
> > +/* TC bpf_link related API */
> > +struct bpf_tc_hook;
> > +
> > +struct bpf_tc_link_opts {
> > +	size_t sz;
> > +	__u32 handle;
> > +	__u32 priority;
> > +	__u32 gen_flags;
> > +	size_t :0;
> > +};
>
> Did you think of a way to share struct bpf_tc_opts with above?
> Or use bpf_tc_link_opts inside bpf_tc_opts?

A couple of fields in bpf_tc_opts aren't really relevant here (prog_fd, prog_id)
and will always be unused, so I thought it would be cleaner to give this its own
opts struct. It still reuses the hook abstraction that was added, though.

> Some other way?
> gen_flags here and flags there are the same?

No, it was an oversight that I missed adding gen_flags there, I'll send a patch
separately with some other assorted things. It's used when offloading to HW.

We don't really support any other flags (e.g. BPF_TC_F_REPLACE) for this.

--
Kartikeya



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux