Skip to content

Commit

Permalink
bpf jit: Make the filter.c::__load_pointer helper non-static for the …
Browse files Browse the repository at this point in the history
…jits

The function is renamed to make it a little more clear what it does.
It is not added to any .h because it is not for general consumption, only for
bpf internal use (and so by the jits).

Signed-of-by: Jan Seiffert <kaffeemonster@googlemail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jan Seiffert authored and David S. Miller committed Apr 3, 2012
1 parent 5d6bd86 commit f03fb3f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@
#include <linux/reciprocal_div.h>
#include <linux/ratelimit.h>

/* No hurry in this branch */
static void *__load_pointer(const struct sk_buff *skb, int k, unsigned int size)
/* No hurry in this branch
*
* Exported for the bpf jit load helper.
*/
void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, unsigned int size)
{
u8 *ptr = NULL;

Expand All @@ -59,7 +62,7 @@ static inline void *load_pointer(const struct sk_buff *skb, int k,
{
if (k >= 0)
return skb_header_pointer(skb, k, size, buffer);
return __load_pointer(skb, k, size);
return bpf_internal_load_pointer_neg_helper(skb, k, size);
}

/**
Expand Down

0 comments on commit f03fb3f

Please sign in to comment.