On Sun, May 28, 2017 at 12:38 AM, Adel Fuchs [off-list ref] wrote:
Hi,
Is there any way to run this eBPF program without that patch?
Alternatively, is there any other eBPF sample that does run properly? I need
to run a program that filters packets according to IP address or port.
The following is temporary workaround you can use:
int poff, nh_off = BPF_LL_OFF + ETH_HLEN;
- __be16 proto = skb->protocol;
+ __be16 proto = (__be16)*(volatile __u32 *)&skb->protocol;
__u8 ip_proto;
Hi,
Thanks for your reply. Where do I need to add this workaround?
Thanks,
Adel
On Mon, May 29, 2017 at 8:31 AM, Y Song [off-list ref] wrote:
On Sun, May 28, 2017 at 12:38 AM, Adel Fuchs [off-list ref] wrote:
quoted
Hi,
Is there any way to run this eBPF program without that patch?
Alternatively, is there any other eBPF sample that does run properly? I need
to run a program that filters packets according to IP address or port.
The following is temporary workaround you can use:
int poff, nh_off = BPF_LL_OFF + ETH_HLEN;
- __be16 proto = skb->protocol;
+ __be16 proto = (__be16)*(volatile __u32 *)&skb->protocol;
__u8 ip_proto;
OK. Found it. Thanks! it works!
On Thu, Jun 1, 2017 at 9:43 AM, Adel Fuchs [off-list ref] wrote:
Hi,
Thanks for your reply. Where do I need to add this workaround?
Thanks,
Adel
On Mon, May 29, 2017 at 8:31 AM, Y Song [off-list ref] wrote:
quoted
On Sun, May 28, 2017 at 12:38 AM, Adel Fuchs [off-list ref] wrote:
quoted
Hi,
Is there any way to run this eBPF program without that patch?
Alternatively, is there any other eBPF sample that does run properly? I need
to run a program that filters packets according to IP address or port.
The following is temporary workaround you can use:
int poff, nh_off = BPF_LL_OFF + ETH_HLEN;
- __be16 proto = skb->protocol;
+ __be16 proto = (__be16)*(volatile __u32 *)&skb->protocol;
__u8 ip_proto;