Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Helium/VPP/vpp-22.02/build/external/downloads/dpdk-21.11.tar.xz
Binary file not shown.
2 changes: 1 addition & 1 deletion Helium/VPP/vpp-22.02/build/external/packages/dpdk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dpdk_version ?= 21.11
dpdk_base_url ?= http://fast.dpdk.org/rel
dpdk_tarball := dpdk-$(dpdk_version).tar.xz
#dpdk_tarball_md5sum_21.11 := 3dc2ad90093b7dbbf3da57d684c8e6b6
dpdk_tarball_md5sum_21.11 := 7851e804f2c019d92ec3941398dd964b
dpdk_tarball_md5sum_21.11 := 5a43a5d4c9ebc7432ca6e8c2c248b45d
dpdk_tarball_md5sum_21.08 := de33433a1806280996a0ecbe66e3642f
dpdk_tarball_md5sum_21.05 := a78bba290b11d9717d1272cc6bfaf7c3
dpdk_tarball_md5sum := $(dpdk_tarball_md5sum_$(dpdk_version))
Expand Down
2 changes: 1 addition & 1 deletion Helium/VPP/vpp-22.02/src/plugins/dpdk/device/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ dpdk_device_setup (dpdk_device_t * xd, dpdk_device_config_t *devconf)
format_dpdk_rte_device, dev_info.device);

/* create rx and tx offload wishlist */
rxo = DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_VLAN_STRIP;
rxo = DEV_RX_OFFLOAD_IPV4_CKSUM;
txo = 0;

if (xd->conf.enable_tcp_udp_checksum)
Expand Down
6 changes: 0 additions & 6 deletions Helium/VPP/vpp-22.02/src/vnet/arp/arp_packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ arp_mk_reply (vnet_main_t * vnm,
u8 *rewrite0, rewrite0_len;
ethernet_header_t *eth_tx;
u32 next0;
vnet_sw_interface_t *sub_sw = vnet_get_sw_interface (vnm, sw_if_index0);
vnet_sw_interface_t *sup_sw = vnet_get_sup_sw_interface (vnm, sw_if_index0);

/* Send a reply.
An adjacency to the sender is not always present,
Expand All @@ -67,10 +65,6 @@ arp_mk_reply (vnet_main_t * vnm,

mac_address_from_bytes (&arp0->ip4_over_ethernet[0].mac,
hw_if0->hw_address);
if (sub_sw != sup_sw)
{
arp0->ip4_over_ethernet[0].mac.bytes[5] = (u8)(sw_if_index0);
}
clib_mem_unaligned (&arp0->ip4_over_ethernet[0].ip4.data_u32, u32) =
if_addr0->data_u32;

Expand Down
8 changes: 0 additions & 8 deletions Helium/VPP/vpp-22.02/src/vnet/ethernet/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ ethernet_build_rewrite (vnet_main_t * vnm,
(sub_sw->type == VNET_SW_INTERFACE_TYPE_PIPE))
is_p2p = 1;

#if 0
if (sub_sw != sup_sw)
{
if (sub_sw->sub.eth.flags.one_tag && !(sub_sw->sub.eth.flags.dpdk_hw_tag))
Expand Down Expand Up @@ -130,7 +129,6 @@ ethernet_build_rewrite (vnet_main_t * vnm,
n_bytes = sizeof (ethernet_header_t);
}
}
#endif
switch (link_type)
{
#define _(a,b) case VNET_LINK_##a: type = ETHERNET_TYPE_##b; break
Expand All @@ -147,10 +145,6 @@ ethernet_build_rewrite (vnet_main_t * vnm,
h = (ethernet_header_t *) rewrite;
ei = pool_elt_at_index (em->interfaces, hw->hw_instance);
clib_memcpy (h->src_address, &ei->address, sizeof (h->src_address));
if (sub_sw != sup_sw && PREDICT_FALSE (!is_p2p))
{
h->src_address[5] = (u8)(sw_if_index);
}
if (is_p2p)
{
clib_memcpy (h->dst_address, sub_sw->p2p.client_mac,
Expand All @@ -163,7 +157,6 @@ ethernet_build_rewrite (vnet_main_t * vnm,
else
clib_memset (h->dst_address, ~0, sizeof (h->dst_address)); /* broadcast */
}
#if 0
if (PREDICT_FALSE (!is_p2p) && sub_sw->sub.eth.flags.one_tag && !(sub_sw->sub.eth.flags.dpdk_hw_tag))
{
ethernet_vlan_header_t *outer = (void *) (h + 1);
Expand Down Expand Up @@ -193,7 +186,6 @@ ethernet_build_rewrite (vnet_main_t * vnm,

}
else
#endif
{
h->type = clib_host_to_net_u16 (type);
}
Expand Down
11 changes: 6 additions & 5 deletions Helium/VPP/vpp-22.02/src/vnet/ethernet/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ parse_header (ethernet_input_variant_t variant,

*match_flags = SUBINT_CONFIG_VALID | SUBINT_CONFIG_MATCH_0_TAG;
vlan_count = 0;

#if 0
if(vnet_buffer(b0)->dont_waste_me != 0)
{
ethernet_vlan_header_t *h0;
Expand Down Expand Up @@ -193,6 +193,7 @@ parse_header (ethernet_input_variant_t variant,

}
else
#endif
// check for vlan encaps
if (ethernet_frame_is_tagged (*type))
{
Expand Down Expand Up @@ -1380,8 +1381,8 @@ ethernet_input_inline (vlib_main_t * vm,
/* Speed-path for the untagged case */
if (PREDICT_TRUE (variant == ETHERNET_INPUT_VARIANT_ETHERNET
&& !ethernet_frame_is_any_tagged_x2 (type0,
type1))
&& !(vnet_buffer(b0)->dont_waste_me || vnet_buffer(b1)->dont_waste_me) )
type1)))
//&& !(vnet_buffer(b0)->dont_waste_me || vnet_buffer(b1)->dont_waste_me) )
{
main_intf_t *intf0;
subint_config_t *subint0;
Expand Down Expand Up @@ -1659,8 +1660,8 @@ ethernet_input_inline (vlib_main_t * vm,

/* Speed-path for the untagged case */
if (PREDICT_TRUE (variant == ETHERNET_INPUT_VARIANT_ETHERNET
&& !ethernet_frame_is_tagged (type0))
&& !(vnet_buffer(b0)->dont_waste_me))
&& !ethernet_frame_is_tagged (type0)))
//&& !(vnet_buffer(b0)->dont_waste_me))
{
main_intf_t *intf0;
subint_config_t *subint0;
Expand Down
6 changes: 0 additions & 6 deletions Helium/VPP/vpp-22.02/src/vnet/ip-neighbor/ip4_neighbor.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ ip4_neighbor_probe (vlib_main_t * vm,
ethernet_arp_header_t *h0;
vlib_buffer_t *b0;
u32 bi0;
vnet_sw_interface_t *sub_sw = vnet_get_sw_interface (vnm, adj0->rewrite_header.sw_if_index);
vnet_sw_interface_t *sup_sw = vnet_get_sup_sw_interface (vnm, adj0->rewrite_header.sw_if_index);

hw_if0 = vnet_get_sup_hw_interface (vnm, adj0->rewrite_header.sw_if_index);

Expand All @@ -59,10 +57,6 @@ ip4_neighbor_probe (vlib_main_t * vm,

/* Src ethernet address in ARP header. */
mac_address_from_bytes (&h0->ip4_over_ethernet[0].mac, hw_if0->hw_address);
if (sub_sw != sup_sw)
{
h0->ip4_over_ethernet[0].mac.bytes[5] = (u8)(adj0->rewrite_header.sw_if_index);
}

h0->ip4_over_ethernet[0].ip4 = *src;
h0->ip4_over_ethernet[1].ip4 = *dst;
Expand Down
50 changes: 50 additions & 0 deletions Helium/VPP/vpp-22.02/src/vpp/conf/kernel_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh -e
echo 12 > /sys/bus/pci/devices/0002\:02\:00.0/sriov_numvfs
ifconfig eth1 up

ip link set eth1 vf 0 trust on
ip link set eth1 vf 1 trust on
ip link set eth1 vf 2 trust on
ip link set eth1 vf 3 trust on
ip link set eth1 vf 4 trust on
ip link set eth1 vf 5 trust on
ip link set eth1 vf 6 trust on
ip link set eth1 vf 7 trust on
ip link set eth1 vf 8 trust on
ip link set eth1 vf 9 trust on
ip link set eth1 vf 10 trust on
ip link set eth1 vf 11 trust on

ip link set eth1 vf 0 mac 10:11:22:33:44:11
ip link set eth1 vf 1 mac 10:11:22:33:44:22
ip link set eth1 vf 2 mac 10:11:22:33:44:33
ip link set eth1 vf 3 mac 00:11:22:33:44:44
ip link set eth1 vf 4 mac 00:11:22:33:44:55
ip link set eth1 vf 5 mac 00:11:22:33:44:66
ip link set eth1 vf 6 mac 00:11:22:33:44:77
ip link set eth1 vf 7 mac 00:11:22:33:44:88
ip link set eth1 vf 8 mac 00:11:22:33:44:99
ip link set eth1 vf 9 mac 00:11:22:33:44:aa
ip link set eth1 vf 10 mac 00:11:22:33:44:bb
ip link set eth1 vf 11 mac 00:11:22:33:44:cc

ip link set eth1 vf 0 vlan 1
ip link set eth1 vf 1 vlan 2
ip link set eth1 vf 2 vlan 3
ip link set eth1 vf 3 vlan 4
ip link set eth1 vf 4 vlan 5
ip link set eth1 vf 5 vlan 6
ip link set eth1 vf 6 vlan 7
ip link set eth1 vf 7 vlan 8
ip link set eth1 vf 8 vlan 9
ip link set eth1 vf 9 vlan 10
ip link set eth1 vf 10 vlan 11
ip link set eth1 vf 11 vlan 12

ifconfig eth4 down
/home/admin/dpdk-devbind.py -b vfio-pci 0002:02:00.{1,2,3,4,5,6,7} 0002:02:01.{0,1,2,3,4} 0002:03:00.0 0002:04:00.0

sysctl -w vm.nr_hugepages=10
mkdir -p /mnt/huge_2M
mount -t hugetlbfs none /mnt/huge_2M -o pagesize=2MB
echo 512 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
101 changes: 101 additions & 0 deletions Helium/VPP/vpp-22.02/src/vpp/conf/startup_12vf.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
unix {
nodaemon
log /var/log/vpp/vpp.log
full-coredump
cli-listen /run/vpp/cli.sock
gid vpp
interactive
}

api-trace {
on
}

api-segment {
gid vpp
}

socksvr {
default
}

cpu {

main-core 0

corelist-workers 1-22
}

buffers {
## Increase number of buffers allocated, needed only in scenarios with
## large number of interfaces and worker threads. Value is per numa node.
## Default is 16384 (8192 if running unpriviledged)
buffers-per-numa 524288

## Size of buffer data area
## Default is 2048
# default data-size 2048
}

dpdk {
# Change default settings for all interfaces
dev default {
num-rx-queues 22
num-tx-queues 22
}

## Whitelist specific interface by specifying PCI address
dev 0002:02:00.1 {
name X1
}
dev 0002:02:00.2 {
name X2
}
dev 0002:02:00.3 {
name X3
}
dev 0002:02:00.4 {
name X4
}
dev 0002:02:00.5 {
name X5
}
dev 0002:02:00.6 {
name X6
}
dev 0002:02:00.7 {
name X7
}
dev 0002:02:01.0 {
name X8
}
dev 0002:02:01.1 {
name X9
}
dev 0002:02:01.2 {
name X10
}
dev 0002:02:01.3 {
name X11
}
dev 0002:02:01.4 {
name X12
}
dev 0002:03:00.0 {
name C1
}
dev 0002:04:00.0 {
name C2
}

socket-mem 1024

num-mbufs 262144
}


plugins {
plugin default { disable }
plugin dpdk_plugin.so { enable }
}