|
@@ -765,8 +765,8 @@ static inline bool bpf_dump_raw_ok(void)
|
|
struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
|
|
struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
|
|
const struct bpf_insn *patch, u32 len);
|
|
const struct bpf_insn *patch, u32 len);
|
|
|
|
|
|
-static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb,
|
|
|
|
- struct net_device *fwd)
|
|
|
|
|
|
+static inline int xdp_ok_fwd_dev(const struct net_device *fwd,
|
|
|
|
+ unsigned int pktlen)
|
|
{
|
|
{
|
|
unsigned int len;
|
|
unsigned int len;
|
|
|
|
|
|
@@ -774,7 +774,7 @@ static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb,
|
|
return -ENETDOWN;
|
|
return -ENETDOWN;
|
|
|
|
|
|
len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN;
|
|
len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN;
|
|
- if (skb->len > len)
|
|
|
|
|
|
+ if (pktlen > len)
|
|
return -EMSGSIZE;
|
|
return -EMSGSIZE;
|
|
|
|
|
|
return 0;
|
|
return 0;
|