Commit Graph

690 Commits

Author SHA1 Message Date
David Marchand
c7985de0a7 remove unneeded tests for NULL when freeing
free() already handles NULL pointer.

Signed-off-by: David Marchand <david.marchand@6wind.com>
2016-01-27 15:34:48 +01:00
Wenzhuo Lu
ad66a85dce ixgbe/base: new FW values
This patch addes some new defines for FW, and includes some minor change.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
33f4f30afa ixgbe/base: add X550T1 device
Adds a new single-port Sage Pond device X550T1.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
dfc7e1c90a ixgbe/base: support new thermal alarm
This patch adds support for the new thermal sensor alarms indication.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
fd766412ee ixgbe/base: add new X550 iXFI configuration function
This patch should allow native SPI SFP+ to work as we understand it now.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
28ee76db18 ixgbe/base: move X550 MDIO clock speed init
The x550 MDIO clock speed must be configured prior to first MDIO read or
write. The default MDIO clock speed is not valid, therefore the driver
is configuring a valid speed prior to reading the copper PHY device id.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
bd33a76533 ixgbe/base: prevent X550 KR PHY reset in init
This patch removes KR PHY reset from ixgbe_init_phy_ops_X550em. Since
this function is meant to initialize function pointers for detected PHY
type. Internal PHY reset was moved to ixgbe_setup_internal_phy_t_x550em
which will now detect which mode does internal PHY work in, and setup it
as required.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
1a92547a39 ixgbe/base: support KR mode for X550 link
KR auto-neg mode is what we will be using going forward. The SW
interface for this mode is different than what was used for iXFI.

While debugging, it was determined that the ucode diagnostic was
no longer needed. This code has been removed to simplify the init
flow.

A subtle semaphore error in the CS4227 reset flow was fixed.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
796f322dd1 ixgbe/base: remove X550 driver config of KX4 PHY
The KX4 PHY will be configured by the NVM image. The driver
had been overwriting this config.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
4e7466cccd ixgbe/base: avoid needless copper PHY access
Avoid a needless PHY access on copper phys to save the 10ms wait
time for each PHY access. A helper function is introduced to
actually do the register access and process the contents.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
52f20c7fa8 ixgbe/base: check MAC type when setting X550 callbacks
Check mac type when accessing iosf registers and using the PHY token
for PHY access.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
2ecf53223d ixgbe/base: use mac-dependent values
This patch changes code to use registers offsets stored in mvals table
instead of values defined statically.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
2241ce2816 ixgbe/base: add flow director drop queue
This patch adds ixgbe_set_fdir_drop_queue_82599 for enabling and
setting flow director drop queue, and adds sets drop no match in
ixgbe_init_fdir_perfect_82599 for x550.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
9243820b25 ixgbe/base: remove wait and check flow director signature addition
Waiting for FDIRCMD completion is an expensive thing to do in the
transmit hot path. This wait was added to catch problems with perfect
filter rules, and, at least in the Linux driver, there is no error
check anyway, so there is no point to adding the delay. So do not wait
for completion. Change the return of the function to void, since it has
no meaningful return value.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
59acf817b2 ixgbe/base: add flow control ethertype for filtering
This patch adds the flow control ethertype to the defines for the
ETQF filter list. This only adds the define. Each driver
can add this ethertype to the filter. This is needed to prevent
denial of service by malicious VFs sending out flow control
packets.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:21 +01:00
Wenzhuo Lu
b7fbe1a801 ixgbe/base: fix Tx hang in CEE mode
Currently credit_refill and credit_max could be zero for a TC and that
is causing Tx hang for CEE mode configuration, so to fix that have at
min credit assigned to a TC and that is as what IEEE mode already does.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:43:20 +01:00
Wenzhuo Lu
8487a24edc ixgbe/base: update readme
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-01-14 09:20:37 +01:00
Jingjing Wu
e34189abaf i40e: fix flow director index sign
Coverity issue reported like
CID 119268 (#1 of 1): Unintended sign extension
(SIGN_EXTENSION)sign_extension: Suspicious implicit sign extension:
vsi_id with type unsigned short (16 bits, unsigned) is promoted in
vsi_id << 23 to type int (32 bits, signed), then sign-extended to type
unsigned long (64 bits, unsigned). If vsi_id << 23 is greater than
0x7FFFFFFF, the upper bits of the result will all be 1.

Fixes: 88ebc2b7f9 ("i40e: extend flow director to support VF")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2015-12-15 18:06:54 +01:00
Jingjing Wu
8a26a8ff82 i40e: fix max frame size
In FreeBsd driver, the max frame size is changed to MTU, but not
keep the default value defined in DataSheet. When DPDK runs on that
NIC, the configured value is not expected.
This patch sets the max frame size to default when initialization.

Fixes: 4861cde461 ("i40e: new poll mode driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-12-15 18:06:06 +01:00
Robin Jarry
41264853e0 ixgbe: restore imissed stat counter
This counter was left unmodified. Restore it in ixgbe_dev_stats_get.

The ierrors counter still includes imissed for ixgbe. This behaviour is
not consistent amongst all drivers. Another patch may be needed to unify
the meaning of the ierrors counter.

Fixes: 5e50ad1c1b ("ixgbe: add specific stats")

Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2015-12-15 18:05:53 +01:00
Andriy Berestovskyy
1d63c314b7 bonding: fix reordering of IP fragments
Fragmented IPv4 packets have no TCP/UDP headers, so we hashed
random data introducing reordering of the fragments.

Signed-off-by: Andriy Berestovskyy <aber@semihalf.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-12-14 22:53:17 +01:00
Andriy Berestovskyy
3ef7955700 bonding: fix LACP mempool size
The following messages might appear after some idle time:
"PMD: Failed to allocate LACP packet from pool"

The fix ensures the mempool size is greater than the sum
of TX descriptors.

Signed-off-by: Andriy Berestovskyy <aber@semihalf.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-12-14 22:53:10 +01:00
Rasesh Mody
9f190ffbce bnx2x: add version
Add BNX2X PMD version, print it as part of adapter info.
Adjusted print adapter info output formatting.

This patch versions BNX2X PMD at 1.0.0.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:58:10 +01:00
Rasesh Mody
99d47f445e bnx2x: fix 32-bit build
Compile tested.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:58:10 +01:00
Rasesh Mody
5a1d76f9c2 bnx2x: fix build on FreeBSD
Compile tested.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:58:10 +01:00
Rasesh Mody
059113cced bnx2x: add license file
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:58:10 +01:00
Harish Patil
8dc08a093a bnx2x: add periodic debug option
The periodic debug option is used to collect periodic
events like statistics, register access etc and won't
interfere with user-level messages.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:55:12 +01:00
Harish Patil
c275e3cb52 bnx2x: fix build with clang
Fix for the following clang build error:
drivers/net/bnx2x/elink.c:10384:41: error: shifting a
      negative signed value is undefined [-Werror,-Wshift-negative-value]
                vars->eee_status &= ~SHMEM_EEE_1G_ADV <<
                                    ~~~~~~~~~~~~~~~~~ ^

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2015-12-13 01:55:09 +01:00
Harish Patil
a5724ff9c5 bnx2x: update VF to support newer PF drivers
SR-IOV is supported using bnx2x poll mode driver running as VF driver and
native linux driver running as PF (in host/hypervisor). There is no issue
while running with the PF driver which is at the base version as that of
PMD. However, there is a compatibility issue between newer out-of-box PF
drivers with older VF driver. So the newer VFs would also need to send
BNX2X_VF_TLV_PHYS_PORT_ID (among other TLVs) to differentiate between
newer and older VFs.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2015-12-13 01:46:52 +01:00
Rasesh Mody
c6eedc5220 bnx2x: skip Rx producer refresh when no packet
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:46:07 +01:00
Rasesh Mody
638f2066a6 bnx2x: fix Tx error check
Correct the error check in PMD transmit routine.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:45:31 +01:00
Chas Williams
7ee177a72f bnx2x: fix restart
If you stop and start the driver, the rx queue will have the previous
index values when programming the adapter.  Therefore, we should always
reset the queue indices when the rx ring is setup.  Note:  We need to
clear (write) the status block's completion queue index since it is
possibly in a read cache.

Tidy some init code to make it clearer what the defaults are.

Signed-off-by: Chas Williams <3chas3@gmail.com>
2015-12-13 01:44:51 +01:00
Rahul Lakkireddy
bd372fe9c0 cxgbe: fix Rx queue setup error management
When refilling freelists for the first time and if it fails, the rxq
is freed and returns ENOMEM. There is a check while freeing hardware rxq
to pass freelist context id if the freelist exists or 0xffff otherwise.
The error path is only reached if freelist exists. So, fix is to remove
the useless check for freelist existence.

Coverity issue: 107108
Fixes: 92c8a63223 ("cxgbe: add device configuration and Rx support")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2015-12-12 22:34:43 +01:00
Huawei Xie
f17230e1ae xenvirt: fix build for 32-bit platform
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
2015-12-12 22:34:43 +01:00
Pavel Krauz
e01993bf82 af_packet: set input port in mbuf
Fixes port number in mbuf structure when using with eth_af_packet

Signed-off-by: Pavel Krauz <pavel.krauz@anritsu.com>
2015-12-10 22:07:06 +01:00
Helin Zhang
0d16d2694a i40e: fix filtering with vlan input
It corrects the input set values to be set for vlan or
double vlan.

Fixes: 98f0557076 ("i40e: configure input fields for RSS or flow director")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
2015-12-10 21:41:13 +01:00
Yuanhan Liu
6ed346a462 virtio: fix wrong queue index
We should provide VIRTIO_PCI_QUEUE_SEL with vq->vq_queue_idx,
but not vq->queue_id.

vq->queue_id is the queue id from rte_eth_rx/tx_queue_setup(),
which always starts from 0 no matter which queue it is. However,
for virtio, even number is for RX queue, and odd number is for
TX queue.

Fixes: 5382b188fb ("virtio: add queue release")

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2015-12-09 22:02:33 +01:00
Chas Williams
537ae1c996 bnx2x: fix double init check
Check sc->state to prevent double init.
If the link is up, then the driver cannot be stopped and started
successfully.  Instead of checking the link status, use the driver's
state.

Signed-off-by: Chas Williams <3chas3@gmail.com>
2015-12-09 22:02:33 +01:00
Alejandro Lucero
6c53f87b34 nfp: add link status interrupt
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Alejandro Lucero
d4a27a3b09 nfp: add basic features
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Alejandro Lucero
cef1f80504 nfp: add link status update
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Alejandro Lucero
92aa491b88 nfp: add statistics
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Alejandro Lucero
934e4c60fb nfp: add RSS
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Alejandro Lucero
b812daadad nfp: add Rx and Tx
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Alejandro Lucero
defb9a5dd1 nfp: introduce driver initialization
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Panu Matilainen
3e718b8169 mk: fix external shared library dependencies of drivers
Similar to commit 5f9115e58c, but
for qat and mpipe drivers. The former did not exist when the
previous patch was sent and latter I just missed.

Fixes: 5f9115e58c ("mk: fix shared library dependencies of drivers")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2015-12-08 00:09:43 +01:00
Stephen Hemminger
6c76533ccf replace bzero with memset
The standard for DPDK is to use memset() not bzero which
is a leftover BSD-ism.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-12-07 04:57:16 +01:00
Stephen Hemminger
1685a92a15 remove blank lines at end-of-file
This is one of those trivial things git and other tools complain
about.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-12-07 04:57:16 +01:00
Stephen Hemminger
8862010a80 remove double semicolons
Trivial cleanup

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-12-07 04:57:16 +01:00
Igor Ryzhov
e1cf0d0853 ethdev: fix reset of Rx mbuf allocation failures
The rx_mbuf_alloc_failed counter was only cleared by virtio driver.
Now it is cleared by common rte_eth_stats_reset function for all
drivers at once.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-12-07 04:55:31 +01:00