On Thu, Dec 15, 2022 at 03:39:39PM +0000, mtahhan@xxxxxxxxxx wrote: > From: Maryam Tahhan <mtahhan@xxxxxxxxxx> > > Add documentation for BPF_MAP_TYPE_SOCK[MAP|HASH] > including kernel versions introduced, usage > and examples. > > Signed-off-by: Maryam Tahhan <mtahhan@xxxxxxxxxx> > > --- Thank you for making these changes, Maryam. This looks great. I had one very small nit below, but overall this LGTM: Acked-by: David Vernet <void@xxxxxxxxxxxxx> [...] > +.. note:: > + Users are not allowed to attach ``stream_verdict`` and ``skb_verdict`` > + programs to the same map. > + > +The attach types for the map programs are: > + > +- ``msg_parser`` program - ``BPF_SK_MSG_VERDICT``. > +- ``stream_parser`` program - ``BPF_SK_SKB_STREAM_PARSER``. > +- ``stream_verdict`` program - ``BPF_SK_SKB_STREAM_VERDICT``. > +- ``skb_verdict`` program - ``BPF_SK_SKB_VERDICT``. > + > +There are additional helpers available to use with the parser and verdict > +programs: ``bpf_msg_apply_bytes()`` and ``bpf_msg_cork_bytes()``. With > +``bpf_msg_apply_bytes()`` BPF programs can tell the infrastructure how many > +bytes the given verdict should apply to. The helper ``bpf_msg_cork_bytes()`` > +handles a different case where a BPF program can not reach a verdict on a msg s/can not/cannot