In the initial sockmap API we provided strparser and verdict programs
using a single attach command by extending the attach API with a the
However, if we add other programs in the future we will be adding a
field for every new possible type, attach_bpf_fd(3,4,..). This
seems a bit clumsy for an API. So lets push the programs using two
new type fields.
This has the advantage of having a readable name and can easily be
extended in the future.
Updates to samples and sockmap included here also generalize tests
slightly to support upcoming patch for multiple map support.
Signed-off-by: John Fastabend <firstname.lastname@example.org>
Fixes: 174a79ff ("bpf: sockmap with sk redirect support")
Suggested-by: Alexei Starovoitov <email@example.com>
Acked-by: Alexei Starovoitov <firstname.lastname@example.org>
Signed-off-by: David S. Miller <email@example.com>