• D
    net: filter: make register naming more comprehensible · 30743837
    Daniel Borkmann 提交于
    The current code is a bit hard to parse on which registers can be used,
    how they are mapped and all play together. It makes much more sense to
    define this a bit more clearly so that the code is a bit more intuitive.
    This patch cleans this up, and makes naming a bit more consistent among
    the code. This also allows for moving some of the defines into the header
    file. Clearing of A and X registers in __sk_run_filter() do not get a
    particular register name assigned as they have not an 'official' function,
    but rather just result from the concrete initial mapping of old BPF
    programs. Since for BPF helper functions for BPF_CALL we already use
    small letters, so be consistent here as well. No functional changes.
    Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
    Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    30743837
filter.h 6.2 KB