Add two functions to support UDP tunneling port configuration.
There are "some" destination UDP port numbers that have unique meaning.
In terms of VxLAN, "IANA has assigned the value 4789 for the VXLAN UDP port,
and this value SHOULD be used by default as the destination UDP port.
Some early implementations of VXLAN have used other values for the destination
port. To enable interoperability with these implementations, the destination
port SHOULD be configurable."
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Define a new API umbrella to configure any kind of Rx filtering.
New functions:
- rte_eth_dev_filter_supported
- rte_eth_dev_filter_ctrl
Filter types, operations, and structures are defined specifically in new
header file lib/librte_eth/rte_dev_ctrl.h.
As to the implementation discussion, please refer to
http://dpdk.org/ml/archives/dev/2014-September/005179.html
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
[Thomas: rename ops and remove unused types]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Commit fbde27f1 (get default Rx/Tx configuration from dev info),
introduced a bug, which caused memory corruption in dev_info.
To get RX/TX configuration, both rx/tx queue setup functions were calling
dev_info_get from PMDs, so dev_info structure was not being reseted
before being populated.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Many sample apps use duplicated code to set rte_eth_txconf and rte_eth_rxconf
structures. This patch allows the user to get a default optimal RX/TX configuration
through rte_eth_dev_info get, and still any parameters may be tweaked as wished,
before setting up queues.
Besides, if a NULL pointer is passed to rte_eth_rx_queue_setup or
rte_eth_tx_queue_setup, these functions get internally the default RX/TX
configuration for the user.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
[Thomas: split patch]
To guarantee that RX/TX configuration structures are reseted
before modifying them, plus the other dev info fields,
dev info structure is zeroed beforehand.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
This method can be implemented by a poll mode driver to provide
non-standard statistics (which are not part of the generic statistics
structure). Each statistic is returned in a generic form: "name" and
"value" and can be used to dump PMD-specific statistics in the same way
than ethtool in linux kernel.
If the PMD does not provide the xstats_get and xstats_set functions, the
ethdev API will return the generic statistics in the xstats format
(name, value).
This commit opens the door for a clean-up of the generic statistics
structure, only keeping statistics that are really common to all PMDs
and moving specific ones into the xstats API.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: fix some comments]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
The commit 83b4113693 (add unique name to devices) didn't compile if
CONFIG_RTE_LIBRTE_ETHDEV_DEBUG is enabled.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The commit 8dbe82b073 (Tx rate limitation) didn't compile if
CONFIG_RTE_LIBRTE_ETHDEV_DEBUG is enabled.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Adding support to rte_eth_dev_data structure to support unique
name identifier for ethdevs to support adding slave ethdevs
(specifically virtual devices which have no public unique
identifier) to a link bonding device. This changes the API
rte_eth_dev_allocate() to require a const char *name when
allocating a ethdev, which also verifies that the name is
unique and hasn’t been already used by an existed allocated
rte_eth_dev. Also contains updates to virtual pmd’s to now call
the API with a name parameter.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Only some devices support the link state interrupt configuration option.
Link state control does not work in virtual drivers
(virtio, vmxnet3, igbvf, and ixgbevf). Instead of having the application
try and guess whether it will work or not provide a driver flag that
can be checked instead.
Note: if device driver doesn't support link state control, what
would happen previously is that the code would never detect link
transitions. This prevents that.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: rename flag]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
It is now possible to read link status updated by interrupt without
having manual link_update() service provided by the PMD.
Indeed link_update() is useless in interrupt case. So check of this
function pointer must be done in the interrupt case only.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This patch adds two new functions in ethdev api to retrieve current MTU and
change MTU of a port.
Only .mtu_set function is pmd specific.
pmd should update its max_rx_pkt_len if needed.
This operation has been implemented for rte_em_pmd, rte_igb_pmd and
rte_ixgbe_pmd.
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This avoids code duplication in PMD when dealing with mtu changes.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch adds a new function in ethdev api to retrieve current flow control
configuration.
This operation has been implemented for rte_em_pmd, rte_igb_pmd and
rte_ixgbe_pmd.
Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
To support i40e, new ops has been added to support setting
port based vlan insertion.
New command 'tx_vlan set pvid port_id vlan_id (on|off)'
has been added in testpmd to configure port based vlan insertion.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Heqing Zhu <heqing.zhu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
In ethdev, it ignores setting maximum packet length to less than
1518. The changes is to remove this limitation and let less than
1518 can be set for 'maximum packet length'.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Heqing Zhu <heqing.zhu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
This patch adds APIs for NIC filters list below:
ethertype filter, syn filter, 2tuple filter, flex filter, 5tuple filter
Signed-off-by: jingjing.wu <jingjing.wu@intel.com>
Reviewed-by: Vladimir Medvedkin <medvedkinv@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Add API to support setting TX rate for a queue and a VF.
Signed-off-by: Ouyang Changchun <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
This patch adds API to support the functionality of setting link up and down.
It can be used to repeatedly stop and restart RX/TX of a port without
re-allocating resources for the port and re-configuring the port.
Signed-off-by: Ouyang Changchun <changchun.ouyang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked by: Ivan Boule <ivan.boule@6wind.com>
icc 12.1 complains about RTE_LOG() format:
"argument is incompatible with corresponding format string conversion"
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [hence the number of files reporting 8 lines
changed in the diffstat].
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: remove spaces before tabs in libs]
[Thomas: remove more trailing spaces in non-C files]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This patch adds API to support queue start and stop functionality for RX/TX.
It allows RX and TX queue is started or stopped one by one, instead of starting
and stopping all of them at the same time.
Signed-off-by: Ouyang Changchun <changchun.ouyang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
1) Add a new function "rss_hash_conf_get" in the PMD API to retrieve the
current configuration of the RSS functions and/or of the RSS key used
by a NIC to compute the RSS hash of input packets.
The new function uses the existing data structure "rte_eth_rss_conf" for
returning the RSS hash configuration.
2) Add the ixgbe-specific function "ixgbe_dev_rss_hash_conf_get" and the
igb-specific function "eth_igb_rss_hash_conf_get" to retrieve the RSS
hash configuration of ixgbe and igb controllers respectively.
3) Add the command "show port X rss-hash [key]" in the testpmd application
to display the RSS hash configuration of port X.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
1) Add a new function "rss_hash_update" in the PMD API to dynamically
update the RSS flags and/or the RSS key used by a NIC to compute the RSS
hash of input packets.
The new function uses the existing data structure "rte_eth_rss_conf" for
the argument that contains the new hash flags and/or the new hash key to
use.
2) Add the ixgbe-specific function "ixgbe_dev_rss_hash_update" and the
igb-specific function "eth_igb_rss_hash_update" to update the RSS
hash configuration of ixgbe and igb controllers respectively.
Before changing anything, these 2 functions check that the update RSS
operation does not attempt to disable RSS, if RSS was enabled at port
initialization time, or does not attempt to enable RSS, if RSS was
disabled at port initialization time.
Note:
Configuring the RSS hash flags and the RSS key used by a NIC consists in
updating appropriate PCI registers of the NIC.
These operations have been manually tested with the interactive commands
"write reg" and "write regbit" of the testpmd application.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Each entry of the RSS redirection table (RETA) of igb and ixgbe ports
contains a 4-bit RX queue index, thus imposing RSS RX queue indices to
be strictly lower than 16.
In addition, if a RETA entry is configured with a RX queue index that is
strictly lower than 16, but is greater or equal to the number of RX queues
of the port, then all input packets whose RSS hash value indexes that RETA
entry are silently dropped by the NIC.
Make the function rte_eth_dev_rss_reta_update() check that RX queue indices
that are supplied in the reta_conf argument are strictly lower than
ETH_RSS_RETA_MAX_QUEUE (16) and are strictly lower than the number of
RX queues of the port.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This field is intended for pcap to describe the name of the interface
as known to Linux. It is an interface index, but can be translated into
an interface name using if_indextoname() function.
When using pcap, interrupt affinity becomes important, and this field
gives the application a chance to ensure that interrupt affinity is set
to the lcore handling the device.
Signed-off-by: Mats Liljegren <mats.liljegren@enea.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Some Poll-Mode Drivers (PMD) are not reconfigurable and,
thus, do not implement (rx|tx)_queue_release functions.
For these drivers, the functions rte_eth_dev_(rx|tx)_queue_config
must return an ENOTSUP error only when reconfiguring,
but not at initial configuration.
Move the FUNC_PTR_OR_ERR_RET check into the case of reconfiguration.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
1) Make device RX and TX offload capabilities to be returned in the
rte_eth_dev_info data structure by the function rte_eth_dev_info_get
The following initial set of RX offload capabilities are defined:
- VLAN header stripping
- IPv4 header checksum check
- UDP checksum check
- TCP checksum check
- TCP large receive offload (LRO)
The following initial set of TX offload capabilities are defined:
- VLAN header insertion
- IPv4 header checksum computation
- UDP checksum computation
- TCP checksum computation
- SCTP checksum computation
- TCP segmentation offload (Transmit Segmentation Offload)
- UDP segmentation offload
2) Update the eth_dev_infos_get() function of the igb and ixgbe PMDs
to return the offload capabilities which are supported by the
device and that are effectively managed by the driver.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Core support for using the Intel DPDK with Xen Dom0 - including EAL
changes and mempool changes. These changes encompass how memory mapping
is done, including support for initializing a memory pool inside an
already-allocated block of memory.
KNI sample app updated to use KNI close function when used with Xen.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
The function rte_eth_dev_allocate() was called by rte_eth_dev_init().
In order to use it for non-pci devices, it is now in public API.
Signed-off-by: Intel