Skip to content

Instantly share code, notes, and snippets.

View lukego's full-sized avatar

Luke Gorrie lukego

View GitHub Profile
@lukego
lukego / gist:bc8f7ef97ad0110c60e1
Created July 24, 2014 08:07
Pktgen-DPDK compile error
CC [M] /home/luke/github/Pktgen-DPDK.release/dpdk/x86_64-pktgen-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.o
/home/luke/github/Pktgen-DPDK.release/dpdk/x86_64-pktgen-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: In function ‘igb_rx_hash’:
/home/luke/github/Pktgen-DPDK.release/dpdk/x86_64-pktgen-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:7379:3: error: implicit declaration of function ‘skb_set_hash’ [-Werror=implicit-function-declaration]
skb_set_hash(skb, le32_to_cpu(rx_desc->wb.lower.hi_dword.rss),
^
/home/luke/github/Pktgen-DPDK.release/dpdk/x86_64-pktgen-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:7380:9: error: ‘PKT_HASH_TYPE_L3’ undeclared (first use in this function)
PKT_HASH_TYPE_L3);
^
/home/luke/github/Pktgen-DPDK.release/dpdk/x86_64-pktgen-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:7380:9: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treat
@lukego
lukego / gist:5a255e666d8917d37c8e
Created July 30, 2014 07:49
Benchmark results for NFV lab
On 0000:07:00.0 got 4.457
On 0000:07:00.1 got 4.457
On 0000:24:00.0 got 4.452
On 0000:24:00.1 got 4.450
On 0000:27:00.0 got 4.449
On 0000:27:00.1 got 4.450
Rate(Mpps): 26.715
@lukego
lukego / local.conf
Created August 20, 2014 13:11
local.conf example for snabb mech driver
[[local|localrc]]
LOGFILE=stack.sh.log
SCREEN_LOGDIR=/opt/stack/data/log
VERBOSE=True
LOG_COLOR=False
#OFFLINE=True
#RECLONE=yes
GIT_TIMEOUT=0
# Only uncomment the below two lines if you are running on Fedora
[[local|localrc]]
LOGFILE=stack.sh.log
SCREEN_LOGDIR=/opt/stack/data/log
VERBOSE=True
LOG_COLOR=False
#OFFLINE=True
#RECLONE=yes
GIT_TIMEOUT=0
# Only uncomment the below two lines if you are running on Fedora
@lukego
lukego / snabbnfv-traffic.conf
Created August 28, 2014 06:56
Example snabbnfv-traffic config file
return
{
{ vlan=100,
mac_address = "01:02:03:04:05:05",
port_id = "c3ff7402-aa13-4dfc-987a-5b3997bb53c1",
ingress_filter = nil,
egress_filter = nil,
gbps = nil,
tunnel = nil
}
mysql> show columns from ml2_port_bindings;
+-------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| port_id | varchar(36) | NO | PRI | NULL | |
| host | varchar(255) | NO | | NULL | |
| vif_type | varchar(64) | NO | | NULL | |
| driver | varchar(64) | YES | | NULL | |
| segment | varchar(36) | YES | MUL | NULL | |
| vnic_type | varchar(64) | NO | | normal | |
@lukego
lukego / gist:39a33cdafa3b9c622363
Created September 3, 2014 08:18
Error when using icehouse tag 2014.1.2 instead of latest stable/icehouse branch
2014-09-03 07:05:48.595 | Obtaining file:///opt/stack/nova
2014-09-03 07:05:48.636 | Running setup.py (path:/opt/stack/nova/setup.py) egg_info for package from file:///opt/stack/nova
2014-09-03 07:05:48.937 | ERROR:root:Error parsing
2014-09-03 07:05:48.938 | Traceback (most recent call last):
2014-09-03 07:05:48.938 | File "/usr/local/lib/python2.7/dist-packages/pbr/core.py", line 104, in pbr
2014-09-03 07:05:48.938 | attrs = util.cfg_to_args(path)
2014-09-03 07:05:48.938 | File "/usr/local/lib/python2.7/dist-packages/pbr/util.py", line 238, in cfg_to_args
2014-09-03 07:05:48.938 | pbr.hooks.setup_hook(config)
2014-09-03 07:05:48.938 | File "/usr/local/lib/python2.7/dist-packages/pbr/hooks/__init__.py", line 27, in setup_hook
2014-09-03 07:05:48.938 | metadata_config.run()
@lukego
lukego / gist:4da12ff28023d7319200
Created October 23, 2014 17:28
Register dump for gj/fwd snabb design
report on intel device 0000:05:00.1
BPTC 2 Broadcast Packets Transmitted Count
GORCL 47,124,202 Good Octets Received Count Low
GOTCH 8 Good Octets Transmitted Count High
GOTCL 1,843,203,750 Good Octets Transmitted Count Low
GPRC 671,807 Good Packets Received Count
GPTC 23,866,068 Good Packets Transmitted Count
MLFC 3 MAC Local Fault Count
MRFC 1 MAC Remote Fault Count
PRC127 671,805 Packets Received [65-127 Bytes] Count
@lukego
lukego / gist:8b17a07246d999331b04
Created January 26, 2015 06:29
disassembly of proposed rte_memcpy (when wrapped in a function)
00000000004026e1 <rte_memcpy_wrapped_in_function>:
4026e1: 55 push %rbp
4026e2: 48 89 e5 mov %rsp,%rbp
4026e5: 48 81 ec d0 14 00 00 sub $0x14d0,%rsp
4026ec: 48 89 bd 48 eb ff ff mov %rdi,-0x14b8(%rbp)
4026f3: 48 89 b5 40 eb ff ff mov %rsi,-0x14c0(%rbp)
4026fa: 89 95 3c eb ff ff mov %edx,-0x14c4(%rbp)
402700: 8b 85 3c eb ff ff mov -0x14c4(%rbp),%eax
402706: 48 98 cltq
402708: 48 8b 95 48 eb ff ff mov -0x14b8(%rbp),%rdx
@lukego
lukego / rte_memcpy.h
Last active May 15, 2023 12:00
rte_memcpy.h
/*-
* BSD LICENSE
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*