numam-dpdk/lib/librte_pmd_ixgbe
Balazs Nemeth 494a1f991e ixgbevf: fix link state
This patch fixes checking the link state of a virtual function. If the
state has already been checked, it does not need to be checked
again. Previously, get_link_status in the ixgbe_hw struct was used to
track if the information had already been retrieved, but this field
was always set to false (signifying that the information was
up-to-date). The problem was introduced by commit 8ef32003 which was
part of a patch set to update the ixgbe portion of the PMD. This patch
does not break consistency with the ixgbevf driver. Instead, it fixes
the problem at the level of DPDK.

Applications that rely on the reported link speed could fail without
this patch. The qos_sched example application provided with DPDK did
not run when virtual functions were used. The output for this example
application is shown below:

EAL: Error - exiting with code: 1
  Cause: Unable to config sched subport 0, err=-2

The problem and the effect of the patch can been seen by running the
l2fwd example application using the following command:

sudo ./build/l2fwd -c 0x3 -n 4 -- -p 0x3 -T 0

Before the patch has been applied (with both links up):
...
Checking link statusdone
Port 0 Link Up - speed 100 Mbps - half-duplex

Port 1 Link Up - speed 100 Mbps - half-duplex

L2FWD: entering main loop on lcore 1
...

After the patch has been applied (with both links up):
...
Checking link statusdone
Port 0 Link Up - speed 10000 Mbps - full-duplex
Port 1 Link Up - speed 10000 Mbps - full-duplex
L2FWD: entering main loop on lcore 1
...

Before the patch has been applied (with link 0 down, link 1 up):
...
Checking link statusdone
Port 0 Link Up - speed 100 Mbps - half-duplex

Port 1 Link Up - speed 100 Mbps - half-duplex

L2FWD: entering main loop on lcore 1
...

After the patch has been applied (with link 0 down, link 1 up):
...
Checking link status............................................................
..............................done
Port 0 Link Down
Port 1 Link Up - speed 10000 Mbps - full-duplex
...

Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2014-12-19 23:30:26 +01:00
..
ixgbe ixgbe/base: support X550 2014-10-07 17:00:52 +02:00
ixgbe_82599_bypass.c ixgbe: fix build with bypass enabled 2014-10-09 20:02:34 +02:00
ixgbe_bypass_api.h ixgbe: support X550 2014-10-07 17:01:08 +02:00
ixgbe_bypass_defines.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00
ixgbe_bypass.c ixgbe: fix build with bypass and debug enabled 2014-12-02 12:28:11 +01:00
ixgbe_bypass.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00
ixgbe_ethdev.c ixgbevf: fix link state 2014-12-19 23:30:26 +01:00
ixgbe_ethdev.h ixgbe: VMDQ Rx mode 2014-11-12 00:10:23 +01:00
ixgbe_fdir.c ixgbe: support X550 2014-10-07 17:01:08 +02:00
ixgbe_logs.h ixgbe: always log init messages 2014-09-18 20:52:41 +02:00
ixgbe_pf.c ixgbe: support X550 2014-10-07 17:01:08 +02:00
ixgbe_rxtx_vec.c ixgbe: fix array overflow in vector Rx 2014-12-17 00:40:37 +01:00
ixgbe_rxtx.c ixgbe: support X540 VF 2014-12-17 01:04:01 +01:00
ixgbe_rxtx.h ixgbe: fix multi-process support 2014-12-17 00:40:37 +01:00
Makefile ixgbe/base: disable some gcc warnings 2014-10-10 17:45:18 +02:00