Mindaugas Rasiukevicius wrote: > Alexander Nasonov <[email protected]> wrote: > > In your case BPF_COP is always the first instruction (or in the > > first linear block). Because it's the first and it's a function > > call, it can be moved outside of bpf program and inlined. > > > > If this is the case, you don't need BPF_COP at all. > > For this particular case - yes, correct. > > > Except of course you may run out or memwords one day and you want > > to have BPF_COP as a fallback. > > I still need BPF_COP for other tasks (e.g. NPF_COP_TABLE). Running out > of words is unlikely, but COP can certainly be used to handle that too.
I wonder why do you need two different features when one is a superset of the other if you could use BPF_COP? If the only reason is performance, external memory is not a win-win proposition. PS sljit has a non-standard fast call mechanism. If you're really concerned about performance, you can generate copfuncs and I can call them from bpfjit. Alex
