This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -f /usr/local/etc/openvswitch/conf.db | |
ovsdb-tool create /usr/local/etc/openvswitch/conf.db /root/ovs/vswitchd/vswitch.ovsschema | |
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ | |
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \ | |
--pidfile --detach | |
if [ "$1" == "gdb" ]; then | |
gdb -ex=r --args ovs-vswitchd --no-chdir --pidfile --log-file=/root/ovs/ovs-vswitchd.log -vvconn -vofproto_dpif -vunixctl --disable-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat tunclient.c | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <net/if.h> | |
#include <linux/if_tun.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <sys/ioctl.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[64701.441424] xsk_generic_xmit call direct xmit to ovs-p0 | |
[64701.441440] xsk_generic_xmit done | |
[64717.199367] ovs-vswitchd invoked oom-killer: gfp_mask=0x6200ca(GFP_HIGHUSER_MOVABLE), nodemask=(null), order=0, oom_score_adj=0 | |
[64717.199369] ovs-vswitchd cpuset=/ mems_allowed=0 | |
[64717.199373] CPU: 2 PID: 1412 Comm: ovs-vswitchd Tainted: G L 4.18.0-rc6+ #156 | |
[64717.199373] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017 | |
[64717.199374] Call Trace: | |
[64717.200092] dump_stack+0x5c/0x7b | |
[64717.200228] dump_header+0x6b/0x27c | |
[64717.200830] oom_kill_process+0x239/0x440 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make[1]: Leaving directory '/root/net-next' | |
bpf_load_program() err=13 | |
0: (bf) r6 = r1 | |
1: (30) r0 = *(u8 *)skb[23] | |
2: (63) *(u32 *)(r10 -4) = r0 | |
3: (18) r1 = 0x9ffe7000 | |
5: (79) r2 = *(u64 *)(r1 +8) | |
R1 invalid mem access 'map_ptr' | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tmp/xdp9.c b/tests/xdp9.c | |
index 0845fd5..9964d15 100644 | |
--- a/tmp/xdp9.c | |
+++ b/tests/xdp9.c | |
@@ -1,4 +1,4 @@ | |
-/* Automatically generated by p4c-xdp from xdp9.p4 on Fri Apr 14 10:34:12 2017 | |
+/* Automatically generated by p4c-xdp from xdp9.p4 on Fri Apr 14 11:14:09 2017 | |
*/ | |
#include "xdp9.h" | |
#define KBUILD_MODNAME "xdptest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Automatically generated by p4c-xdp from xdp12.p4 on Fri Feb 17 08:32:10 2017 | |
*/ | |
#include "xdp12.h" | |
#define KBUILD_MODNAME "xdptest" | |
#include <linux/bpf.h> | |
#include "bpf_helpers.h" | |
#define load_byte(data, b) (*(((u8*)(data)) + (b))) | |
#define load_half(data, b) __constant_ntohs(*(u16 *)((u8*)(data) + (b))) | |
#define load_word(data, b) __constant_ntohl(*(u32 *)((u8*)(data) + (b))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@osboxes:~/net-next/samples/bpf# ./xdp_tx_iptunnel -i 2 -a 10.1.1.1 -p 10.2.2.2 -s 10.2.2.9 -d 10.1.2.3 -m 1:2:3:4:5:6 | |
bpf_load_program() err=13 | |
0: (b7) r2 = 1 | |
1: (bf) r3 = r1 | |
2: (07) r3 += 4 | |
3: (bf) r4 = r1 | |
4: (bf) r5 = r1 | |
5: (61) r0 = *(u32 *)(r1 +4) | |
6: (61) r1 = *(u32 *)(r1 +0) | |
7: (bf) r6 = r1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdp7.o: file format ELF64-BPF | |
Disassembly of section prog: | |
ebpf_filter: | |
; int ebpf_filter(struct xdp_md* skb){ | |
0: r6 = r1 | |
; void* ebpf_packetEnd = ((void*)(long)skb->data_end); | |
1: r3 = *(u32 *)(r6 + 4) | |
; void* ebpf_packetStart = ((void*)(long)skb->data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map 'ebpf_outTable' loaded as pinned! | |
Map 'ebpf_outTable' (5) injected into prog section 'prog' at offset 295! | |
Prog section 'prog' loaded (6)! | |
- Type: 6 | |
- Instructions: 304 (0 over limit) | |
- License: GPL | |
Verifier analysis: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdp3.o: file format ELF64-BPF | |
Disassembly of section prog: | |
ebpf_filter: | |
; int ebpf_filter(struct xdp_md* skb){ | |
0: r6 = r1 | |
; void* ebpf_packetEnd = ((void*)(long)skb->data_end); | |
1: r4 = *(u32 *)(r6 + 4) | |
; void* ebpf_packetStart = ((void*)(long)skb->data); |
NewerOlder