remove __rte_unused instances that are not required.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
vfio is the kernel framework used by the vfio-pci kernel driver.
DPDK drivers do not rely solely on vfio, but rather on vfio-pci to gain
access to pci resources.
Fixes: 0880c40113 ("drivers: advertise kmod dependencies in pmdinfo")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
For base code in drivers shared with other projects, disable the new
warnings from gcc 7 about unlabelled fall-through in switch statements.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
We find that VF receive address register is not set
if MAC address is assigned by PF. This patch fixes it.
Fixes: d82170d279 ("igb: add VF support")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
VF default MAC address be added in PF Mac address list
instead of VF MAC address list, makes VF can't receive
packets. This patch fixes this issue.
Fixes: be2d648a2d ("igb: add PF support")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Some customers find adding MAC addr to VF sometimes can fail,
but it is still stored in dev->data->mac_addrs[ ]. So this
can lead to some errors that assumes the non-zero entry in
dev->data->mac_addrs[ ] is valid.
Following acknowledgements are from specific NIC PMD
maintainer for their managing part.
This patch changes the ethdev internal API, it should not be
backported to a stable/LTS release so far.
Fixes: af75078fec ("first public release")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
eth_igb_xstats_get_by_id() which retrieve
values of statistics specified by ids array
and eth_igb_xstats_get_names_by_id() which retrieve
names of statistics specified by ids array.
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Revert patches to provide clear view for
upcoming changes. Reverted patches are listed below:
commit ea85e7d711 ("ethdev: retrieve xstats by ID")
commit a954495245 ("ethdev: get xstats ID by name")
commit 1223608adb ("app/proc-info: support xstats by ID")
commit 25e38f09af ("net/e1000: support xstats by ID")
commit 923419333f ("net/ixgbe: support xstats by ID")
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
eth_igb_xstats_get_by_ids() which retrieve
values of statistics specified by ids array
and eth_igb_xstats_get_names_by_ids() which retrieve
names of statistics specified by ids array.
Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
The patch change the prototype of callback function
(rte_intr_callback_fn) by removing the unnecessary parameter.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
The hardware offload capabilities are not being advertised for the EM PMD.
Because of this, applications that only enable these features if the device
advertises them will never do so.
Normally this is not an issue since normal packet processing should work
even if hardware offload is not available. But, in older versions of
Virtual Box the e1000 device emulation (Intel PRO/1000 MT Desktop 82540EM)
assumes that it should enable VLAN stripping even if the driver does not
request it. This means that any ingress packets that have a VLAN tag will
be stripped. Since the application did not request to enable VLAN
stripping it is not expecting these packets so they are not processed as
VLAN packets.
Regardless of the Virtual Box issue, the driver should be advertising
supported capabilities as is done in other drivers.
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior
to initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW".
And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST".
Fix it by moving the second line prior to the first one that mentioned
above.
Fixes: dffbaf7880 ("e1000: revert fix for multicast in VF")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Before this patch, the management of dependencies between directories
had several issues:
- the generation of .depdirs, done at configuration is slow: it can take
more than one minute on some slow targets (usually ~10s on a standard
PC without -j).
- for instance, it is possible to express a dependency like:
- app/foo depends on lib/librte_foo
- and lib/librte_foo depends on app/bar
But this won't work because the directories are traversed with a
depth-first algorithm, so we have to choose between doing 'app' before
or after 'lib'.
- the script depdirs-rule.sh is too complex.
- we cannot use "make -d" for debug, because the output of make is used for
the generation of .depdirs.
This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.
After this commit, "make config" is almost immediate.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Add support to the e1000 igb driver for the new API to force free
consumed buffers on Tx ring. This API is independent of the tx_rs_thresh
setting. With this API, buffers should be free even if tx_rs_thresh is
not met.
e1000 igb driver does not implement a tx_rs_thresh to free mbufs, it
frees a slot in the ring as needed. However, it could be implemented at
some future date.
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
The check of queue_id is done in all drivers implementing
rte_eth_rx_queue_count(). Factorize this check in the generic function.
Note that the nfp driver was doing the check differently, which could
induce crashes if the queue index was too big.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
dev_flags is wrongly overwritten with RTE_ETH_DEV_DETACHABLE value
in drivers after rte_eth_copy_pci_info().
Previous values of the dev_flags set in rte_eth_copy_pci_info(),
like RTE_ETH_DEV_INTR_LSC, are get lost. That will fail the device
configuration.
Fix by preventing dev_flags overwritten.
Fixes: 22dda618c0 ("pci: separate detaching ethernet ports from PCI devices")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.
CC: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
MAC-PHY desync may occur causing misdetection of link up event.
Disabling K1-off feature can work around the problem.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This works around a possible stalled packet issue, which may occur due to
clock recovery from the PCH being too slow, when the LAN is transitioning
from K1 at 1G link speed.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
For I217 revision 6, when entering Ultra Low Power (ULP) we need to enable
Low Power Link Up (LPLU) and disable Gig speed to make it work.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
LANPHYPC low duration of 10 usec was too low for some corner cases
causing interface mismatches during Ultra Low Power (ULP) exit.
This patch increases the LANPHYPC low duration to 1 msec.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
There are some client PHY Ultra Low Power (ULP) register bits that are
configured by the Manageability Engine (ME) FW.
The driver must ensure that these bits are cleared on exit from ULP.
Ordinarily the ME FW would do that, but there are cases in which the
FW is not present, and the driver must handle that.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
When Ultra Low Power (ULP) enabled, the client PHY needs to be set up
for link configuration after cable reconnected.
Previously link configuration was only done in auto-negotiate mode.
Do link configuration also in autoneg disabled mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add definition MAX_RX_JUMBO_FRAME_SIZE for igb.
All igb parts (82575 and newer) have 9.5K max jumbo frame size.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
I354 support was missing in the e1000_get_fw_version() which resulted in
the FW version not being reported. Support added.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The driver shouldn't give up if it fails to get the hardware mailbox lock.
This can happen in a situation where the PF-VF communication channel is
heavily loaded and causes complete communications failure between the PF
and VF drivers.
Add a counter and a delay. The driver will now retry ten times,
waiting one millisecond between retries.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
With new hardware (I219), Ultra Low Power (ULP) exit takes significantly
longer time. Therefore, driver must wait longer.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch adds a new function eth_igb_fw_version_get.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Attaching and detaching ethernet ports from an application
is not the same thing as physically removing a PCI device,
so clarify the flags indicating support. All PCI devices
are assumed to be physically removable, so no flag is
necessary in the PCI layer.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This makes struct rte_eth_dev independent of struct rte_pci_device by
replacing it with a pointer to the generic struct rte_device.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Only the drivers itself can decide if it could fill PCI information fields
of dev_info.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Create one macro for where PCI device information is extracted
from ethernet device. Makes later changes easier to review, and test.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jan Blunck <jblunck@infradead.org>
Add a new macro RTE_PMD_REGISTER_KMOD_DEP() that allows a driver to
declare the list of kernel modules required to run properly.
Today, most PCI drivers require uio/vfio.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
From the code, it looks like, hw->mac.autoneg, variable is used to
switch between calling either autoneg function or forcing
speed/duplex function. But this variable is not modified in
eth_em_start/eth_igb_start routines (it is always set to 1)
even while forcing the link speed.
Following discussion thread has some more information on this:
http://dpdk.org/ml/archives/dev/2016-October/049272.html
Signed-off-by: Ananda Sathyanarayana <ananda@versa-networks.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
add cb_arg parameter to the _rte_eth_dev_callback_process function.
Adding a parameter to this function allows passing information
to the application when an eth device event occurs such as
a VF to PF message.
This allows the application to decide if a particular function
is permitted.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Alex Zelezniak <alexz@att.com>
All macros related to driver registeration renamed from DRIVER_*
to RTE_PMD_*
This includes:
DRIVER_REGISTER_PCI -> RTE_PMD_REGISTER_PCI
DRIVER_REGISTER_PCI_TABLE -> RTE_PMD_REGISTER_PCI_TABLE
DRIVER_REGISTER_VDEV -> RTE_PMD_REGISTER_VDEV
DRIVER_REGISTER_PARAM_STRING -> RTE_PMD_REGISTER_PARAM_STRING
DRIVER_EXPORT_* -> RTE_PMD_EXPORT_*
Fix PMDINFOGEN tool to look for matches of RTE_PMD_REGISTER_*.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Add CKSUM_GOOD flag to distinguish a good checksum from an unknown one.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>