Vlad Zolotarov [Wed, 29 Apr 2015 08:38:17 +0000 (11:38 +0300)]
ixgbe: use scattered Rx with bulk allocation
Simply initialze rx_pkt_burst callback to ixgbe_recv_pkts_lro_bulk_alloc()
if the conditions are right.
This is possible because work against HW in LRO and scattered cases is
exactly the same and LRO callback already supports the bulk allocation.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Vlad Zolotarov [Wed, 29 Apr 2015 08:38:16 +0000 (11:38 +0300)]
ixgbe: remove simple scalar scattered Rx method
Kill ixgbe_recv_scattered_pkts() - use ixgbe_recv_pkts_lro_single_alloc()
instead.
Work against HW queues in LRO and scattered Rx cases is exactly the same.
Therefore we may drop the inferior callback.
This patch also changes the sw_rsc_ring allocation in the
ixgbe_dev_rx_queue_setup() to always allocate sw_rsc_ring instead of
explicitly allocating it in all possible cases when it may be needed:
LRO and/or scattered Rx.
This will only impose sizeof(void*) * IXGBE_MAX_RING_DESC = 32KB overhead
per Rx queue as a price for a much simpler code, which seems reasonable.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Vlad Zolotarov [Wed, 29 Apr 2015 08:38:15 +0000 (11:38 +0300)]
ixgbe: rename rsc to sc/scattered_rx
- ixgbe_rsc_entry -> ixgbe_scattered_rx_entry
- sw_rsc_ring -> sw_sc_ring
- ixgbe_free_rsc_cluster() -> ixgbe_free_sc_cluster()
- In local variables: xx_rsc_yy -> xx_sc_yy
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Vlad Zolotarov [Wed, 29 Apr 2015 08:38:14 +0000 (11:38 +0300)]
ixgbe: remove unused field for RSC
Fixes:
8eecb3295aed ("ixgbe: add LRO support")
Reported-by: Shiweixian <shiweixian@huawei.com>
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Vlad Zolotarov [Wed, 29 Apr 2015 08:38:13 +0000 (11:38 +0300)]
ixgbe: move PMD specific fields out of base driver
Move rx_bulk_alloc_allowed and rx_vec_allowed from ixgbe_hw to ixgbe_adapter.
Fixes:
01fa1d6215fa ("ixgbe: unify Rx setup")
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
John McNamara [Wed, 22 Apr 2015 16:10:02 +0000 (17:10 +0100)]
doc: link doxygen api to source code
Enabled Doxygen option to add links to the source code
in documented entities.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
John McNamara [Wed, 29 Apr 2015 10:47:47 +0000 (11:47 +0100)]
doc: disable doxygen member sorting
Disabled the doxygen option to sort member data so that functions
and struct memebers are listed in order of definition in the
brief and main sections.
Previously they were sorted in the brief section and were in
definition order in the main section.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
John McNamara [Fri, 24 Apr 2015 12:58:11 +0000 (13:58 +0100)]
doc: fix spellings and typos
Fixed several typos and spelling errors in guide docs.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Sergio Gonzalez Monroy [Wed, 18 Mar 2015 12:01:31 +0000 (12:01 +0000)]
igb: handle VF LPE mailbox message
This patch adds the handle function for the LPE mailbox message (VF to
PF) to set maximum packet size, which can be used to enable jumbo
frame support.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Raz Amir [Thu, 16 Apr 2015 11:52:07 +0000 (14:52 +0300)]
eal/bsd: fix virtio on FreeBSD
Closing /dev/io fd causes SIGBUS in inb/outb instructions
as the process loses the IOPL privileges once the fd is closed:
(gdb) bt
0 0x0000000000492f2c in outb (port=49170, data=0 '\000')
at /usr/include/machine/cpufunc.h:244
1 0x0000000000492f7a in outb_p (data=0 '\000', port=49170)
at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.h:211
2 0x000000000049328d in vtpci_set_status (hw=0x80331f380, status=0 '\000')
at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:130
3 0x00000000004931fe in vtpci_reset (hw=0x80331f380)
at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:108
4 0x00000000004a175e in eth_virtio_dev_init (eth_dev=0x831b80 <rte_eth_devices>)
at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_ethdev.c:1150
5 0x0000000000462c09 in rte_eth_dev_init (pci_drv=0x79d1a0 <rte_virtio_pmd>,
pci_dev=0x802417560) at /dpdk/dpdk-2.0.0/lib/librte_ether/rte_ethdev.c:326
6 0x000000000046f03f in rte_eal_pci_probe_one_driver (dr=0x79d1a0 <rte_virtio_pmd>,
dev=0x802417560) at /dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal_pci.c:487
7 0x0000000000475b06 in pci_probe_all_drivers (dev=0x802417560)
at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:116
8 0x0000000000475bb9 in rte_eal_pci_probe ()
at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:246
9 0x000000000046cd63 in rte_eal_init (argc=5, argv=0x7fffffffeaf0)
at /dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal.c:554
10 0x0000000000404544 in main ()
Fixes:
8a312224bcde ("eal/bsd: fix fd leak")
Signed-off-by: Raz Amir <razamir22@gmail.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Jean Dao [Mon, 6 Apr 2015 19:14:20 +0000 (21:14 +0200)]
log: fix log level check
According to the api, rte_log() / rte_vlog() are supposed to check the log level
and type but they were not doing so. This check was only done in the RTE_LOG
macro while this macro is only there to remove log messages at build time.
rte_log() always calls rte_vlog(), so do the check in rte_vlog() only.
Signed-off-by: Jean Dao <jean.dao@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Sujith Sankar [Tue, 21 Apr 2015 05:51:28 +0000 (11:21 +0530)]
enic: remove use of old flow director struct
This patch removes the use of rte_fdir_filter from enic_clsf.
This also takes care of modifying the version and copyright string.
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Konstantin Ananyev [Thu, 19 Feb 2015 17:44:19 +0000 (17:44 +0000)]
acl: use setjmp/longjmp to handle alloc failures at build phase
During build phase ACL doing quite a lot of memory allocations
for relatively small temporary structures.
In theory each of such allocation can fail, so we need to handle
all these possible failures.
That adds a lot of extra checks and makes the code harder to read and follow.
To simplify the process, made changes to handle all such failures
in one place.
Note, that all that memory for temporary structures
is freed at one go at the end of build phase.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:30 +0000 (11:57 +0200)]
app/test: check cloning with different priv sizes
Verify that we can attach a mbuf to another one that does not have
the same data room size and priv_size.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:29 +0000 (11:57 +0200)]
app/test: check cloning a clone
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:28 +0000 (11:57 +0200)]
app/test: enhance mbuf refcnt check
Check that the data in the cloned mbuf is the same than in the
reference mbuf.
Check that the reference counter is incremented for each segment.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:27 +0000 (11:57 +0200)]
app/test: rename mbuf variable
It's better to name the mbuf 'm' instead of 'mc' as it's not a clone.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:26 +0000 (11:57 +0200)]
mbuf: allow to clone an indirect mbuf
Remove one limitation of rte_pktmbuf_attach(): "mbuf we're attaching to
must be direct".
Now, when we attach to an indirect mbuf:
- copy the all relevant fields (addr, len, offload, ...) as before
- get the pointer to the mbuf that embeds the data buffer (direct mbuf),
and increase the reference counter of this one.
When detaching the mbuf, we can retrieve this direct mbuf as the pointer
is determined from the buffer address.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:25 +0000 (11:57 +0200)]
mbuf: fix cloning with private mbuf data
Add a new priv_size field in mbuf structure that should
be initialized at mbuf pool creation. This field contains the
size of the application private data in mbufs.
Introduce new static inline functions rte_mbuf_from_indirect()
and rte_mbuf_to_baddr() to replace the existing macros, which
take the private size in account when attaching and detaching
mbufs.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:24 +0000 (11:57 +0200)]
apps: use helper to create mbuf pools
When it's possible, use the new helper to create the mbuf pools.
Most of the patch is trivial, except for the following files that
have some specifics (indirect mbufs):
- ip_fragmentation
- ip_pipeline
- ipv4_multicast
- vhost
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:23 +0000 (11:57 +0200)]
mbuf: introduce a new helper to create a pool
Add a new wrapper to rte_mempool_create() to simplify the creation
of a packet mbuf pool.
This wrapper can be used if there is no specific mempool flags, and
no specific mbuf or pool constructor function, which is most of the
use cases.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:22 +0000 (11:57 +0200)]
app/testpmd: use standard functions to initialize mbufs and mbuf pool
The rte_pktmbuf_pool_init() and rte_pktmbuf_init() functions now
support to have a non-hardcoded buffer length. We can remove the
specific functions used in testpmd and replace them by the standard
ones.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:21 +0000 (11:57 +0200)]
mbuf: fix init when private size is not zero
Allow the user to use the default rte_pktmbuf_init() function even
if the mbuf private size is not 0.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:20 +0000 (11:57 +0200)]
mbuf: add accessors for data room and private size
This code retrieving the pool private area is duplicated in many
places, we can use of function for it.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:19 +0000 (11:57 +0200)]
examples: always initialize mbuf pool private area
The mbuf pool private area must always be populated in a mbuf pool.
The applications or drivers may expect that for a mbuf pool, the mbuf
pool private area (mbuf_data_room_size and mbuf_priv_size) are
properly filled.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Wed, 22 Apr 2015 09:57:18 +0000 (11:57 +0200)]
mbuf: fix data room size calculation in pool init
Deduct the mbuf data room size from mempool->elt_size and priv_size,
instead of using an hardcoded value that is not related to the real
buffer size.
To use rte_pktmbuf_pool_init(), the user can either:
- give a NULL parameter to rte_pktmbuf_pool_init(): in this case, the
private size is assumed to be 0, and the room size is
mp->elt_size - sizeof(struct rte_mbuf).
- give the rte_pktmbuf_pool_private filled with appropriate
data_room_size and priv_size values.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Ouyang Changchun [Thu, 26 Feb 2015 02:08:47 +0000 (10:08 +0800)]
ixgbe/base: update readme
Update the share code version into cid-10g-shared-code.2015.02.03.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:47 +0000 (20:00 +0800)]
ixgbe/base: more constants
Update macros in ixgbe_type header files.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:01:01 +0000 (20:01 +0800)]
ixgbe/base: command for flow director
Add flow director command into argument to hold the current value of FDIRCMD register;
handle flow director mask for non-cloud mode.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:46 +0000 (20:00 +0800)]
ixgbe/base: hook hardware address declaration
Use IOMEM for hw addr.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:43 +0000 (20:00 +0800)]
ixgbe/base: add timeout to host interface command
Add timeout as new argument in host interface command.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:42 +0000 (20:00 +0800)]
ixgbe/base: get host interface command status
Add new function ixgbe_get_hi_status to get host interface command status.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:50 +0000 (20:00 +0800)]
ixgbe/base: rework host interface command
Request and response command have different struct.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:01:06 +0000 (20:01 +0800)]
ixgbe/base: new X550 device ids
The old device id: IXGBE_DEV_ID_X550EM_X is split into 2 new device id:
IXGBE_DEV_ID_X550EM_X_10G_T and IXGBE_DEV_ID_X550EM_X_1G_T
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:01:00 +0000 (20:01 +0800)]
ixgbe/base: calculate X550 checksum
Add function to calculate checksum for X550; and add buffer into argument list
to hold the eeprom image.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:01:04 +0000 (20:01 +0800)]
ixgbe/base: support kx4 phy
Setup kx4 phy for x550em;
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:48 +0000 (20:00 +0800)]
ixgbe/base: new X557 phy
Add new phy ID: X557_PHY_ID, and implement its internal setup function and external init function.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:44 +0000 (20:00 +0800)]
ixgbe/base: remove lan id from phy struct
Remove lan_id from struct ixgbe_phy_info.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:40 +0000 (20:00 +0800)]
ixgbe/base: set X540 phy power
Define the function of setting phy power;
Set copper phy power for x540.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:39 +0000 (20:00 +0800)]
ixgbe/base: extract management capability check
Define function ixgbe_mng_present to check if management capability is present or not.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:49 +0000 (20:00 +0800)]
ixgbe/base: get X550 bus info
New function to get bus information for x550em;
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:01:05 +0000 (20:01 +0800)]
ixgbe/base: fix X550 check
Update the macro to read/write iosf sb stat.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:38 +0000 (20:00 +0800)]
ixgbe/base: fix X550 CS4227 address
Update the address of IXGBE_CS4227.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:37 +0000 (20:00 +0800)]
ixgbe/base: fix X550 init early return
It could early return according to read status.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:36 +0000 (20:00 +0800)]
ixgbe/base: fix X550 link speed
Remove unnecessary '|' for the link speed.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:57 +0000 (20:00 +0800)]
ixgbe/base: rework link speed branches
Use switch-case statement to replace if-else statement.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:56 +0000 (20:00 +0800)]
ixgbe/base: support 5G link speed
Support 5G link speed for X550.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:51 +0000 (20:00 +0800)]
ixgbe/base: fix mac type checks
It needs '>=' rather than '=='.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:45 +0000 (20:00 +0800)]
ixgbe/base: fix Tx pending clearing
Wait for a last completion before clearing buffers,
and before proceeding, it needs make sure that the PCIe block does not have
transactions pending.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:35 +0000 (20:00 +0800)]
ixgbe/base: fix bus type overwrite
It needs check if the bus type is the unknown type or not.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:59 +0000 (20:00 +0800)]
ixgbe/base: fix SFP probing
LAN ID is needed for i2c access, so move it before reading I2C eeprom.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:58 +0000 (20:00 +0800)]
ixgbe/base: set SFP probing retries
Check if SFP is detected or not.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:01:03 +0000 (20:01 +0800)]
ixgbe/base: i2c bit-bang mode
Support the bit-bang mode on X550;
And negate I2C output enable;
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:54 +0000 (20:00 +0800)]
ixgbe/base: i2c combined functions
New API to perform I2C read combined operation.
New API to perform I2C write combined operation.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:34 +0000 (20:00 +0800)]
ixgbe/base: use another log macro
Use DEBUGOUT to replace ERROR_REPORT1.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Ouyang Changchun [Thu, 12 Feb 2015 12:00:33 +0000 (20:00 +0800)]
ixgbe/base: minor changes
Remove '&' before function name;
Adjust the spaces etc.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Bruce Richardson [Thu, 23 Apr 2015 12:49:19 +0000 (13:49 +0100)]
net: remove unneeded include
There are no memcpy functions in rte_ip.h so there is no need to include
rte_memcpy.h in that file.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Stephen Hemminger [Thu, 16 Apr 2015 23:23:40 +0000 (16:23 -0700)]
pci: allow const pci address parameter
probe and close both don't modify the rte_pci_addr structure
that is passed.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Stephen Hemminger [Thu, 16 Apr 2015 23:23:39 +0000 (16:23 -0700)]
pci: make device id tables const
The PCI device id table is immutable and should be made const
in all drivers. The pseudo drivers can initialize their local
copy as necessary.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Stephen Hemminger [Thu, 9 Apr 2015 21:29:42 +0000 (14:29 -0700)]
ethdev: remove unnecessary paren on return
The Linux style is not to put extra useless paren's around
the expression passed to return statement.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Stephen Hemminger [Thu, 9 Apr 2015 21:29:41 +0000 (14:29 -0700)]
ethdev: make tables const
The statistics tables and null mac address should be immutable.
Fix up get_addr routines to accept const args.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Stephen Hemminger [Thu, 9 Apr 2015 21:29:39 +0000 (14:29 -0700)]
ethdev: remove extra inline
There is no reason to inline functions that are not in the critical
path.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Sujith Sankar [Thu, 9 Apr 2015 09:29:32 +0000 (14:59 +0530)]
enic: migrate flow director filtering to new API
This patch helps enic migrate to the new flow-director API.
It takes care of the following.
1. The change in fdir_filter structure and stats structure
2. DPDK interface functions in enic_ethdev.c
3. ENIC driver functions that deal with the VIC adapter
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Adrien Mazarguil [Tue, 14 Apr 2015 14:23:55 +0000 (16:23 +0200)]
enic: fix port id in received mbufs
This field is not supposed to contain the RX queue index. Applications can
rely on it to determine the port a given mbuf comes from.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
Thomas Monjalon [Wed, 15 Apr 2015 17:09:28 +0000 (19:09 +0200)]
use simple zero initializers
To initialize a structure with zeros, one field was explicitly set
to avoid "missing initializer" bug with old GCC (e.g. 4.4).
This warning is now disabled (commit <insertlater>) for old versions of GCC,
so the workarounds may be removed.
These initializers should not be needed for static variables but they
are still used to workaround an ICC bug (see commit
b2595c4aa92d).
There is one remaining exception where {0} initializer doesn't work cleanly,
even with recent GCC:
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:735:9:
error: missing braces around initializer [-Werror=missing-braces]
struct rte_mbuf mb_def = {0}; /* zeroed mbuf */
Tested with gcc-4.4.7 (CentOS), gcc-4.7.2 (Debian), gcc-4.9.2 (Arch),
clang-3.6.0 and icc-13.1.1.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: John McNamara <john.mcnamara@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Thomas Monjalon [Tue, 14 Apr 2015 09:23:36 +0000 (11:23 +0200)]
mk: fix build with gcc 4.4 and clang
With GCC 4.4.7 from CentOS 6.5, the following errors arise:
lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_dev_rx_queue_setup':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:2509: error: missing initializer
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:2509: error: (near initialization for 'dev_info.driver_name')
lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_set_rsc':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:4072: error: missing initializer
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:4072: error: (near initialization for 'dev_info.driver_name')
lib/librte_pmd_ixgbe/ixgbe_rxtx.c: In function 'ixgbe_recv_pkts_lro_single_alloc':
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:1479: error: 'next_rsc_entry' may be used uninitialized in this function
lib/librte_pmd_ixgbe/ixgbe_rxtx.c:1480: error: 'next_rxe' may be used uninitialized in this function
The "missing initializer" warning is a GCC bug which seems fixed in 4.7.
The same warning is thrown by clang.
The "may be used uninitialized" warning is another GCC bug which seems fixed in 4.7.
Fixes:
8eecb3295aed ("ixgbe: add LRO support")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Igor Ryzhov [Wed, 8 Apr 2015 16:31:07 +0000 (19:31 +0300)]
doc: fix vhost guide
Guide says that a configure parameter to choose between vhost cuse
and vhost user will be introduced in the future, but it’s already
added by commit
28a1ccca41bf.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
John McNamara [Fri, 10 Apr 2015 15:39:26 +0000 (16:39 +0100)]
doc: convert prog guide glossary to definition list
Converted the Glossary table in the Programmer's Guide
to a definition list to improve rendering.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
John McNamara [Fri, 10 Apr 2015 14:45:39 +0000 (15:45 +0100)]
doc: fix verbatim sections for vmxnet3
Fixed two verbatim text sections in vmxnet3 docs.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Vlad Zolotarov [Mon, 30 Mar 2015 19:21:11 +0000 (22:21 +0300)]
ixgbe: add LRO support
- Only x540 and 82599 devices support LRO.
- Add the appropriate HW configuration.
- Add RSC aware rx_pkt_burst() handlers:
- Implemented bulk allocation and non-bulk allocation versions.
- Add LRO-specific fields to rte_eth_rxmode, to rte_eth_dev_data
and to ixgbe_rx_queue.
- Use the appropriate handler when LRO is requested.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Vlad Zolotarov [Mon, 30 Mar 2015 19:21:10 +0000 (22:21 +0300)]
ixgbe: code refactoring
- ixgbe_rx_alloc_bufs():
- Reset the rte_mbuf fields only when requested.
- Take the RDT update out of the function.
- Add the stub when RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC is not defined.
- ixgbe_recv_scattered_pkts():
- Take the code that updates the fields of the cluster's HEAD buffer into
the inline function.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Vlad Zolotarov [Mon, 30 Mar 2015 19:21:09 +0000 (22:21 +0300)]
ixgbe: cleanups
- Removed the not needed casting.
- ixgbe_dev_rx_init(): shorten the lines by defining a local alias variable to access
&dev->data->dev_conf.rxmode.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Stephen Hemminger [Tue, 7 Apr 2015 21:21:03 +0000 (14:21 -0700)]
ethdev: make dev_ops const
The ethernet device ops function table should be made const for
safety and security.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Stephen Hemminger [Tue, 7 Apr 2015 21:21:02 +0000 (14:21 -0700)]
app/test: put dev_ops in private
The test PMD uses a special type of eth_dev_ops to test features.
Rather allocating this separately, just put in the private data area.
This allows for next change to make dev_ops const.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Stephen Hemminger [Tue, 7 Apr 2015 21:21:01 +0000 (14:21 -0700)]
pmd: remove useless null checks before rte_free
Since rte_free accept NULL and does nothing, better to save
space and remove these useless checks.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Stephen Hemminger [Tue, 7 Apr 2015 21:21:00 +0000 (14:21 -0700)]
examples: remove useless null checks before rte_free
rte_free handles getting passed a NULL pointer.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Stephen Hemminger [Tue, 7 Apr 2015 21:20:59 +0000 (14:20 -0700)]
app/test: remove useless null check before rte_free
rte_free like Glibc free allows rte_free(NULL) as null operation.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Stephen Hemminger [Tue, 7 Apr 2015 21:20:58 +0000 (14:20 -0700)]
app/test: remove useless memset
Remove useless memset, since dev_private is created by rte_zmalloc
it must already be zero.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Thomas Monjalon [Thu, 9 Apr 2015 17:03:14 +0000 (19:03 +0200)]
scripts: test null forwarding
This script ease testing of basic initializations and Rx/Tx bursts.
It may help to check obvious regressions.
In order to run it on a standard development machine, it doesn't use
neither hugepages nor real interfaces.
The optional parameters are:
- build directory (default: build)
- coremask (default: 3 i.e. cores 0 and 1)
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Thu, 9 Apr 2015 17:34:17 +0000 (19:34 +0200)]
mk: fix static linking with null pmd
Null PMD was not found when using a statically linked application:
EAL: no driver found for eth_null1
EAL: failed to initialize eth_null1 device
Fixes:
c743e50c475f ("null: new poll mode driver")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Thu, 9 Apr 2015 17:23:45 +0000 (19:23 +0200)]
mk: remove uio suffix from virtio pmd
The virtio pmd is not restricted to uio anymore.
Fixes:
da978dfdc43b ("virtio: use port IO to get PCI resource")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Thomas Monjalon [Tue, 7 Apr 2015 17:17:06 +0000 (19:17 +0200)]
enic: disable debug traces
The function name is printed in each enic_ethdev function.
Disable it by default with a new build option.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
Reviewed-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Thomas Monjalon [Fri, 3 Apr 2015 15:48:30 +0000 (17:48 +0200)]
doc: fix code-block syntax
Some blocks are not visible with some Sphinx versions because
they are using the wrong keyword for code.
Tested with Sphinx v1.1.3.
Fixes:
1733be6d3147 ("doc: new eal multi-pthread feature")
Fixes:
ccefe752cab0 ("doc: add jobstats sample guide")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Fri, 3 Apr 2015 16:19:56 +0000 (18:19 +0200)]
version: 2.1.0-rc0
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Tue, 31 Mar 2015 01:30:25 +0000 (03:30 +0200)]
version: 2.0.0
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Thu, 2 Apr 2015 10:49:34 +0000 (12:49 +0200)]
pkg: update RPM
Enable vhost-user and build PDF doc.
Inkscape and TeXLive are required to convert .svg and .rst to .pdf.
Temporary sphinx files .* (.doctrees/ and .buildinfo) are cleaned.
Tested on Fedora 20.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Thu, 2 Apr 2015 15:59:45 +0000 (17:59 +0200)]
pkg: remove -core file suffix
Since -core suffix was removed from the package names in commit
6f2760ecdf4e, the file name should also be updated.
The alignment of build commands is also changed to prepare next patch.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Thu, 2 Apr 2015 16:14:23 +0000 (18:14 +0200)]
mk: reduce PDF build commands
In case of documents without image, an empty rm command can be seen if V=1.
Remove it to avoid disturbing debugging.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Thomas Monjalon [Thu, 2 Apr 2015 17:20:33 +0000 (19:20 +0200)]
mk: remove fuse requirement for vhost-user
The fuse library is needed for vhost-cuse as required in commit
28a1ccca41bf.
The case vhost-user was forgotten for application linking.
Fixes:
28a1ccca41bf ("vhost: add build option for vhost-user")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Siobhan Butler [Fri, 3 Apr 2015 09:51:42 +0000 (10:51 +0100)]
doc: update new features
- Remove duplicate entry
- Added remaining features to list of new features
Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Siobhan Butler [Thu, 2 Apr 2015 21:31:07 +0000 (22:31 +0100)]
doc: add known issue with bonding test
Added issue with failing unit test for link bonding to known issues.
Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Siobhan Butler [Thu, 2 Apr 2015 20:58:15 +0000 (21:58 +0100)]
doc: remove release version from known issues
Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Thomas Monjalon [Tue, 31 Mar 2015 12:45:06 +0000 (14:45 +0200)]
mbuf: clean old refcnt option
CONFIG_RTE_MBUF_SCATTER_GATHER was renamed into CONFIG_RTE_MBUF_REFCNT
by commit
62814bc2e923 and removed by commit
4769bc5a27cc.
Some traces remain because of delayed patches.
It can also be removed from doxygen config.
It is now poisoned in rte_mbuf.h to warn any misuse.
Fixes:
d0dff9ba445e ("doc: sample application user guide")
Fixes:
fc1f2750a3ec ("doc: programmers guide")
Fixes:
4769bc5a27cc ("mbuf: remove build option to disable refcnt")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Adrien Mazarguil [Thu, 2 Apr 2015 09:33:43 +0000 (11:33 +0200)]
doc: update mlx4 usage and dependencies
- libmlx4 and libibverbs dependencies distributed with Mellanox OFED are now
also available on DPDK.org to make installation easier.
- Document Mellanox OFED and firmware versions to use.
- Add links to Mellanox and its community websites.
- Add kernel modules parameters section.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Helin Zhang [Fri, 3 Apr 2015 08:06:55 +0000 (16:06 +0800)]
doc: comment i40e firmware version
Added notes for i40e firmware version. As base driver to support the
latest version of firmware (FVL3E) hasn't been integrated, currently
the validated version of firmware is 4.2.6.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
Cunming Liang [Wed, 1 Apr 2015 02:33:34 +0000 (10:33 +0800)]
i40e: fix link status timeout
API *rte_eth_link_get* expect to call a wait to complete link_update.
That's the difference between *rte_eth_link_get_nowait*.
The patch fixes the issue that i40e link_update ignores the wait_to_complete flag.
The issue impacts those applications calling rte_eth_link_get to get wrong intermediate link status.
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Jingjing Wu [Thu, 12 Feb 2015 11:22:23 +0000 (19:22 +0800)]
i40e: fix out of bound read
Klocwork reports array 'src_offset' may use index 16.
In function i40e_srcoff_to_flx_pit, index j + 1 can reach I40E_FDIR_MAX_FLEX_LEN.
This patch fixes this issue to avoid array bound.
Test report: http://www.dpdk.org/ml/archives/dev/2015-March/016030.html
Fixes:
d8b90c4eabe9 ("i40e: take flow director flexible payload configuration")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
Pablo de Lara [Wed, 1 Apr 2015 12:10:11 +0000 (13:10 +0100)]
doc: add note for --txqflags in testpmd
Since txqflags is now set from the default rx/tx configuration,
depending on the PMD, it might not be 0.
Therefore, user has to overwrite it with --txqflags 0.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
John McNamara [Wed, 1 Apr 2015 11:32:45 +0000 (12:32 +0100)]
mk: fix pdf doc rules order
Re-ordered the guide-pdf-% and guide-% rules to allow
the doc-guides-pdf target to build with make 3.81. It
builds unmodified with all later versions of make.
Fixes:
ebf8050afd44 ("doc: add pdf output")
Reported-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Tue, 31 Mar 2015 22:00:37 +0000 (00:00 +0200)]
pci: rename passthrough driver to kernel driver
Kernel driver (kdrv) seems easier to understand than
passthrough driver (pt_driver). It's also more generic
as a PMD could run on top of any PCI kernel driver if
it would offer such support.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>