Commit Graph

830 Commits

Author SHA1 Message Date
Cunming Liang
836853d3d4 app/testpmd: increase default burst size to 32
The vpmd RX don't accept burst size less than 32.
As vPMD is set =y by default, while default testpmd burst size is 16.
Which will cause RX nothing if not assign burst size correctly.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
2014-06-26 13:06:10 +02:00
Cunming Liang
359f106a69 ixgbe: prefer enabling olflags rather than not disabling
RTE_IXGBE_RX_OLFLAGS_ENABLE gives a hint whick keeping packet type
in RX ol_flags or not.
By default it is set to update ol_flags in RX mbuf header.
If unset it, will gain addtional performance, but will lose packet
type information.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
2014-06-26 13:04:18 +02:00
Cunming Liang
040e9a01a0 ixgbe: fix build with IEEE1588 enabled
Vectorized Rx cannot be enabled if RTE_LIBRTE_IEEE1588=y.
So variable dev is not used in this case.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
2014-06-26 12:37:07 +02:00
Cunming Liang
b23dad37f0 ixgbe: fix build of standard Rx with vectorized Tx
The vpmd RX routine won't be used if RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC
is not defined or its condition check fail.
The case RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n and RTE_IXGBE_INC_VECTOR=y
may exist when choose to use standard RX and optimized TX
(ixgbe_xmit_pkts_vec/ixgbe_xmit_pkts_simple).

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
2014-06-26 12:18:51 +02:00
Pablo de Lara
6f77410723 ixgbe: rework fix of media type for bypass device
This was previously solved in commit 60a70d4e04
(fix link status interrupt of bypass device),
but this alternative fix reverts the previous one and solves the
same issue without modifying the base driver (also named "shared code").

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-06-26 07:16:53 +02:00
Chen Jing D(Mark)
445d8db425 i40e/base: ignore warning
There is a warning in base driver (shared code) on 32-bits RHEL6.3/6.5:
	lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c:917:
	error: integer constant is too large for ‘long’ type

As we don't modify base driver, this warning must be ignored.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-06-26 07:16:16 +02:00
Thomas Monjalon
2c8e687c54 explicit shared code naming as base driver
Intel PMDs are built on top of the base drivers which are provided by Intel
and shouldn't be modified to allow easy batch upgrade from Intel.

The base driver is a "shared code" between many projects. But in DPDK,
the "base driver" naming makes more sense.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-06-26 07:15:46 +02:00
Helin Zhang
d2121ceccd app/testpmd: rework display of Rx descriptors
i40e supports 16 and 32 bytes RX descriptors which can be configured.
It needs to check the driver type and the configuration to determine
if 16 or 32 bytes RX descriptors is being used, for reading and
displaying the different sizes of RX descriptors.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
2014-06-24 13:07:04 +02:00
Helin Zhang
1b69d9b8ee i40e: ignore failure when updating default macvlan filter
For NVM4.2.2 or after, the firmware has the correct configurations
and load the macvlan filter as expected. It is not needed to
Update the default macvlan filter which cannot be removed at
all during initialization.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
2014-06-24 13:06:01 +02:00
Helin Zhang
1d61728822 i40e: disable double vlan by default
Double vlan should be specifically disabled by default during
port initialization which is expected.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
2014-06-24 13:05:21 +02:00
Helin Zhang
3b63d9346c i40e: fix updating hash lookup table of PF RSS
The bit shifting were written wrongly in '0x1 < j',
the correct one should be '0x1 << j'.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
2014-06-24 13:02:35 +02:00
Helin Zhang
d025265b7e i40e: fix RSS hash copy
It wrongly gets the RSS hash result from the RX descriptor which
has been modified for receiving new packet. The fix is to get the
RSS hash result from the buffer which saves the RX descriptor.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
2014-06-24 13:01:20 +02:00
Helin Zhang
35ccc1b384 i40evf: fix link status
Fix a bug of copying wrong size of link information in the
function i40evf_get_link_status().

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
2014-06-24 13:00:02 +02:00
Helin Zhang
8e18decc37 i40evf: remove useless function
i40evf_dev_atomic_read_link_status() was defined but not used.
To avoid possible warnings by some compilers, it needs to
delete the whole function.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
2014-06-24 12:15:03 +02:00
Helin Zhang
f35fb0cfef kni: fix build on Oracle Linux 6.4 and RHEL 6.5
The compile errors are copied as follows. The fixes came from
Linux drivers of ixgbe-3.21.2 and igb-5.1.2 with modifications.
The idea is to use self-defined functions no matter they have
already been defined somewhere or not.

* Oracle Linux6.4
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h:3111:
error: redefinition of 'ether_addr_equal'
include/linux/etherdevice.h:180: note: previous definition
of 'ether_addr_equal' was here

* RHEL6.5
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h:3597:
error: redefinition of 'mmd_eee_cap_to_ethtool_sup_t'
include/linux/mdio.h:387: note: previous definition of
'mmd_eee_cap_to_ethtool_sup_t' was here
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h:3625:
error: redefinition of 'mmd_eee_adv_to_ethtool_adv_t'
include/linux/mdio.h:415: note: previous definition of
'mmd_eee_adv_to_ethtool_adv_t' was here
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h:3653:
error: redefinition of 'ethtool_adv_to_mmd_eee_adv_t'
include/linux/mdio.h:443: note: previous definition of
'ethtool_adv_to_mmd_eee_adv_t' was here

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
2014-06-23 22:52:32 +02:00
Chen Jing D(Mark)
66dda4bd4b i40e: fix build with icc
Cast constant to fix the ICC compilation error
introduced in commit 2b12431b53
	(add vlan stripping and insertion to VF)

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-23 17:08:08 +02:00
Bruce Richardson
5058a6e3f9 distributor: split get_pkt into request and poll
Take the existing get_pkt API and split out the parts for requesting a new
packet from the part to poll for arrival of a new packet. These individual
functions can then be used independently of the get function, which still acts
as before.

The split functions for request and poll will allow a worker to pull
packets from multiple distributors, or to act as multiple workers with a
single distributor if needed for better performance.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-06-20 17:41:18 +02:00
Chen Jing D(Mark)
2b12431b53 i40e: add vlan stripping and insertion to VF
VF driver add support to configure vlan offload and pvid set/clear
when host driver is DPDK. For Linux driver, it's not supported yet
since it doesn't support from host side.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2014-06-20 15:48:19 +02:00
Chen Jing D(Mark)
d487097131 i40e: add vlan stripping and insertion to PF messaging
PF driver add 2 commands, data structures and corresponding
message handling functions to support VF doing VLAN offload
and set/clear pvid operation.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2014-06-20 15:48:19 +02:00
Chen Jing D(Mark)
21424b2a5e i40e: rework vlan stripping and insertion
Change original 2 functions to common ones that can take effect on
both VF and PF VSIs.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2014-06-20 15:47:59 +02:00
Chen Jing D(Mark)
33a79f3d9a i40e: add sanity checks in PF messaging
Add sanity check in message handling functions on the request
buffer pointer from VF.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2014-06-20 15:47:59 +02:00
Chen Jing D(Mark)
9d7d8513b5 i40e: add permanent mac address into mac list
In old firmware versions, the default mac vlan filter setting is
not the one that we expected, so we'll try to remove it and add
new one to change default setting. After firmware updated, it
change default setting to the one that we expected and don't
allow to remove the setting. In this case, we should add the
perenant mac address into mac list and then return.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2014-06-20 15:47:59 +02:00
Chen Jing D(Mark)
204795fcaa i40e: destroy MSI-X pool on close
Free MSIX pool resource in function i40e_dev_close.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2014-06-20 15:47:48 +02:00
Pablo de Lara
be1816f59e eal: fix option --base-virtaddr
When parsing EAL option --base-virtaddr
errno was not being set to 0 before calling strtoull,
therefore function might fail unnecesarily.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Aaron Campbell <aaron@arbor.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2014-06-19 17:53:59 +02:00
Thomas Monjalon
acf2d1bb9f version: 1.7.0-rc1
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-19 01:14:31 +02:00
Anatoly Burakov
a7156fa28c vfio: more verbose error messages
also, making VFIO code distinguish between actual unexpected values
and ioctl() failures, providing appropriate error messages.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-06-19 00:57:51 +02:00
Anatoly Burakov
b841b88346 vfio: open container at startup rather than during init
Currently, VFIO only checks for being able to access the /dev/vfio
directory when initializing VFIO, deferring actual VFIO container
initialization to VFIO binding code. This doesn't bode well for when
VFIO container cannot be initialized for whatever reason, because
it results in unrecoverable error even if the user didn't set up
VFIO and didn't even want to use it in the first place.

This patch fixes this by moving container initialization into the
code that checks if VFIO is available at runtime. Therefore, any
issues with the container will be known at initialization stage and
VFIO will simply be turned off if container could not be set up.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-06-19 00:57:51 +02:00
Bruce Richardson
3056abfb27 i40e: remove endian.h include
endian.h is not needed for the compilation of i40e_rxtx.c and its
inclusion prevents building on FreeBSD systems.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-19 00:57:51 +02:00
Bruce Richardson
e956f01975 app/test-acl: remove unused variable
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-19 00:57:50 +02:00
Bruce Richardson
4dccdc789b app/testpmd: simplify handling of stats mappings error
Simplifiy the logic in the error checking branch. Rather than having a
single error branch which checked both RX and TX conditions and made
extensive use of the ? operator, move the error checking explicitly into
the RX and TX individual branches.

The original code caused compilation issues when attempting compilation
with clang on BSD, due to type mismatches. This change fixes the issues
while making the code easier to read and maintain overall.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-19 00:57:50 +02:00
Bruce Richardson
b4a0af7ed0 app/testpmd: fix cmdline variable types
A number of commandline entries in the testpmd commandline were actually
defined as being string type values when in fact they were being
initialized as integer types. Correct this by specifying them as integer
type values in the type definition.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-19 00:57:50 +02:00
Bruce Richardson
6af52f1134 scripts: fix filtering of config comments on bsd
On BSD 10, the cpp binary behaves a little differently and often leaves
lines starting with a space before the inital '#' character. This change
ensures those lines are filtered out properly.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-19 00:57:50 +02:00
Shannon Zhao
f1445721a9 tools: fix alignment of cpu layout output
Bug: when "core id" is greater than 9, the cpu_layout.py output doesn't align.

        Socket 0        Socket 1
        ---------       ---------
Core 9  [4, 16]         [10, 22]

Core 10         [5, 17]         [11, 23]

Solution: adjust output format to align based on the maximum length of the "core id" and "processor"

        Socket 0        Socket 1
        --------        --------
Core 9  [4, 16]         [10, 22]

Core 10 [5, 17]         [11, 23]

Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-06-19 00:57:50 +02:00
Jijiang Liu
eb6a0b950e ixgbe/base: update copyright to 2014
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:32:28 +02:00
Jijiang Liu
fdf0389a98 ixgbe/base: various changes
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:32:22 +02:00
Jijiang Liu
6202266e56 ixgbe/base: vf changes
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:32:16 +02:00
Jijiang Liu
b3dafed187 ixgbe/base: x540 changes
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:32:09 +02:00
Jijiang Liu
4a89241224 ixgbe/base: filtering changes
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:32:04 +02:00
Jijiang Liu
da7c937efc ixgbe/base: flow director changes
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:59 +02:00
Jijiang Liu
1acad5657a ixgbe/base: allow to read in sff8472
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:55 +02:00
Jijiang Liu
e7012e2c22 ixgbe/base: allow access to PHY register without lock
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:51 +02:00
Jijiang Liu
092c249e43 ixgbe/base: rework protected access to autoc register
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:46 +02:00
Jijiang Liu
741f5a7e76 ixgbe/base: rework locking
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:41 +02:00
Jijiang Liu
4ffecbe9bc ixgbe/base: rework flow control
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:36 +02:00
Jijiang Liu
8ef3200377 ixgbe/base: rework link negotiation
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:31 +02:00
Jijiang Liu
3a0bdb57ee ixgbe/base: disable laser control if manageability enabled
igned-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:25 +02:00
Jijiang Liu
b7ad3713b9 ixgbe/base: allow to disable link on D3
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:21 +02:00
Jijiang Liu
6ccbb3a669 ixgbe/base: allow to enable and disable Rx
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:14 +02:00
Jijiang Liu
d02eef4c0b ixgbe/base: allow to read rtrup2tc register
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:09 +02:00
Jijiang Liu
fe34e6d799 ixgbe/base: rework PCIe disabling
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]
2014-06-18 23:31:02 +02:00