Skip to content

Commit c865250

Browse files
committed
Merge branch 'bpf-next'
Daniel Borkmann says: ==================== Misc cls_bpf/act_bpf improvements Two minor improvements to {cls,act}_bpf. For details please see individual patches. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 07c0f09 + f53d8c7 commit c865250

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

net/sched/act_bpf.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,10 @@ static struct tc_action_ops act_bpf_ops;
3939
static int tcf_bpf(struct sk_buff *skb, const struct tc_action *act,
4040
struct tcf_result *res)
4141
{
42+
bool at_ingress = skb_at_tc_ingress(skb);
4243
struct tcf_bpf *prog = to_bpf(act);
4344
struct bpf_prog *filter;
4445
int action, filter_res;
45-
bool at_ingress = G_TC_AT(skb->tc_verd) & AT_INGRESS;
46-
47-
if (unlikely(!skb_mac_header_was_set(skb)))
48-
return TC_ACT_UNSPEC;
4946

5047
tcf_lastuse_update(&prog->tcf_tm);
5148
bstats_cpu_update(this_cpu_ptr(prog->common.cpu_bstats), skb);

net/sched/cls_bpf.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp,
8383
struct cls_bpf_prog *prog;
8484
int ret = -1;
8585

86-
if (unlikely(!skb_mac_header_was_set(skb)))
87-
return -1;
88-
8986
/* Needed here for accessing maps. */
9087
rcu_read_lock();
9188
list_for_each_entry_rcu(prog, &head->plist, link) {

0 commit comments

Comments
 (0)