The FEC (Forward Error Correction) feature can improve BER (Bit Error Rate)
but uses more power to do so. It also cannot be used with
EEE (Energy Efficient Ethernet).
EEE is an important feature, and we have no known BER issues, so FEC
is not needed.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The I2C mux control relies on the SDP setting in the ESDP register
so it is necessary to restore the value after a MAC reset. So,
put the code in a function so it can be used in more than one place.
Fixes: d2e72774e5 ("ixgbe/base: support X550")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
On some hardware platforms, the CS4227 does not initialize properly.
Detect those cases and reset it appropriately.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The driver now needs to issue a firmware command to inform the
firmware that a driver is coming up. This prevents the possibility
of the firmware and the driver configuring the PHY at the same
time. Upon completion of the command, the firmware will no longer
be configuring the PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
A retry count of 10 is likely to run into problems on X550 devices
that have to detect and reset unresponsive CS4227 devices. So,
reduce the I2C retry count to 3 for X550 and above. This should
avoid any possible regressions in existing devices.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Most I2C accesses take and release semaphores for each access. It's
also necessary to perform multiple I2C operations under the same
holding of the semaphore, so provide unlocked I2C methods for that
purpose.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
All bits in FDIRTCPM and FDIRUDPM are set to 1 when
ixgbe_fdir_set_input_mask_82599 is called. Not settings these bits will cause
TCP and UDP packets to be filtered out when NVGRE or VXLAN mode is enabled.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This patch moves the check of the return value from
ixgbe_start_hw_generic after the function is called.
Previously we had the code to disable relaxed ordering in
between, which seems a bit out of place.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Remove the redundant "from".
There's a typo in the code comment for FC end
of Frame Exception (FCEOFe/IPE), so fixed the typo.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Needed to run as non-root but with higher memory allocations, and
removes a constraint on no-huge mode being limited to 64M. A usage
example is if running with file input with the pcap PMD, which can be
done as non-root after this patch via e.g.,
./test-dpdk --no-huge -m 1024 -l 0,1 -n3
--vdev 'eth_pcap0,rx_pcap=eth-rx.pcap,tx_pcap=eth-tx.pcap'
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net>
Acked-by: David Marchand <david.marchand@6wind.com>
This change returns a system error code if tests fail when
running any of the "make test" targets.
This allows the tests to report failures while running in
continuous integration environments.
Previously "make test" returned $? == 0 for all combinations
of success, failure and exception conditions.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Each test requires a certain minimal amount of memory.
Spreading memory on all sockets means that the test will get less memory than
what it wanted on multi sockets system.
So replace all_sockets() with per_sockets().
Also doubled memory on group_5 as current requirement is not enough.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
This variable has undefined values in some cases.
Fixes: 422a20a4e6 ("app/testpmd: fix uninitialized flow control variables")
Signed-off-by: Ding Zhi <zhi.ding@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
[Thomas: split lines to conform with guidelines]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This is a modification of qos_sched example to use
librte_cfgfile for parsing configuration file.
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fix warning messages "cast to pointer from integer of different size" when
compiling DPDK in 32 bit with Mellanox PMD.
SGE addresses are 64 bit integers, converting them to pointers must be done
through uintptr_t to avoid compilation warnings when those have a different
size.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
When we migrate VM, without this feature, qemu will report error:
"migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature".
Signed-off-by: Krishna Murthy <krishna.j.murthy@intel.com>
In __rte_pktmbuf_prefree_seg(), there was an optimization to avoid using
a costly atomic operation when updating the mbuf reference counter if
its value is 1. Indeed, it means that we are the only owner of the mbuf,
and therefore nobody can change it at the same time.
We can generalize this optimization directly in rte_mbuf_refcnt_update()
so the other callers of this function, like rte_pktmbuf_attach(), can
also take advantage of this optimization.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Set the IP source and destination addresses in the IP header of the
ICMP reply as follows:
- Use the request IP source address as the reply IP destination address
- If the request IP destination address is a multicast IP address
- choose a reply IP source address different from the request IP
source address,
- re-compute the IP header checksum.
Otherwise
- switch the request IP source and destination addresses in the
reply,
- keep the IP header checksum unchanged.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Add the new interactive command:
mcast_addr add|remove X <mcast_addr>
to add/remove the multicast MAC address <mcast_addr> to/from the set of
multicast addresses filtered by port <X>.
Command used to test the function "rte_eth_dev_set_mc_addr_list"
that has been added to the API of PMDs.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
With the current PMD API, the receipt of multicast packets on a given
port can only be enabled by invoking the "rte_eth_allmulticast_enable"
function.
This method may not work on Virtual Functions in SR-IOV architectures
when the host PF driver does not allow such operation on VFs.
In such cases, joined multicast addresses must be individually added
in the set of multicast addresses that are filtered by the [VF] port.
For this purpose, a new function "set_mc_addr_list" is introduced
into the set of functions that are exported by a Poll Mode Driver.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: export new function in .map]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Fix NULL dereference if virtio control queue is not negotiated.
Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Negotiate the virtio ring size. The host may allow for very large
rings but application may only want a smaller ring.
Conversely, if the number of descriptors requested exceeds the virtio
host queue size, then just silently use the smaller host size.
This fixes issues with virtio in non-QEMU envirionments.
For example Google Compute Engine allows up to 16K elements
in ring.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Change the features from bit mask to bit number. This allows the
DPDK driver to use the definitions from Linux (yes the header
files already use a license compatiable with DPDK). This makes DPDK
driver handle future feature bit changes.
Get rid of double negative code in the feature bit intialization.
Instead just have a new define with the list of feature bits implemented.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Don't attempt to set the MAC address table unless the host allows
it in feature negotiation. Also, don't return a value from mac_table_set
since all callers ignore the return value.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
If negotiation with host says that controlling Rx mode is
not supported, then don't try.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Putting blank line between function and following conditional
just wastes screen space, and makes code less obvious.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Upcoming drivers will need to be able to support other bus types.
This is a transparent change to how struct eth_driver is initialized.
It has not function or ABI layout impact, but makes adding a later
bus type (Xen, Hyper-V, ...) much easier.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Fix trailing whitespace, space before tab and empty lines at end of file.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: fix indent and alignment in test_acl.h and test_sched.c]
Ran this code base through a script which:
- removes trailing whitespace
- removes space before tabs
- removes blank lines at end of file
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Fix spelling errors in strings and comments.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
The combined lib was being created after building the lib root dir.
With the new directory hierarchy, it should be created after the
drivers root dir instead.
Fixes: 980ed498eb ("drivers: create new directory")
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Li Wei <lw@cn.fujitsu.com>
It wouldn't check the configured maximum packet length, and then
the scattered receiving function wouldn't be selected at all even
if it wants to receive a jumbo frame. The fix is to select the
correct RX function according to the configurations.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Add coding standards document to guides directory. This document
codifies the current DPDK C coding conventions, to make it easier for
contributors to see the format their code should be in.
Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
As now subtree_id is not used acl_merge_trie() any more,
there is no point to calculate and maintain that information.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reported by Zi Hu:
"
cat test_data/rule1
@192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 52 6/0xff
@192.168.0.0/24 192.168.0.0/24 400 : 500 54 : 65280 6/0xff
@192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 65535 6/0xff
cat test_data/trace1
0xc0a80005 0xc0a80009 450 53 0x06
I run the test by:
sudo ./testacl -n 2 -c 4 -- --rulesf=./test_data/rule1
--tracef=./test_data/trace1
The result shows that the packet matches the second rule, which is wrong.
The dest port of the pkt is 53, so it should match the third rule.
"
Indeed there is problem at ACL build stage.
Sometimes acl_merge_trie() is too aggressive in trying to conserve
space at build time.
So it takes a wrong assumptions and didn't duplicate a node,
even when it should.
The easiest and safest fix seems to always duplicate a left non-root/non-leaf
node first, and let the further code to destroy the node, if it is not needed.
Reported-by: Zi Hu <huzilucky@gmail.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Remove 2 unneeded memset's. The info area is already cleared rte_eth_dev_info_get
and the statistics buffer is cleared by rte_eth_stats_get
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
The stats area is already cleared before calling eth_stats_get().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
eth_stats is already cleared by rte_eth_stats_get
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Using the "physical_package_id" as a fallback for determining the
numa node of a core tends to be unreliable. Fix this by using a
detection routine which reads the numa information from
/sys/devices/system/node and just returns a numa node of 0 on
failure.
Reported-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Add a command-line parameter to l3fwd, to allow the user to specify the
destination mac address for each ethernet port used.
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>