Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mOS Configuration #12

Open
tbarbette opened this issue Sep 10, 2017 · 4 comments
Open

mOS Configuration #12

tbarbette opened this issue Sep 10, 2017 · 4 comments

Comments

@tbarbette
Copy link
Contributor

Hi all,

I am a bit confused by the interface configuration. I've got two XL710 interfaces, ens6f0 and ens6f1. I bound them to igb_uio, and I got :

sudo ./nat -f config/mos.conf -c 1 -i 10.221.0.1                                                                                              
EAL: Detected 16 lcore(s)
EAL: Auto-detected process type: PRIMARY
EAL: Probing VFIO support...
EAL: PCI device 0000:00:19.0 on NUMA socket 0
EAL:   probe driver: 8086:15a1 net_e1000_em
EAL: PCI device 0000:02:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1583 net_i40e
EAL: PCI device 0000:02:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1583 net_i40e
[LoadConfigurationLowerHalf:1213] Interface 'dpdk0' not found

I tried to rename dpdk0/1 to ens6f0/1 in the mOS config but it does not work. I also tried without binding the interface first and I get the same message.

I'm not sure to understand what dpdk0 and dpdk1 refer to, are they real interfaces names? Or dpdk virtual name (dpdk, port 0) ? Should we rename our interfaces to dpdk0/dpdk1 instead of the default name ens6f0/ens6f1?

############### MOS configuration file ###############

#######################
# MOS-RELATED OPTIONS #
#######################
mos {
	forward = 1

	#######################
	##### I/O OPTIONS #####
	#######################
	# number of memory channels per socket [mandatory for DPDK]
	nb_mem_channels = 4

	# devices used for MOS applications [mandatory]
	netdev {
		dpdk0 0x00FF
		dpdk1 0x00FF
	}

	#######################
	### LOGGING OPTIONS ###
	#######################
	# NICs to print network statistics per second
	# if enabled, mTCP will print xx Gbps and xx pps for RX and TX
	stat_print = dpdk0 dpdk1

	# A directory contains MOS system log files
	mos_log = logs/

	########################
	## NETWORK PARAMETERS ##
	########################
	# This to configure static arp table
	# (Destination IP address) (Destination MAC address)
	arp_table {
        10.220.0.1 3c:fd:fe:9e:5c:40
        10.221.0.1 3c:fd:fe:9e:5c:41
        10.220.0.5 3c:fd:fe:9e:5b:60
        10.221.0.5 3c:fd:fe:9f:57:18 
	}

	# This is to configure static routing table
	# (Destination address)/(Prefix) (Device name)
	route_table {
        10.220.0.0/16 dpdk0
        10.221.0.0/16 dpdk1
	}

	# This is to configure static bump-in-the-wire NIC forwarding table
	# DEVNIC_A DEVNIC_B ## (e.g. dpdk0 dpdk1) 
	nic_forward_table {	
        dpdk0 dpdk1
	}

	########################
	### ADVANCED OPTIONS ###
	########################
	# if required, uncomment the following options and change them

	# maximum concurrency per core [optional / default : 100000]
	# (MOS-specific parameter for preallocation)
	# max_concurrency = 100000

	# disable the ring buffer [optional / default : 0]
	# use disabled buffered managment only for standalone monitors.
	# end host applications always need recv buffers for TCP!
	# no_ring_buffers = 1

	# receive buffer size of sockets [optional / default : 8192]
	# rmem_size = 8192

	# send buffer size of sockets [optional / default : 8192]
	# wmem_size = 8192

	# tcp timewait seconds [optional / default : 0]
	tcp_tw_interval = 30

	# tcp timeout seconds [optional / default : 30]
	# (set tcp_timeout = -1 to disable timeout checking)
	# tcp_timeout = 30
}

Thanks,
Tom

@tbarbette
Copy link
Contributor Author

Ok, I understood the problem. It is not very clear that the normal DPDK cannot be used, even with that the interfaces get renamed on Debian. It would be interesting to add documentation about those two facts ;)

@ajamshed
Copy link
Member

Hi tbarbette,

Thanks for reporting this issue. Recent kernels have started renaming interfaces and our setup.sh script needs to be updated. We will do something about this soon.

@tbarbette
Copy link
Contributor Author

Hi,
Nice ! I think (in the meantime at least) just one or two lines in the doc mentioning the udev rules and the fact that the original DPDK cannot be used would be very helpful.

This is the udev rules to place in "/etc/udev/rules.d/70-persistent-net.rules"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="3c:fd:fe:9e:5c:40", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="dpdk0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="3c:fd:fe:9e:5c:41", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="dpdk1"

Changing the MAC addresses, of course.

@ajamshed
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants