Age | Commit message (Collapse) | Author | Files | Lines |
|
Also fixed minor issues such as
- prevent using vdev on DPDK <= 17.05 as not supported
- potential segmentation fault after panic (if panic thrown early
in prox initialization)
Change-Id: I49a1962e95a4a44dddadd1fdd906e1b3b232465c
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
- vdev devices now support VLAN.
- kernel tap device can be configured with a netmask (/24 was
always used in previous version).
- when sending a (fake) packet to the kernel, this packet will now
not be routed by the kernel (i.e. it will leave through the
interface configured by PROX). This might change in the futture
when PROX supports multiple VLANs per port. But today it prevents
ARP being sent on management interfaces.
- Log error in case kernel unable to send packet.
- Added support for comments (';') in lua sections.
- Prevent duplication of local_ipv4 - should now be configured in port section
local_ipv4 in core section still supported
Change-Id: I8f9a40fe6ad6f3013ff91b58b44627c7f34081e6
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Following messages are now handled by PROX
- router_solicitation
- neighbour_solicitation
- router_advertisement
- neighbour_advertisement
The following parameters are supported (through the PROX config file)
- sub mode=ndp
This will enable handling of router and neighbour solicitation
and advertisement.
- local ipv6=xxxx:xxxx:xxxxx:xxxx:xxxx:xxxx:xxxx:xxxx
This will configure the local IPv6 address of the port.
This parameter is optional. If not specified, the local IPv6
will be calculated from the EUI.
- global ipv6=xxxx:xxxx:xxxxx:xxxx:xxxx:xxxx:xxxx:xxxx
This will configure the global IPv6 address of the port.
This parameter is optional. If not specified, the global IPv6
will be calculated from the EUI and the router prefix received
from the router.
- ipv6 router=yes
This will cause the core to behave as an IPv6 router
i.e. it will generate Router Advertisement messages
This is only useful in back to back cases, when no real
IPv6 router is present in the setup.
- router prefix=xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
The router prefix usedin the router advertisement
The prefix will be used by the node to build an IPv6 global
address in cases none were configured.
"Unsollicited NA" parameter has been added within the core/task section.
If set to yes (Unsollicited NA=yes), then an unsollicited neighbour
Advertisement is sent at startup
A same core/task cannot support both l3 and ndp mode.
Those messages will be generated or handled when submode
is set to "ndp":
- neighbour sollicitation
- neighbour advertisement
- router sollicitation
- router advertisement
An example configuration is provided: config/ipv6.cfg in which
port 0 / core 1 plays the role of the generator and port 1 /
core 2 plays the role of the swap.
Change-Id: Id0ab32d384448b4cf767fb4a1c486fc023f4f395
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
In Prox configuration IMIX can be specified using the following syntax:
imix=pkt_size,pkt_size... Up to 127 different pkt sizes can be specified.
Through command line, the following syntax can be used
imix core_id task_id pkt_size,pkt_size... Up to 127 packet sizes can be specified.
When IMIX is enabled, PROX will loop through the list of packet sizes.
PROX supports two different submodes to handle pcap files.
In the 1st submode (default, no submode specified), timestamps from
the pcap file are ignored. In this submode IMIX is supported as well and each
packets in the pcap file will be generated with all IMIX sizes.
In the second submode, called pcap in gen mode, packets are generated at
the timestamp specified in the pcap file. This submode does not support IMIX.
Change-Id: I53cbf1378a5364254285b81e6848350d98561184
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
A virtual device can be created adding the following option on the eal field within
the eal options section:
--vdev=net_ring0
This will cause a new (virtual) dpdk port to be created.
Such a device can then be used in a primary process as other DPDK devices i.e.
a [port x] section must be defined in the configuration file
For a secondary process, there is no need to add --vdev, but, of course
--proc-type=secondary (or --proc-type=auto) must be set within the eal field.
There are two ways to use such a virtual device in a secondary process
1) Using the DPDK port number. Note however that the DPDK port number of virtual devices
in the secondary process might not start from 0 and might hence have to be guessed
e.g. if using 2 virtual devices in primary process (--vdev=net_ring0 --vdev=net_ring1)
the port_id will be 0 and 1 in primary process and 2 & 3 in secondary process.
2) Using the port name, as defined in --vdev in the primary process. In this way,
no [port] section must be defined, and the virtual port names are directly used within
the "rx port" and "tx port" configuration e.g.:
rx port=net_ring0
tx port=net_ring1
Limitations
===========
There seems to be a PROX leak causing DPDK port id to increase when restarting the
secondary process (causing the secondary process configuration through port id more difficult).
As the primary process configures the port (including the number of rx and tx queues)
based on its config file, the secondary process can't setup its own queues.
Simple configurations (such as using gen or lat in primary, and swap in secondary) work as PROX
allocates a RX queue even in gen mode and a TX queue even in lat mode. Better configuration/support
for secondary process should be designed.
The use of dpdk port names is only supported by PROX within "rx port" and "tx port". It is not
supported by other configuration fields such as "tx ports from routing table".
The use of dpdk port names in "rx port" and "tx port" is limited to only 1 port.
Change-Id: Iaa606625da471403713a21df79d3ded4bb91b91e
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
For kernel supported devices, add for vlan tag support
This can be configured through port parameter:
vlan tag=<vlan tag>
If this parameter is set, a vlan tagged interface is created
on top of the tap device
This is only supported for vdev tap devices
When sending (untagged) packet to the tap device (through socket)
the tap should react in sending tagged packet
Note that receiving in L3 mode (w/o tap support) a tagged packet
is not yet supported.
Change-Id: I363fa2f8d2341ac41ef23620222ece1d944bf336
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Through this commit BGP messages are forwarded to tap device
Netlink messages are enabled to receive route Updates.
In addition, generating tasks can also specify a routing table
which will be used when sending packets
The routes initialized by the routing table can be changed through
the reception of BGP messages
Change-Id: I187ba9a921885cbc9b209aae5fb654309e3388b8
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Through this commit ARP and ICMP messages are forwarded to the kernel
when vdev tap devices are enabled, as well as PROX l3 mode.
ICMP support has also been added to master (i.e. PROX L3 mode) and to
swap (so when L3 submode is not enabled).
Change-Id: Ie6bf52cbae7171bfca041ff18651d4ec866f44cd
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
This commit adds support for the creation of tap devices.
To create a tap device, and associate it with a DPDK port,
add within the port section:
vdev=<tap_name>
local ipv4=<ip_assigned_to_port>
<tap_name> will appear as a kernel network device, with an IP <ip_assigned_to_port>
ARP packets received from the network on the DPDK interface will be forwarded to the kernel.
1st packet which needs to be generated to a new IP will cause an IP packet
to be sent to the kernel (using socket sendto) forcing the kernel to send an ARP_REQUEST.
In this commit, there is no notification from the kernel about ARP table changes.
This is subject to further commits.
Two config files, gen_tap.cfg and swap_tap.cfg have been created. They work one against each other.
*** Note however that they do not work if running within the same host
(with the port being connected back to back) ***
This is due to the fact that the kernel would bypass the ports and use local interface...
Change-Id: Iadeec0d99e3c693472ea44bdb9163a3bf97df2fa
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Change-Id: I58fa7a0ab7aaa27e9f9383f7995bb71bf0952618
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Change-Id: I090bf8f1cd5a5d2dfa4f336bc66c46cc03d6c5bb
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
This commit prepares PROX for supporting changes from DPDK 19.08
Mainly, the "sed" listed below were run.
In addition,
- some forward definition have been removed,
- prox_compat.h has been updated
- prox_compat.h has been included where necessary.
Hence such a commit is rather easy to review and to reapply
on other branches if necessary.
sed -i 's/struct ether_hdr/prox_rte_ether_hdr/g' *.h
sed -i 's/struct ether_hdr/prox_rte_ether_hdr/g' *.c
sed -i 's/struct ether_addr/prox_rte_ether_addr/g' *.c
sed -i 's/struct ether_addr/prox_rte_ether_addr/g' *.h
sed -i 's/prox_rte_ether_addr_port/struct ether_addr_port/g' *.c
sed -i 's/prox_rte_ether_addr_port/struct ether_addr_port/g' *.h
sed -i 's/struct vlan_hdr/prox_rte_vlan_hdr/g' *.c
sed -i 's/struct vlan_hdr/prox_rte_vlan_hdr/g' *.h
sed -i 's/struct ipv4_hdr/prox_rte_ipv4_hdr/g' *.h
sed -i 's/struct ipv4_hdr/prox_rte_ipv4_hdr/g' *.c
sed -i 's/struct ipv6_hdr/prox_rte_ipv6_hdr/g' *.c
sed -i 's/struct ipv6_hdr/prox_rte_ipv6_hdr/g' *.h
sed -i 's/struct udp_hdr/prox_rte_udp_hdr/g' *.c
sed -i 's/struct udp_hdr/prox_rte_udp_hdr/g' *.h
sed -i 's/struct tcp_hdr/prox_rte_tcp_hdr/g' *.c
sed -i 's/struct tcp_hdr/prox_rte_tcp_hdr/g' *.h
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.c
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/struct prox_rte_ether_addr_copy/prox_rte_ether_addr_copy/g' *.c
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_addr_copy/ether_addr_copy/g' *.c
sed -i 's/ether_addr_copy/prox_rte_ether_addr_copy/g' *.c
sed -i 's/ether_addr_copy/prox_rte_ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_hdr_arp/struct ether_hdr_arp/g' *.h
sed -i 's/prox_rte_ether_hdr_arp/struct ether_hdr_arp/g' *.c
sed -i 's/struct vxlan_gpe_hdr/prox_rte_vxlan_gpe_hdr/g' *.h
sed -i 's/struct vxlan_gpe_hdr/prox_rte_vxlan_gpe_hdr/g' *.c
sed -i 's/eth_random_addr/prox_rte_eth_random_addr/g' *.c
sed -i 's/eth_random_addr/prox_rte_eth_random_addr/g' *.h
sed -i 's/ETHER_CRC_LEN/PROX_RTE_ETHER_CRC_LEN/g' *.c
sed -i 's/ETHER_CRC_LEN/PROX_RTE_ETHER_CRC_LEN/g' *.h
sed -i 's/ETHER_HDR_LEN/PROX_RTE_ETHER_HDR_LEN/g' *.c
sed -i 's/ETHER_HDR_LEN/PROX_RTE_ETHER_HDR_LEN/g' *.h
sed -i 's/ETHER_MAX_LEN/PROX_RTE_ETHER_MAX_LEN/g' *.c
sed -i 's/ETHER_MAX_LEN/PROX_RTE_ETHER_MAX_LEN/g' *.h
sed -i 's/ETHER_MIN_LEN/PROX_RTE_ETHER_MIN_LEN/g' *.c
sed -i 's/ETHER_MIN_LEN/PROX_RTE_ETHER_MIN_LEN/g' *.h
sed -i 's/TCP_SYN_FLAG/PROX_RTE_TCP_SYN_FLAG/g' *.c
sed -i 's/TCP_RST_FLAG/PROX_RTE_TCP_RST_FLAG/g' *.c
sed -i 's/TCP_FIN_FLAG/PROX_RTE_TCP_FIN_FLAG/g' *.c
sed -i 's/TCP_ACK_FLAG/PROX_RTE_TCP_ACK_FLAG/g' *.c
Change-Id: I4dfe8be68e618c94dcaae28754579fbeb571bb00
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Change-Id: Ic452b22dc2522a1b49e3091cb25f2784bc505b41
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Change-Id: I7c3e2981692d823c86787b77d61190327d6448e4
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Multicast can be enabled through configuration or through command line
- Through configuration
Add multicast=mcast_address (e.g. multicast=01:00:5e:01:02:03) in the port
section
- Through command line
run enable multicast port_id mcast_address (e.g. enable multicast 1 01:00:5e:01:02:03)
IGMP join message is sent unsollicited through command line:
join igmp core_id task_id ip (e.g. join igmp 1 0 224.1.1.3)
To enable swap answering IGMP Query (w/ IGMP Join)
- Through configuration
Add igmp ipv4=ip_address within the core/task section
- Through command line
join igmp core_id task_id ip (e.g. join igmp 1 0 224.1.1.3)
(this will 1st initiate an unsollicated join, then answer any subsequent query)
UDP/TCP packets received on a multicast address (224.0.0.0 => 239.255.255.255) are discarded
To stop sending responses to IGMP query:
leave igmp core_id task_id
Change-Id: I3808ccabf3b38b5a1e10e1b044db63aa05bcd7b5
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
This is required for instance on gcc (GCC) 8.2.1 20180905
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Change-Id: Id86de5d39d77c5cbf168cc51434f436f84376a4c
|
|
"heartbeat timeout" (in second) can be specified as a global parameter
in PROX config file. If set, a timer is started when the first
command is received from the TCP socket. This timer is reset at each
commands received through the TCP socket. If the timer expires, then
- all cores are stopped
- the TCP socket is closed, causing an error at client side.
This feature helps in case a script starts PROX and the traffic generated
through PROX causes issues to the control plane.
Change-Id: I900f22fa091786a564f6b7d846f5abc2c5cbcc58
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
scheduler priority"
|
|
Add warning if gateway_ip is configured and l3 is not configured.
If l3 sub mode is not configured, then gateway_ip parameter is ignored
(an error is not returned to make it easy to switch from an l3 sub
mode to default submode).
Change-Id: Ica4a522b037a024dd54bf616d32d69e29d5b8b92
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
priority
Set "realtime scheduling=yes" option to change Linux scheduler policy
to SCHED_RR and increase the priority to the maximum possible for the policy.
Change-Id: I3ecef5cbc3816cf2b56364bb4e806ae5ac093c23
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
L3 mode supports two timers:
- arp_update_time, defaulted to 1 second, which makes PROX to send
arp request every second for active flows
- arp_timeout, previously defaulted to 30 seconds, which makes PROX
consider a MAC address as invalid if no arp_reply was received
within those 30 seconds.
Those timers values were hardcoded. They can now be configured through
the configuration file (within the core section), using resp.
"arp update time" and "arp timeout" keywords. Unit is milli seconds.
The default becomes respectively 1 second and 2 weeks.
Change-Id: I35e46e97df32ca44c2cdfae85a20ee015de5d6e1
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
JIRA: SAMPLEVNF-149
VLAN can be enabled on a port by adding "vlan=yes" in the port section.
When VLAN is enabled on a port, then DEV_RX_OFFLOAD_VLAN_STRIP
and DEV_TX_OFFLOAD_VLAN_INSERT are enabled (if device supports it).
This will cause VLAN to be stripped from any packets received with
the proper tag, and VLAN to be added for any packets being transmitted.
The VLAN ID themselves are configured through the physical function
using something like (where ens801f1 isthe PF):
ip link set ens801f1 vf 0 vlan 1111
Change-Id: I945c87b0c18565da479ecaa08e5ffce91232a7ce
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Improve DPDK 18.05 support introduced by 3e532aca.
Support for DPDK 18.08.
Change-Id: Ide712ee94254b506a0ad88c95a7e01b789f99d48
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
mbuf size was setup to achieve the best performance i.e.
using the smallest mbuf and not segmenting packets.
However this resulted in complex code, much dependent of the way
the pmd are working e.g. a change(fix) in recent dpdk i40e
implementation caused a 1782 (=1518+8+256) bytes mbuf to be too
small to hold a 1518 bytes packets.
Hence this change simplifies the mbuf size selection at the price
of a potential decreases in performance - as more memory is now used.
Except if jumbo frames are used, the mbuf size will now be the same
for all modes. The packets will not be segmented except if jumbo
frames are enabled.
If jumbo frames are enabled, packets are by default segmented, except
if the mbuf size is configured big enough in the config file.
Change-Id: I222fcac7a65c0d221d5d422f419deb9c0f864172
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
|
|
Add support for pkt_inline of jumbo frames.
Dump the whole packet, and not a truncated packet. This might
have a small impact on performance as the memory footprint
is increased (by ~640K * number of tasks), resulting in potential
higher DTLB misses.
Change-Id: I4ed02be7ca899db4f8f97355c180a92d69d39d8f
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Jumbo frames are now supported through the addition of a "mtu"
parameter of the port in the config file.
Setting the mtu to a value higher than 1500 bytes will enable
the reception of jumbo frames.
In addition, the rte_eth_dev_set_mtu is now set for all pmds.
Finally, setting mbuf_size does not set MEMPOOL_F_NO_SPREAD
anymore. This option was only used for pure debugging.
Big packets can be received using two ways
- Using multiple "small" mbufs, i.e. around 2K. This is the default.
- Using one big mbuf holding the whole packet. This can be enabled
by setting a parameter mbuf_size in the receiving core configuration
Change-Id: Idd60ad31f41c89f9522dff4d894af2696b7a2ea1
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
irq mode can be used to show how a core is interrupted by other tasks.
This mode does not handle packets. It only loops reading tsc.
When the difference between two consecutive calls to rdtsc() is high
then it means the core was interrupted.
This task implementes the display, so that we can see a histogram of
interrupts as well as the maximum, per core.
Command line is also supported, through "show irq buckets" (too show
the intervals of each buckets, in micrcoseconds), and the stats
command line (showing the number of items in each buckets and the max)..
Change-Id: I153cc3deaa7b86ae2776ea44e46ef9ecfd116992
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
|
|
L2fwd and swap has many options to set src mac. swap was supposed
to support the ability to use port mac, but config file parsing was
wrong. L2fwd was using port mac if a port was available and if
src mac=packet or if there was no src mac in the config.
Now l2fwd supports the following options
- "src mac=xx:xx:xx:xx:xx:xx" => this mac address is used as src mac.
- "src mac=packet" => the src mac is taken from the dst mac of the
received packet.
- "src mac=hw" => the src mac is taken from the mac address of the port,
if there is a physical port. Error otherwise.
- "src mac=no" => src mac kept untouched
- No "src mac" => same as "src mac=hw" if there is a physical port
and same as "src mac=packet" otherwise.
Default is (no "src mac") hence the mac is taken from the tx port if there
is one tx port and from the packet otherwise.
swap support is similar, except that it does not support "src mac=no".
Change-Id: I70fe49a61c2e85772288b769ede14a7a6205d122
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Change-Id: I5611ead4b61b23d6c1c983852e8c75619e08ecf9
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
The l3 submode was not supported in nop mode, as the nop mode uses some
specific nop thread (and not generic). When L3 is specified, the nop mode
must use the generic thread. In addition the l3 submode is implemented
differently than other submodes. It is not supported through task_init
structures (i.e. each task does not have to explicitely tell that it
supports l3 submode). But this prevented to run both a nop with no submode
and a nop with a l3 submode. Note that nop with l3 is usually not very useful
- it handles arp (requests and response) but as nop, it does not swap IP
addresses. So with a real switch, the packets transmitted will be received
back... and l3 mode is usually mainly usefull when using a switch.
However, there is at least one nop mode where l3 submode makes sense:
when the nop does not transmit. In such cases, for instace used in
conjunction with a gen l3, the nop receives all packets and forward
the arp requests and responses to the master for handling.
Change-Id: I992121db285ba25a11cbb494092a6afc6fe55a58
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
|
|
Change-Id: Ie6d4e7ce22c27967117a446626f5923643397812
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
|
|
Change-Id: I389389e5317d1a9d0d79cc1762d6f15d8287e36a
Signed-off-by: Alexander Komarov <alexander.komarov@intel.com>
Signed-off-by: Alexander Komarov <izard.ak@gmail.com>
|
|
JIRA: SAMPLEVNF-55
PROX is a DPDK-based application implementing Telco use-cases such as
a simplified BRAS/BNG, light-weight AFTR... It also allows configuring
finer grained network functions like QoS, Routing, load-balancing...
(We are moving PROX version v039 to sampleVNF
https://01.org/intel-data-plane-performance-demonstrators/prox-overview)
Change-Id: Ia3cb02cf0e49ac5596e922c197ff7e010293d033
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
|