Currently, if requested MTU is bigger than mbuf size and scattered
receive is not enabled, setting MTU to that value fails.
This patch allows setting this special MTU when device is stopped,
because scattered_rx will be re-configured during next port start
and driver may enable scattered receive according new MTU value.
After this patch, driver may select different receive function
automatically after MTU set, according MTU values selected.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Enable IPv6 support with rte_flow API.
Only supports signature Match.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Enable signature match for rte_flow API.
RTE_FLOW_ITEM_TYPE_FUZZY specify a signature match.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Code cleanup done for 2 purposes.
1. "index" variable is no more needed.
2. inline function makes it easier and safer to nest into a loop.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
In current implementation, when checking VF link state, PF state
is checked too, although the function has a parameter to tell
if PF state checking is needed.
But in some scenario, user may not care about the PF state.
This patch enables the unused parameter to only check the VF
link state.
Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Hardware PTYPE in Rx desc will be parsed to fill mbuf's packet_type.
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Device name resides in two different locations, in rte_device->name and
in ethernet device private data.
For now, the copy in the ethernet device private data is required for
multi process support, the name is the how secondary process finds about
primary process device.
But for drivers there is no reason to use the copy in the ethernet
device private data.
This patch updates PMDs to use only rte_device->name.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Since SSE4 is now part of minimum requirements for DPDK on x86, we no
longer need this fallback code.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Change the rte_eth_dev_callback_process function to return int,
and add a void *ret_param parameter.
The new parameter is used by ixgbe and i40e instead of abusing
the user data of the callback.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Fixing typos across dpdk source code using codespell utility.
Skipped the ethdev driver's base code fixes to keep the base
code intact.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Isolated mode can be requested by applications on individual ports to avoid
ingress traffic outside of the flow rules they define.
Besides making ingress more deterministic, it allows PMDs to safely reuse
resources otherwise assigned to handle the remaining traffic, such as
global RSS configuration settings, VLAN filters, MAC address entries,
legacy filter API rules and so on in order to expand the set of possible
flow rule types.
To minimize code complexity, PMDs implementing this mode may provide
partial (or even no) support for flow rules when not enabled (e.g. no
priorities, no RSS action). Applications written to use the flow API are
therefore encouraged to enable it.
Once effective, leaving isolated mode may not be possible depending on PMD
implementation.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
rte_driver->name has the driver name and all physical and virtual
devices has access to it.
Previously it was not possible for virtual ethernet devices to access
rte_driver->name field (because eth_dev used to keep only pci_dev),
and it was required to save driver name in the device private struct.
After re-works on bus and vdev, it is possible for all bus types to
access rte_driver.
It is able to remove the driver name from ethdev device private data and
use eth_dev->device->driver->name.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Jan Blunck <jblunck@infradead.org>
When the last fdir flow be destroyed, the flag "mask_added"
should be reset, so the remain mask info will not take effect
when a new flow be added.
Fixes: a14de8b498 ("net/ixgbe: destroy consistent filter")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Move all bypass functions to ixgbe pmd and remove function
pointers from the eth_dev_ops struct.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch disables X550EM_X 1Gbase-t led_[on|off] support since
the LEDs are wired to the PHY and the driver can not access the
PHY. led_[on|off]
Support is disabled by setting the function pointer to NULL.
init_led_link_act is also set to NULL.
Signed-off-by: Wei Dai <wei.dai@intel.com>
This patch removes some some 1GBASE-T PHY access since the FW
configures the PHY. SW shall not configure or initialize link.
Accessing the PHY would require the use of MDI clause 22 which
should be avoided in high layer driver code.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Instead of many PMD define their own macro, define a generic one in
ethdev and use that in PMDs.
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>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
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>
See: 8f094a9ac5 ("mbuf: set mbuf fields while in pool")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The vector PMD is very sensitive to the layout of the mbuf, especially on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Different drivers use internal macros like force_inline for compiler
always inline feature.
Standardizing it through __rte_always_inline macro.
Verified the change by comparing the output binary file.
No difference found in the output binary file with this change.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@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>
There is a bug in previous fix for lsc interrupt.
lsc interrupt is not disabled before delayed handler,
that cause the delayed handler be re-entered.
Fixes: 9b66721070 ("net/ixgbe: fix blocked interrupts")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
hw->mac.ops.get_media-type() of ixgbe VF is NULL and should not
be called directly. It had better be replaced by calling
ixgbe_get_media_type( ) to avoid crash.
Fixes: c12d22f65b ("net/ixgbe: ensure link status is updated")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Laurent Hardy <laurent.hardy@6wind.com>
Add a comment documenting explicitly that we are falling through the case
statements to the next one.
Fixes: f9072f8b90 ("ixgbe: migrate flow director filtering to new API")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.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>
Return mbuf points of _recv_raw_pkts_vec are modified out of bound.
Fixes: c95584dc2b ("ixgbe: new vectorized functions for Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
There exists case that software sets mtu (i.e jumbo frame) of
ixgbe device when it's stopped. Before the fix, scattered_rx
is cleared during device stop, and setting jumbo frame mtu
after device stop will always fail as scattered_rx is 0.
Signed-off-by: Jia Yu <jyu@vmware.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Some customers find that 82599 NIC DPDK VF PMD can't receive any
broadcast packets when it is bound to igb_uio in the first time
to run a DPDK application like testpmd. But when the application
is quited and run again, the DPDK VF PMD can receive broadcast
packets again. The associated PF is run by kernel driver when
the VF is driven by DPDK PMD.
Fixes: 260e2e22e2 ("net/ixgbe/base: move multicast mode update")
Fixes: 72dec9e37a ("ixgbe: support multicast promiscuous mode on VF")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Pool 0 is not PF, it's VF 0. So the MAC is set for VF 0
but not PF.
The code introduced a weird issue. In the scenario PF + VF,
when only starting PF, the default PF MAC address is working.
But after starting a VF, the default PF MAC address becomes
the VF's address.
Use the pool which is not occupied by VFs for PF to fix it.
Fixes: 8164fe8284 ("ixgbe: add default mac address modifier")
Cc: stable@dpdk.org
Signed-off-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:
ixgbe_dev_xstats_get_by_ids() which retrieve
values of statistics specified by ids array
and ixgbe_dev_xstats_get_names_by_ids() 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>
Add the support of RTE_FLOW_ITEM_TYPE_SCTP type packet for
ixgbe ntuple filter.
Fixes: 672be56d76 ("net/ixgbe: parse n-tuple filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
In case of fiber and link speed set to 1Gb at peer side (with autoneg
or with defined speed), link status could be not properly updated at
time cable is plugged-in.
Indeed if cable was not plugged when device has been configured and
started then link status will not be updated properly with new speed
as no link setup will be triggered.
To avoid this issue, IXGBE_FLAG_NEED_LINK_CONFIG is set to try a link
setup each time link_update() is triggered and current link status is
down. When cable is plugged-in, link setup will be performed via
ixgbe_setup_link().
Signed-off-by: Laurent Hardy <laurent.hardy@6wind.com>
Acked-by: Wei Dai <wei.dai@intel.com>
The type check for flow_type should be IXGBE_ATR_FLOW_TYPE_IPV4
in special card not RTE_ETH_FLOW_NONFRAG_IPV4_OTHER.
Fixes: dc0c16105d ("ixgbe: fix X550 flow director check")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
When Receive Side Coalescing (RSC) is not used, the RSC Disable
(RSC_DIS) filed of register Receive Filter Control Register (RFCTL)
should be set according to ixgbe datasheet.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
* Acquire PHY semaphore before device reset
* Add support for 2.5G KX physical layer
* Add MAC X550em/X557 LED on|off support
Signed-off-by: Wei Dai <wei.dai@intel.com>
This patch updates ixgbe_led_[on|off]_t_X550em for MAC or PHY connected
LEDs. To support both MAC or PHY connected LEDs, both MAC and PHY led
control registers are configured.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Add another define for the 2.5G KX physical layer. This requires all
variables and support functions that deal with "physical_layer" to be
bumped to u64 as this is the 33rd define.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
A recent firmware change fixed an issue to acquire the PHY semaphore
before accessing PHY registers. This led to a case where SW can issue
a device reset clearing the MDIO registers. This patch makes SW acquire
the PHY semaphore before issuing a device reset.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
ixgbe_dev_xstats_get_by_ids() which retrieve
values of statistics specified by ids array
and ixgbe_dev_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>
DPDK community has several emails discussion on this topic,
these mails link is bellow:
http://dpdk.org/ml/archives/dev/2017-March/060379.html,
http://dpdk.org/ml/archives/dev/2017-March/060295.html,
items like VLAN can already have several valid "types"
(0x88a8, 0x8100, 0x9100), and who knows what will come up
in the future.
And ixgbe_flow just ignores the types when do filter configuration.
So it may be reasonable to delete the related tpid check process.
Also add some more comment log on stack explanation.
Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Fix generic filter return info is not readable
when repeat to create a rule.
Fixes: 72c135a89f ("net/ixgbe: create consistent filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Create a new file rte_pmd_ixgbe.c for all the private
APIs. Move all the related code to the new file.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>