Commit Graph

618 Commits

Author SHA1 Message Date
Wei Zhao
c6e381c768 net/ixgbe: add queue index check in filter
Add queue index check when create filter rule, or
filter with invalid queue id can be created successfully.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-07-19 16:25:43 +03:00
Qi Zhang
30ad2bdb42 net/ixgbe: fix IPv6 flow create limitation for x550
The x550 family does not support ipv6-other flow as well as
ipv4-other flow, so add this limitation.

Fixes: 7d629caced ("net/ixgbe: enable IPv6 for consistent API")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-07-19 11:59:39 +03:00
Wei Zhao
d9347d2540 net/ixgbe: support 82599ES SCTP packet drop action
82599ES can support SCTP packet drop action, but the
configuration is different from TCP or UDP packet, so
it need to rework some FDIR related code to adapt
drop action rule of SCTP packet.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-07-19 11:59:39 +03:00
Qi Zhang
627a32214f net/ixgbe: fix drop action for signature match
Drop action is not supported by signature match, should return
error when try to create a signature match flow with drop action.

Fixes: a948d33bc0 ("net/ixgbe: enable signature match for consistent API")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-07-19 11:09:13 +03:00
Tiwei Bie
393c8e1eb5 net/ixgbe: remove an unnecessary goto
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2017-07-19 11:09:13 +03:00
Jingjing Wu
53d49d8d47 net/ixgbe: fix LSC interrupt
If LSC flag is changed to off at last device start, the
enable flag is not cleared in HW.
This patch fixes it.

Fixes: 0eb609239e ("ixgbe: enable Rx queue interrupts for PF and VF")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-19 11:09:13 +03:00
Stephen Hemminger
7d47868c26 drivers/net: remove duplicate includes
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-07-16 17:30:24 +02:00
Wenzhuo Lu
5713ade697 net/ixgbe: support committing TM hierarchy
Add the support of the Traffic Management API,
rte_tm_hierarchy_commit.
When calling this API, the driver tries to enable
the TM configuration on HW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:07:17 +02:00
Wenzhuo Lu
cb2ffec595 net/ixgbe: support getting TM node capability
Add the support of the Traffic Management API,
rte_tm_node_capabilities_get.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:07:16 +02:00
Wenzhuo Lu
596988e193 net/ixgbe: support getting TM level capability
Add the support of the Traffic Management API,
rte_tm_level_capabilities_get.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:07:16 +02:00
Wenzhuo Lu
850dba2c5f net/ixgbe: support getting TM node type
Add the support of the Traffic Management API,
rte_tm_node_type_get.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:07:15 +02:00
Wenzhuo Lu
e52551842a net/ixgbe: support deleting TM node
Add the support of the Traffic Management API,
rte_tm_node_delete.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:07:14 +02:00
Wenzhuo Lu
e0ff4d304c net/ixgbe: support adding TM node
Add the support of the Traffic Management API,
rte_tm_node_add.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:07:14 +02:00
Wenzhuo Lu
80337aed53 net/ixgbe: support deleting TM shaper profile
Add the support of the Traffic Management API,
rte_tm_shaper_profile_delete.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:07:13 +02:00
Wenzhuo Lu
fa199f1c6f net/ixgbe: support adding TM shaper profile
Add the support of the Traffic Management API,
rte_tm_shaper_profile_add.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:07:12 +02:00
Wenzhuo Lu
553940af53 net/ixgbe: support getting TM capability
Add the support of the Traffic Management API,
rte_tm_capabilities_get.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 20:06:39 +02:00
Wenzhuo Lu
2aaecb14bd net/ixgbe: support getting TM ops
To support QoS scheduler APIs, create a new C file for
the TM (Traffic Management) ops but without any function
implemented.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-11 19:57:31 +02:00
Gaetan Rivet
4e6cc0eb1e net/ixgbe: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-07-09 00:03:23 +02:00
Beilei Xing
c009c6b142 net/ixgbe: remove MTU setting limitation
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>
2017-07-06 15:00:57 +02:00
Qi Zhang
7d629caced net/ixgbe: enable IPv6 for consistent API
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>
2017-07-06 15:00:57 +02:00
Qi Zhang
a948d33bc0 net/ixgbe: enable signature match for consistent API
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>
2017-07-06 15:00:57 +02:00
Qi Zhang
0d722a19f3 net/ixgbe: replace macro with inline function
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>
2017-07-06 15:00:57 +02:00
Liang-Min Larry Wang
dc66e5fd01 net/ixgbe: improve link state check on VF
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>
2017-07-06 15:00:57 +02:00
Qi Zhang
ee4427e0fe net/ixgbe: support packet type parsing in SSE Rx
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>
2017-07-06 15:00:56 +02:00
Ferruh Yigit
4be4659a93 drivers/net: use device name from device structure
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>
2017-07-06 00:17:02 +02:00
Bruce Richardson
5ea4d4688d net/ixgbe: remove fallback code for x86 non-SSE4
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>
2017-07-04 14:39:18 +02:00
Bernard Iremonger
d6af1a13d7 ethdev: add return values to callback process API
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>
2017-07-01 17:19:55 +02:00
Jerin Jacob
98a7ea332b fix typos using codespell utility
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>
2017-06-14 23:54:13 +02:00
Adrien Mazarguil
323f811a4a ethdev: add isolated mode to flow API
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>
2017-06-14 23:33:00 +02:00
Ferruh Yigit
740feaf349 ethdev: remove driver name from device private data
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>
2017-06-12 16:27:44 +01:00
Qi Zhang
f35fec63dd net/ixgbe: enable flex bytes for generic flow API
Add fdir flex byte support for rte_flow APIs.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:28 +01:00
Qi Zhang
8d702249d5 net/ixgbe: fix fdir mask not be reset
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>
2017-06-12 10:41:27 +01:00
Qi Zhang
0601d85d90 net/ixgbe: remove redundant code
Remove redundant code.
item->type != RTE_FLOW_ITEM_TYPE_END already cover
item->type == RTE_FLOW_ITEM_TYPE_VLAN.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:27 +01:00
Radu Nicolau
e261265e42 ethdev: move bypass functions to ixgbe PMD
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>
2017-06-12 10:41:27 +01:00
Wei Dai
09049d5266 net/ixgbe/base: update shared code version to 2017.05.16
* Remove PHY access for some 1G ports
* Disable X550EM-x 1GBASE-T led switch support

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Wei Dai
667af1981f net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support
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>
2017-06-12 10:41:27 +01:00
Wei Dai
91b0fdf44e net/ixgbe/base: remove PHY access for some 1G ports
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>
2017-06-12 10:41:27 +01:00
Ferruh Yigit
c0802544d9 drivers/net: add generic ethdev macro to get PCI device
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>
2017-06-12 10:41:25 +01:00
Ferruh Yigit
dd2c630a5f drivers/net: remove unnecessary macro for unused variables
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>
2017-06-12 10:41:25 +01:00
Ferruh Yigit
7623f1f8b9 net/ixgbe: do not touch mbuf initialized fields
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>
2017-06-12 10:41:25 +01:00
Bruce Richardson
631a2f530b net/ixgbe: add compile-time checks to vector driver
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>
2017-06-12 10:41:25 +01:00
Jerin Jacob
c0583d98a9 eal: introduce macro for always inline
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>
2017-06-06 17:21:55 +02:00
David Marchand
06e81dc9b7 drivers/net: fix vfio kmod dependency
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>
2017-06-05 20:56:54 +02:00
Qi Zhang
491681ed63 net/ixgbe: fix LSC interrupt
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>
2017-05-10 17:33:07 +02:00
Wei Dai
0fcd5ef9eb net/ixgbe: fix calling null function of VF
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>
2017-05-10 17:18:12 +02:00
Bruce Richardson
6104a5224d net/ixgbe: add switch fall-through comments
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>
2017-05-05 18:36:55 +02:00
Bruce Richardson
803d48340c drivers/net: disable new gcc 7 warnings for base code
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>
2017-05-05 18:27:09 +02:00
Qi Zhang
6d65eba145 net/ixgbe: fix memory overflow in 32-bit SSE Rx
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>
2017-05-05 17:40:21 +02:00
Jia Yu
22d0e5aed3 net/ixgbe: fix setting MTU on stopped device
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>
2017-05-05 17:17:09 +02:00
Wei Dai
b604589d57 net/ixgbe: fix VF Rx mode for allmulticast disabled
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>
2017-05-05 17:02:03 +02:00
Wenzhuo Lu
c53e2c6f92 net/ixgbe: fix default MAC setting
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>
2017-05-05 16:54:04 +02:00
Wei Dai
6d01e580ac ethdev: fix adding invalid MAC address
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>
2017-05-05 16:27:11 +02:00
Kuba Kozak
fca82a8acc net/ixgbe: support xstats by ID
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>
2017-05-01 23:48:39 +02:00
Kuba Kozak
0a5beecf46 ethdev: revert xstats by ID
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>
2017-05-01 23:38:00 +02:00
Wei Zhao
cec7ddd290 net/ixgbe: fix ntuple filter for SCTP
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>
2017-04-28 14:46:19 +02:00
Laurent Hardy
c12d22f65b net/ixgbe: ensure link status is updated
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>
2017-04-28 14:46:19 +02:00
Wei Zhao
0e2fa44641 net/ixgbe: fix type check for flow type
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>
2017-04-28 14:46:18 +02:00
Wei Zhao
3d54a4d9ce net/ixgbe: remove useless item type check
Remove a useless item type check for fdir flow rule.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-28 14:46:18 +02:00
Wei Dai
b826efba6d net/ixgbe: align register setting when RSC is disabled
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>
2017-04-28 14:46:17 +02:00
Wei Dai
bfe977683a net/ixgbe/base: update version to 2017.03.29
* 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>
2017-04-28 14:46:17 +02:00
Wei Dai
999566af0a net/ixgbe/base: support MAC X550em/X557 LED on/off
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>
2017-04-28 14:46:17 +02:00
Wei Dai
d53a80024a net/ixgbe/base: support 2.5G KX physical layer
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>
2017-04-28 14:46:17 +02:00
Wei Dai
c70a162ad4 net/ixgbe/base: acquire PHY semaphore before device reset
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>
2017-04-28 14:46:16 +02:00
Jacek Piasecki
923419333f net/ixgbe: support xstats by ID
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>
2017-04-20 22:30:26 +02:00
Wei Zhao
c29315b87d net/ixgbe: remove tpid check for flow director
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>
2017-04-19 15:37:37 +02:00
Ferruh Yigit
97c5fbf6a4 net/ixgbe: fix duplicated check
Same check duplicated, updated check according what commend states.

Coverity issue: 1407507
Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2017-04-19 15:37:37 +02:00
Wei Zhao
c306ee121a net/ixgbe: fix generic filter return
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>
2017-04-19 15:37:37 +02:00
Wenzhuo Lu
a3bc447b40 net/ixgbe: move private APIs to a specific file
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>
2017-04-19 15:37:37 +02:00
Konstantin Ananyev
b81f5fa27f net/ixgbe: remove option to disable offload flags
Having packets received without any offload flags given in the mbuf is not
very useful, and performance tests with testpmd indicates little
benefit is got with the current code by turning off the flags. This makes
the build-time option pointless, so we can remove it.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-19 15:37:37 +02:00
Konstantin Ananyev
f160666a10 net/ixgbe: eliminate mbuf write on rearm
With the mbuf rework, we now have 8 contiguous bytes to be rearmed in the
mbuf just before the 8-bytes of olflags. If we don't do the rearm write
inside the descriptor ring replenishment function, and delay it to
receiving the packet, we can do a single 16B write inside the RX function
to set both the rearm data, and the flags together.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-19 15:37:37 +02:00
Jan Blunck
fdf91e0f2f drivers/net: do not use ethdev driver
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-18 19:05:46 +02:00
Qi Zhang
c23a1a3000 eal: clean up interrupt handle
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>
2017-04-06 21:15:55 +02:00
Jerin Jacob
dc448dc460 mbuf: make rearm data address naturally aligned
To avoid multiple stores on fast path, Ethernet drivers
aggregate the writes to data_off, refcnt, nb_segs and port
to an uint64_t data and write the data in one shot
with uint64_t* at &mbuf->rearm_data address.

Some of the non-IA platforms have store operation overhead
if the store address is not naturally aligned.This patch
fixes the performance issue on those targets.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-05 11:30:29 +02:00
Olivier Matz
ebb7bcabb8 drivers/net: do not touch mbuf next or nb segs on Rx
Now that the m->next pointer and m->nb_segs is expected to be set (to
NULL and 1 respectively) after a mempool_get(), we can avoid to write them
in the Rx functions of drivers.

Only some drivers are patched, it's not an exhaustive patch. It gives
the idea to do the same in other drivers.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-05 11:30:29 +02:00
Olivier Matz
54e9290269 mbuf: make segment prefree function public
Document the function and make it public, since it is used at several
places in the drivers. The old one is marked as deprecated.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-05 11:30:29 +02:00
Bernard Iremonger
9e030de1d0 net/ixgbe: allocate TC bandwidth
Ixgbe supports to set the relative bandwidth for the TCs.
It's a global setting for the PF and all the VFs of a
physical port.
This feature provide the API to set the bandwidth.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 19:03:03 +02:00
Alex Zelezniak
f8a5ab5206 net/ixgbe: ping VF when PF status changes
Signed-off-by: Alex Zelezniak <alexz@att.com>
Acked-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 19:02:59 +02:00
Zhiyong Yang
646412f9ff net/ixgbe: remove limit of Tx burst size
To add a wrapper function to remove the limit of tx burst size and
implement the "make an best effort to transmit the pkts" policy.
The patch makes ixgbe vec function work in a consistent behavior
like ixgbe_xmit_pkts_simple and ixgbe_xmit_pkts do that.

Cc: Helin Zhang <helin.zhang@intel.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-04 19:02:55 +02:00
Wenzhuo Lu
1c4da4ef96 net/ixgbe: fix TC bandwidth setting
4 and 8 TCs are supported on ixgbe. By default there're
8 TCs. So when initializing the device, the bandwidth for
8 TCs is set.
When changing the TC number, it's only considered setting
the bandwidth for 4 TCs. If the user change the number
from 4 to 8, the TCs' bandwidth is not right.

Fixes: 0807f80d35 ("ixgbe: DCB / flow control")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 18:59:47 +02:00
Ido Barnea
09deb98222 net/ixgbevf: set xstats id values
Without setting the id, calling xstats_get twice with same array causes
memory corruption.

Also, if IXGBEVF_NB_XSTATS will be different than 1 in the future,
this will cause issues.

Fixes: 156712ba40 ("ixgbevf: add extending stats")

Signed-off-by: Ido Barnea <ibarnea@cisco.com>
2017-04-04 15:52:52 +02:00
Wei Zhao
740e0ec32d net/ixgbe: fix filters adding MAC type check
All kinds of filter need to hardware mac type check
to make sure the hardware support that type of filter.
If not, it may cause serious issue.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Fixes: 672be56d76 ("net/ixgbe: parse n-tuple filter")
Fixes: eb3539fc85 ("net/ixgbe: parse ethertype filter")
Fixes: 429f6ebb42 ("net/ixgbe: parse TCP SYN filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:52 +02:00
Wei Zhao
962549bb27 net/ixgbe: move MAC type check macros
Move ixgbe 2 mac type check macros to ixgbe_ethdev.h in
order to be used by filter parser functions in file
ixgbe_flow.c.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:52 +02:00
Wei Zhao
8185bf3de5 net/ixgbe: delete useless function declaration
Delete useless function declarations in file ixgbe_flow.c and
adjust function definition position to avoid compile error.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-04-04 15:52:52 +02:00
Jingjing Wu
1b51b0bbc2 net/ixgbe: fix multi-queue mode check in SRIOV mode
In SRIOV case, ETH_MQ_RX_VMDQ_DCB and ETH_MQ_RX_DCB should be considered as
the same meaning, due to the multi-queue mapping is the same SRIOV and VMDq
in ixgbe.

Fixes: 27b609cbd1 ("ethdev: move the multi-queue mode check to specific drivers")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
8552304c86 net/ixgbe: fix all queues drop setting of DCB
DCB is split to RX and TX mode. All-queues-drop is set for TX mode.
It's not appropriate because all-queue-drop is a RX feature.
Move this setting from TX to RX.

Fixes: f3f9b17bb8 ("net/ixgbe: support multiqueue mode VMDq DCB with SRIOV")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Olivier Matz
9633482a6e net/ixgbe: remove invalid declaration
The function is not defined anywhere, remove it.

Fixes: 0eb609239e ("ixgbe: enable Rx queue interrupts for PF and VF")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
9941892b7a net/ixgbe: fix Rx queue blocking issue
In the IOV scenario, multi Rx queues can be assigned to one VF.
If the dropping is not enabled, when no descriptors are available
for one queue, this queue can block others.

Fixes: 00e30184da ("ixgbe: add PF support")
Cc: stable@dpdk.org

Suggested-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
66e21de51b net/ixgbe/base: update shared code version to 2017.02.27
* Add link block check for KR.
* Complete HW initialization even if SFP is not present.
* Add VF xcast promiscuous mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
9dad5b9e89 net/ixgbe/base: fix build error
Fix ICC build error by removing the EWARN third parameter.

Build error:
.../drivers/net/ixgbe/base/ixgbe_phy.c(1543):
	error #268: the format string ends before this argument
			EWARN(hw, "WARNING: Intel (R) Network "
			^

.../drivers/net/ixgbe/base/ixgbe_phy.c(1805):
	error #268: the format string ends before this argument
			EWARN(hw, "WARNING: Intel (R) Network "
			^

Fixes: aa4fc14d2c ("ixgbe: update base driver")
Fixes: b94a06c1b4 ("ixgbe/base: support qsfp and lco")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
6b3e9c956c net/ixgbe: support xcast promisc mode
Add the support of xcast promiscuous mode. It's
added in mailbox v1.3.
Move the definition of xcast mode to base code.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
dcf9ff148c net/ixgbe/base: disable FC for 15B0
Disable Ethernet Flow Control (FC) for device 15B0.

Make sure that ixgbe_device_supports_autoneg_fc()
returns false and hw->fc.disable_fc_autoneg is set
to true to avoid running the fc_autoneg function
for the device 15B0, as this device doesn't support
this function.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
98fcfa09b1 net/ixgbe/base: complete HW init when SFP not present
If SFP module is not present, reset_hw doesn't return success.
SW should complete the initialization, or with specific module
it resulted in no link when the module was later inserted.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
04e395f20a net/ixgbe/base: add bit for enabling L3/L4 filtering
Add a L3/L4 filtering definition of Multiple Receive Queues Command
(MRQC) register for the future use.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
90a02fce70 net/ixgbe/base: add link block check for KR
When setting up link on x550 KR devices, should check
if there are constraints on link from manageability, which
may result in link loss.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Wenzhuo Lu
f8687bd0b2 net/ixgbe/base: remove X550em SFP iXFI setup
Removes X550em SFP iXFI setup since there is no released
HW production with SFP iXFI.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Wenzhuo Lu
c268e8d745 net/ixgbe/base: make a debug message simple
The debug message is too long. Make it shorter.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Olivier Matz
a2919e13d9 net/ixgbe: implement descriptor status API
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-30 15:27:42 +02:00
Olivier Matz
feb9f680cd mk: optimize directory dependencies
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>
2017-03-27 23:28:43 +02:00
Olivier Matz
0ef850c4f6 ethdev: move a queue id check to generic layer
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>
2017-03-09 19:29:51 +01:00
Wei Zhao
37192bf2b4 net/ixgbe: fix VLAN mask TCI in flow rule parser
Use vlan_mask->tci as big endian since this is how rte flow defines it.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Fixes: 37ed39b4e6 ("net/ixgbe: add TCI mask check for flow director")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-02-10 12:25:50 +01:00
Jianbo Liu
989a840505 net/ixgbe: fix received packets number for ARM NEON
Vector PMD will check 4 descs in one time, but the statuses are not
consistent because the memory allocated for RX descriptors is cacheable
huagepage.
This patch is to calculate the number of received packets by scann DD bit
sequentially, and stops when meeting the first packet with DD bit unset.

Fixes: b20971b6cc ("net/ixgbe: implement vector driver for ARM")
Cc: stable@dpdk.org

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-02-10 12:25:49 +01:00
Jianbo Liu
a98212de4a net/ixgbe: fix received packets number for ARM
To get better performance, Rx bulk alloc recv function will scan 8 descs
in one time, but the statuses are not consistent on ARM platform because
the memory allocated for Rx descriptors is cacheable hugepages.
This patch is to calculate the number of received packets by scan DD bit
sequentially, and stops when meeting the first packet with DD bit unset.

Fixes: 7431041062 ("ixgbe: allow rx bulk alloc")
Cc: stable@dpdk.org

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-02-10 12:25:49 +01:00
Jingjing Wu
859a17db7e net/ixgbe: fix bitmask of supported Tx flags
Add missed PKT_TX_IEEE1588_TMST to bitmask of all supported
packet Tx flags.

Fixes: 7829b8d52b ("net/ixgbe: add Tx preparation")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-02-10 12:25:49 +01:00
Jeff Guo
45f4dd1adc drivers/net: fix device configuration
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>
2017-02-10 12:25:49 +01:00
Wenzhuo Lu
478aed44d5 net/ixgbe: rework port check for driver-specific API
For PMD specific API it is required to check if provided port id is for
a supported device.

It's not appropriate to call rte_eth_dev_info_get in PMD, as
rte_eth_dev_info_get need to get info from PMD.

Remove rte_eth_dev_info_get from PMD code and get the info directly.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-02-10 12:25:49 +01:00
Wei Zhao
a50c11629c net/ixgbe: fix VXLAN parsing for flow director
VNI of VXLAN is parsed wrongly. The root cause is that
VNI array in VXLAN item also uses network byte ordering.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-02-10 12:25:49 +01:00
Wei Zhao
37ed39b4e6 net/ixgbe: add TCI mask check for flow director
Add more check on the tci mask of VLAN and VXLAN parser
in fdir filter rule pattern parser. If such check not added,
it maybe cause error in fdir configuration set check.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-02-10 12:25:49 +01:00
Ferruh Yigit
f2462150ec drivers/net: remove redundant new line from logs
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-01-30 22:18:27 +01:00
Ferruh Yigit
1d7f076c1c net/ixgbe: fix API comments for doxygen
Fixes: 57aa1fd284 ("net/ixgbe: move set VF functions from the ethdev")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-30 22:18:26 +01:00
Yi Zhang
3556f25183 net/ixgbevf: fix max packet length
Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF
supports 15872-byte jumbo frame and VF only supports 9728-byte jumbo
frame. If VF is running DPDK driver and set frame_size > 9728 ,PF
running kernel ixgbe driver will report an error and set VF failed.
This patch fixs DPDK ixgbevf driver to get correct jumbo frame size
of VF.

More datasheet references from Wei Dai:

In 82599 datasheet, there is an annotation in the chapter 1.3 Features
Summary (page 29)
 The 82599 supports full-size 15.5 KB (15872-byte) jumbo packets while
 in a basic mode of operation. When DCB mode is enabled,
 or security engines enabled or virtualization is enabled, the 82599
 supports 9.5 KB (9728-byte) jumbo packets.

In x540 datasheet, there is also an annotation in the chapter 1.3
Features Summary (page 13)
 The X540 and 82599 support full-size 15.5 KB jumbo packets while in a
 basic mode of operation. When DCB mode is enabled,
 or security engines enabled, or virtualization is enabled, or OS2BMC is
 enabled, then the X540 supports 9.5 KB jumbo packets.
 Packets to/from MC longer than 2KB are filtered out.

In x550 datasheet, there is still also an annotation in the chapter 1.4
Feature Summary (page 23)
 All the products support full-size 15.5 KB jumbo packets while in a
 basic mode of operation. When DCB mode is enabled, or security
 engines enabled, or virtualization is enabled, or OS2BMC is enabled,
 then only 9.5 KB jumbo packets are supported. Packets to/
 from the MC longer than 2 KB are filtered out.

Fixes: 2144f6630f ("ixgbe: add redirection table size in device info")
Cc: stable@dpdk.org

Signed-off-by: Yi Zhang <zhang.yi75@zte.com.cn>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-30 22:18:26 +01:00
Tiwei Bie
d2b46fd135 net/ixgbe: fix API parameter checking
Add checks to rte_pmd_ixgbe_macsec_* APIs to ensure that the
port is an ixgbe port.

Fixes: b35d309710 ("net/ixgbe: add MACsec offload")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2017-01-30 22:18:26 +01:00
Wei Dai
70efa56740 net/ixgbe: return success when SFP is not present
Ignore the error=IXGBE_ERR_SFP_NOT_PRESENT when SFP is not present.
If it is not ignored, testpmd will fail during the NIC initialization
process.
Ixgbe kernel driver ignores this error and works well. So DPDK
does same thing.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-30 22:18:26 +01:00
Qi Zhang
9b66721070 net/ixgbe: fix blocked interrupts
While handling link status change (LSC) interrupt, all interrupts are
blocked until delayed interrupt handler finishes.

The wait duration is at least one second and this may cause timeouts in
VF to PF mailbox.

Make sure only LSC interrupt is blocked while waiting for delayed
interrupt handler to finish.

Fixes: 0a45657a67 ("pci: rework interrupt handling")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-01-30 22:18:26 +01:00
Santosh Shukla
a66114965b net/ixgbe: use I/O device memory read/write API
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: Helin Zhang <helin.zhang@intel.com>
CC: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-01-18 17:18:26 +01:00
Wei Zhao
6ff773e102 net/ixgbe: flush all the filter list
This patch adds a function to flush all the filter list
filter on a port.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
a14de8b498 net/ixgbe: destroy consistent filter
This patch adds a function to destroy the flow filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
72c135a89f net/ixgbe: create consistent filter
This patch adds a function to create the flow directory filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
11777435c7 net/ixgbe: parse flow director filter
check if the rule is a flow director rule, and get the flow director info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
99e7003831 net/ixgbe: parse L2 tunnel filter
check if the rule is a L2 tunnel rule, and get the L2 tunnel info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
429f6ebb42 net/ixgbe: parse TCP SYN filter
check if the rule is a TCP SYN rule, and get the SYN info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
eb3539fc85 net/ixgbe: parse ethertype filter
check if the rule is a ethertype rule, and get the ethertype info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
672be56d76 net/ixgbe: parse n-tuple filter
Add rule validate function and check if the rule is a n-tuple rule,
and get the n-tuple info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
62a65c2ef6 net/ixgbe: flush all the filters
Add support for flush all the filters in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
a42882591e net/ixgbe: store and restore L2 tunnel configuration
Add support for store and restore L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
a30ef77052 net/ixgbe: restore L2 tunnel filter
Add support for restoring L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
acd1d4dfa9 net/ixgbe: restore flow director filter
Add support for storing flow director filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
8b39890ab1 net/ixgbe: restore TCP SYN filter
Add support for restoring TCP SYN filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
a51f64eda3 net/ixgbe: restore ether type filter
Add support for restoring ether type filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
e6a410c268 net/ixgbe: restore n-tuple filter
Add support for restoring n-tuple filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
d0c0c416ef net/ixgbe: store L2 tunnel filter
Add support for storing L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
080e3c0ee9 net/ixgbe: store flow director filter
Add support for storing flow director filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Zhao
6ae3bdab28 net/ixgbe: store TCP SYN filter
Add support for storing TCP SYN filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
37f8f7e841 net/ixgbe/base: update shared code version to 2017.01.05
Update version of shared code to 2017-01-05 in README.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
a85e378cc6 net/ixgbe/base: add debug traces
Add some traces in the reset_hw logic and semaphore acquisition logic
to help debugging.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
96dae4644a net/ixgbe/base: use clause 22 MDIO functions for Marvell PHYs
Set the MDIO (Management Data Input/Output Interface) read/write
function pointers for Marvell PHYs on some X550 platforms to use
the clause 22 functions. Marvell PHYs do not support clause 45.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
18f5a572d8 net/ixgbe/base: support Marvell 1000BASE-T PHYs
Add initial support for Marvell 1000BASE-T PHYs on some X550 platforms.

Firmware owns the link config for Marvell PHYs on these platforms,
software should not touch it.

Also these platforms are not capable of speeds lower than 1Gb.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
37e7cb1e35 net/ixgbe/base: configure speeds for KR/KX backplane
Ensure that the advertised link speeds are configured for KR/KX
backplane on some new platform.

Without this patch the link remains at 1G when resuming from low power
after being downshifted by LPLU (Low Power Link Up).

This patch ensures that the advertised speeds are not changed for
2.5G configurations.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
fff3eeb0a6 net/ixgbe/base: remove a compiler warning
Remove warning for "mac->led_link_act = i" where led_link_act is u8.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
8bead349c6 net/ixgbe/base: support XFI backplane for X550
Add initial support for a XFI backplane interface on some new platforms.

The XFI backplane requires a custom tuned link. Hardware/Firmware owns
the link config for XF backplane and software must not interfere.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Bernard Iremonger
21e5e138cd net/ixgbe: fix API parameter checking
Add checks to rte_pmd_ixgbe_* API's to ensure that the port
is an ixgbe port.

Fixes: 49e248223e ("net/ixgbe: add API for VF management")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:41:42 +01:00
Wenzhuo Lu
0bc9f022a1 net/ixgbe: fix VMDq function name
The function name ixgbe_vmdq_mode_check is not right.
This function checks if Virtualization Technology is
enabled. It's for both VMDq and IOV.
Others may be misled by the current name.

Fixes: fe3a45fd41 ("ixgbe: add VMDq support")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-01-17 19:41:42 +01:00
Ilya Maximets
2652a9fb21 net/ixgbe: allow bulk alloc for the max size desc ring
The only reason why bulk alloc disabled for the rings with
more than (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST)
descriptors is the possible out-of-bound access to the dma
memory. But it's the artificial limit and can be easily
avoided by allocating of RTE_PMD_IXGBE_RX_MAX_BURST more
descriptors in memory. This will not interfere the HW and,
as soon as all rings' memory zeroized, Rx functions will
work correctly.

This change allows to use vectorized Rx functions with
4096 descriptors in Rx ring which is important to achieve
zero packet drop rate in high-load installations.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:41:42 +01:00
Jerin Jacob
dffca2eb55 net/ixgbe: remove unused global variable
Removed unused "reg_info" global variable from ixgbe driver.

cat build/app/testpmd.map | grep "Allocating common symbols" -A 15
Allocating common symbols
Common symbol   size    file
reg_info        0x18    build/lib/librte_pmd_ixgbe.a(ixgbe_ethdev.o)

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:40:52 +01:00
Wei Dai
a45fd5e0d0 net/ixgbe/base: update shared code version to 2016.11.21
Update the version of shared codes to cid-ixgbe.2016.11.21.tar.gz,

All files in net/ixgbe/base are developed by another team and
DPDK PMD uses them accordingly.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
bf96b39c9d net/ixgbe/base: report physical layer for SGMII PHY type
For the PHY type SGMII, report the physical layer.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
d1ad3a1fdf net/ixgbe/base: add write flush required by Inphi PHY
This patch updates the configuration of PHY from Inphi (www.inphi.com)
to flush the register write with a reg read.
The Inphi PHY is configured in ixgbe_setup_mac_link_sfp_x550a.
The Inphi PHY setup flow has been updated to read configuration reg,
write only linear/non-linear, and then read (write flush).

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
383d11f7cf net/ixgbe/base: remove unused EEE code
Remove unused old Energy Efficient Ethernet (EEE) code.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
45f79aea9e net/ixgbe/base: fix IXGBE LSWFW register
This register was incorrect when compared to the data sheet.
Even though the driver doesn't currently use this register,
it is better to fix it upstream.

Fixes: af75078fec ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
4d17b12634 net/ixgbe/base: remove unused enum type
remove unused enum type for master/slave control in ixbge_type.h

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00
Wei Dai
3ab3671b0b net/ixgbe/base: add EEE support for some PHYs
This patch adds Energy Efficient Ethernet (EEE) support for
some Marvell PHYs on some future platforms.
Because EEE capability or status was not indicated previously,
this patch simply assumes that it is supported.

As soon as there is a PHY that does not support EEE, there will
be defects in this area because the driver will not report the
EEE status correctly.

This also deletes some now-unused definitions from an earlier
Marvell PHY implementation and combines a device ID check into a
switch statement.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:40:51 +01:00