diff options
author | Konstantin Ananyev <konstantin.ananyev@intel.com> | 2017-02-21 18:12:20 +0000 |
---|---|---|
committer | Konstantin Ananyev <konstantin.ananyev@intel.com> | 2017-02-24 16:37:08 +0000 |
commit | aa97dd1ce910b839fed46ad55d1e70e403f5a930 (patch) | |
tree | f6f0fd494eaf499859bff9f20f5ddfac9ab99233 /examples/udpfwd/README | |
parent | f5f10013ffef8e4ac1071087b8492fe6380d98fe (diff) |
Introduce first version of TCP code.
Supported functionality:
- open/close
- listen/accept/connect
- send/recv
In order to achieve that libtle_udp library was
reworked into libtle_l4p library that supports
both TCP and UDP protocols.
New libtle_timer library was introduced
(thanks to Cisco guys and Dave Barach <dbarach@cisco.com>
for sharing their timer code with us).
Sample application was also reworked significantly
to support both TCP and UDP traffic handling.
New UT were introduced.
Change-Id: I806b05011f521e89b58db403cfdd484a37beb775
Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'examples/udpfwd/README')
-rw-r--r-- | examples/udpfwd/README | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/examples/udpfwd/README b/examples/udpfwd/README deleted file mode 100644 index 91b6e76..0000000 --- a/examples/udpfwd/README +++ /dev/null @@ -1,141 +0,0 @@ -Introduction -============ - -udpfwd is a sample application to demonstrate and test libtle_udp. -Depending on configuration it can do simple send/recv or both over -opened udp streams. Also it implements ability to do UDP datagram -forwarding between different streams, so it is possible to use that -application as some sort of 'UDP proxy'. -The application can reassemble input fragmented IP packets, -and fragment outgoing IP packets (if destination MTU is less then packet size). -To build and run the application DPDK and TLDK libraries are required. - -Logically the application is divided into two parts: - -- Back End (BE) -BE is responsible for: - - RX over DPDK ports and feed them into UDP TLDK context(s) - (via tle_udp_rx_bulk). - - retrieve packets ready to be send out from UDP TLDK context(s) - and TX them over destined DPDK port. -Multiple RX/TX queues per port are supported by RSS. Right now the number of -TX is same as the number of RX queue. -Each BE lcore can serve multiple DPDK ports, TLDK UDP contexts. - -- Front End (FE) -FE responsibility is to open configured UDP streams and perform -send/recv over them. These streams can belong to different UDP contexts. - -Right now each lcore can act as BE and/or FE. - -Usage -===== - -udpfwd <EAL parameters> -- \ - -P | --promisc /* promiscuous mode enabled. */ \ - -R | --rbufs <num> /* max recv buffers per stream. */ \ - -S | --sbufs <num> /* max send buffers per stream. */ \ - -s | --streams <num> /* streams to open per context. */ \ - -b | --becfg <filename> /* backend configuration file. */ \ - -f | --fecfg <filename> /* frontend configuration file. */ \ - <port0_params> <port1_params> ... <portN_params> - -port_params: port=<uint>,lcore=<uint>[-<uint>],\ -[rx_offload=<uint>,tx_offload=<uint>,mtu=<uint>,ipv4=<ipv4>,ipv6=<ipv6>] - -port_params are used to configure the particular DPDK device (rte_ethdev port), -and specify BE lcore that will do RX/TX from/to the device and manage -BE part of corresponding UDP context. Multiple BE lcore can be specified. - -port - DPDK port id (multiple queues are supported when multiple lcore - is specified for a port). -lcore - EAL lcore id to do IO over that port (rx_burst/tx_burst). - several ports can be managed by the same lcore, and same port can - belong to more than one lcore. -rx_offload - RX HW offload capabilities to enable/use on this port. - (bitmask of DEV_RX_OFFLOAD_* values). -tx_offload - TX HW offload capabilities to enable/use on this port. - (bitmask of DEV_TX_OFFLOAD_* values). -mtu - MTU to be used on that port - ( = UDP data size + L2/L3/L4 headers sizes, default=1514). -ipv4 - ipv4 address to assign to that port. -ipv6 - ipv6 address to assign to that port. - -At least one of ipv4/ipv6 values have to be specified for each port. - -As an example: -udpfwd --lcores='3,6,8' -w 01:00.0 -- \ ---promisc --rbufs 0x1000 --sbufs 0x1000 --streams 0x100 \ ---fecfg ./fe.cfg --becfg ./be.cfg \ -port=0,lcore=6,lcore=8,rx_offload=0xf,tx_offload=0,\ -ipv4=192.168.1.233,ipv6=2001:4860:b002::28 - -Will create TLDK UDP context on lcore=6 and lcore=8 (BE lcore) to manage -DPDK port 0. Will assign IPv4 address 192.168.1.233 and IPv6 address -2001:4860:b002::28 to that port. -The following supported by DPDK RX HW offloads: - DEV_RX_OFFLOAD_VLAN_STRIP, - DEV_RX_OFFLOAD_IPV4_CKSUM, - DEV_RX_OFFLOAD_UDP_CKSUM, - DEV_RX_OFFLOAD_TCP_CKSUM -will be enabled on that port. -No HW TX offloads will be enabled. - -If multiple lcore is specified per DPDK port, the following RSS hash will -be enabled on that port: - ETH_RSS_UDP - - -Fornt-End (FE) and Back-End (BE) configuration files format: ------------------------------------------------------------- - - each record on a separate line. - - lines started with '#' are treated as comments. - - empty lines (containing whitespace chars only) are ignored. - - kvargs style format for each record. - - each FE record correspond to at least one stream to be opened - (could be multiple streams in case of op="fwd"). - - each BE record define a ipv4/ipv6 destination. - -FE config record format: ------------------------- - -lcore=<uint>,op=<"rx|tx|echo|fwd">,\ -laddr=<ip>,lport=<uint16>,raddr=<ip>,rport=<uint16>,\ -[txlen=<uint>,fwladdr=<ip>,fwlport=<uint16>,fwraddr=<ip>,fwrport=<uint16>,\ -belcore=<uint>] - -lcore - EAL lcore to manage that stream(s) in the FE. -op - operation to perform on that stream: - "rx" - do receive only on that stream. - "tx" - do send only on that stream. - "echo" - mimic recvfrom(..., &addr);sendto(..., &addr); - on that stream. - "fwd" - forward packets between streams. -laddr - local address for the stream to open. -lport - local port for the stream to open. -raddr - remote address for the stream to open. -rport - remote port for the stream to open. -txlen - data length to send with each packet ("tx" mode only). -fwladdr - local address for the forwarding stream(s) to open - ("fwd mode only). -fwlport - local port for the forwarding stream(s) to open - ("fwd mode only). -fwraddr - remote address for the forwarding stream(s) to open - ("fwd mode only). -fwrport - remote port for the forwarding stream(s) to open - ("fwd mode only). -belcore - EAL lcore to manage that stream(s) in the BE. - -Refer to fe.cfg for an example. - -BE config record format: ------------------------- - -port=<uint>,addr=<ipv4/ipv6>,masklen=<uint>,mac=<ether> - -port - port number to be used to send packets to the destination. -addr - destionation network address. -masklen - desitantion network prefix length. -mac - destination ethernet address. - -Refer to fe.cfg for an example. |