device_fh repsents the device id for a specific virtio net device.
Firstly, "int" would be big enough: we don't need 64 bit. Secondly,
this could let us avoid the ugly "%" PRIu64 ".." stuff.
And since ctx.fh is derived from device_fh, declare it as int, too.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Rich Lane <rich.lane@bigswitch.com>
Acked-by: Rich Lane <rich.lane@bigswitch.com>
rte_thread_setname was a macro defined only for Linux.
The function rte_thread_setname() can now be used on FreeBSD
as well on Linux.
It is required to build librte_pdump.
The macro was 0 for old glibc. The function is now returning -1.
The related logs are decreased from error to debug level because
it is not an important failure, just a debug inconvenience.
Fixes: 278f945402 ("pdump: add new library for packet capture")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
The rte_eth_dev_count() function will never return a value greater
than RTE_MAX_ETHPORTS, so that checking is useless.
Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
The debug logs must be enabled at compile-time and run-time.
There are also some internal flags in some examples to enable the debug
logs of the applications. They are now enabled in debug configs and
can be disabled thanks to the more generic logtype mechanism:
rte_set_log_type(RTE_LOGTYPE_USER1, 0);
Removing these #ifdef allows to test these code branches more easily
and avoid dead code pitfalls.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Change the fields of outer_mac and inner_mac in struct
rte_eth_tunnel_filter_conf from pointer to struct in order to
keep the code's readability.
Signed-off-by: Xutao Sun <xutao.sun@intel.com>
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
The names of function for tunnel port configuration are not
accurate. They're tunnel_add/del, better change them to
tunnel_port_add/del.
The old functions are directly replaced because the API and ABI
compatibility of ethdev are already broken in 16.04.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
pthread_setname_np() function added in glibc 2.12, using this function
in older glibc versions cause compile error:
error: implicit declaration of function "pthread_setname_np"
This patch adds "rte_thread_setname" macro and set it according
glibc >= 2.12 check, thread naming disabled for older glibc versions,
glibc versions that support "pthread_setname_np" will keep using this
function.
Fixes: 67b6d3039e ("eal: set name to threads")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
This patch adds support for pthread_setname_np on Linux and
pthread_set_name_np on FreeBSD.
Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: add name in tep_termination example]
The extended unified packet type is now part of the standard ABI.
As mbuf struct is changed, the mbuf library version is incremented.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.
To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Add the encapsulation and decapsulation options.
The two flags are enabled by default.
Sometimes we want to know the performance influence of
the encapsulation and decapsulation operations, and
I think we should add the two configuration options.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Add the bad Rx checksum statistics of inner IP and L4.
The number of packets with bad RX IP and L4 checksum in inner header is recorded.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Add the tso-segsz option for TSO offload.
If the 'tso-segsz' is not 0, it means TSO offload is enabled.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Add Tx checksum offload configuration for inner header.
For UDP tunneling packet, the inner Tx checksum offload means
inner IPv4 and inner L4(TCP/UDP/SCTP).
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Add the filter types for VXLAN packet.
The following filter type are added here.
- Inner MAC&VLAN and tenant ID
- Inner MAC and tenent ID, and Outer MAC
- Inner MAC and tenant ID
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Implement the VXLAN packet processing functions.
- VXLAN port configuration
- VXLAN tunnel setup
- VXLAN tunnel destroying
- VXLAN packet processing for Rx side
- VXLAN packet processing for Tx side
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Long <thomas.long@intel.com>
Add the common APIs of tunneling packet processing.
We are trying to create a framework for tunneling packet processing, which includes
- Tunnel port configuration
- Tunnel setup
- Tunnel destroying
- Tunneling packet processing for Rx side
- Tunneling packet processing for Tx side
- Tunnel parameter processing
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Long <thomas.long@intel.com>
Add some basic VXLAN definitions in vxlan.h file.
It includes VXLAN port information and VXLAN device structures.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Long <thomas.long@intel.com>
This patch creates the virtio devices management mechanism.
These functions are from the vHost example, which include:
- virtio device creation.
- virtio device destroying.
- virtio device maintenance.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
[Thomas: remove unused function validate_nb_devices()]
[Thomas: add maintainers section]