Bruce Richardson [Mon, 13 Jul 2015 16:38:45 +0000 (17:38 +0100)]
hash: rename unused field
The cuckoo hash has a fixed number of entries per bucket, so the
configuration parameter for this is unused. We change this field in the
parameters struct to "reserved" to indicate that there is now no such
parameter value, while at the same time keeping ABI consistency.
Fixes:
48a399119619 ("hash: replace with cuckoo hash implementation")
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:19 +0000 (16:25 +0800)]
mpipe: add TILE-Gx mPIPE poll mode driver
This commit adds a poll mode driver for the mPIPE hardware present on
TILE-Gx SoCs.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:18 +0000 (16:25 +0800)]
eal/tile: add initial TILE-Gx support
This commit adds support for the TILE-Gx platform, as well as the TILE
CPU architecture. This architecture port is fairly simple due to its
reliance on generics for most arch stuff.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:17 +0000 (16:25 +0800)]
eal/tile: add page sizes for TILE-Gx/Mx platforms
This patch adds a few new page sizes that are supported on the TILE-Gx
and TILE-Mx platforms.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:16 +0000 (16:25 +0800)]
mempool: allow config override on element alignment
On TILE-Gx and TILE-Mx platforms, the buffers fed into the hardware
buffer manager require a 128-byte alignment. With this change, we
allow configuration based override of the element alignment, and
default to RTE_CACHE_LINE_SIZE if left unspecified.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:15 +0000 (16:25 +0800)]
mem: allow multiple page sizes to be requested
This patch extends the memzone allocator to remove the restriction
that prevented callers from specifying multiple page sizes in the
flags argument.
In doing so, we also sanitize the free segment matching logic to get
rid of architecture specific disjunctions (2MB vs 1GB on x86, and 16MB
vs 16GB on PPC), thereby allowing for a broader range of hugepages on
architectures that support it.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:14 +0000 (16:25 +0800)]
mem: refactor memzone reserve functions
The definitions of rte_memzone_reserve_aligned() and
rte_memzone_reserve_bounded() were identical with the exception of the
bound argument passed into rte_memzone_reserve_thread_safe().
This patch removes this replication of code by unifying it into
rte_memzone_reserve_thread_safe(), which is then called by all three
variants of rte_memzone_reserve().
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:13 +0000 (16:25 +0800)]
config: remove combined library name option
The library name is now being pinned to "dpdk" instead of intel_dpdk,
powerpc_dpdk, etc. As a result, we no longer need this config item.
This patch removes it.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Zhigang Lu [Thu, 9 Jul 2015 08:25:12 +0000 (16:25 +0800)]
eal: allow empty compile time cpu flags
When RTE_COMPILE_TIME_CPUFLAGS is empty, the rte_cpu_check_supported()
code breaks with a "comparison is always false due to limited range of
data type". This is because the compile_time_flags[] array is empty.
Assigning the array dimension to a local variable apparently solves this.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:11 +0000 (16:25 +0800)]
hash: check SSE flags only on x86 builds
This is necessary because the required CPU flags may not be defined on
other architectures.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Cyril Chemparathy [Thu, 9 Jul 2015 08:25:10 +0000 (16:25 +0800)]
app/test: restrict x86 cpu flags checks to x86 builds
The original code mistakenly defaulted to X86 when RTE_ARCH_PPC_64 was
left undefined. This did not accommodate other non-PPC/non-X86
architectures. This patch fixes this issue.
Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Huawei Xie [Mon, 13 Jul 2015 10:22:34 +0000 (18:22 +0800)]
maintainers: claim responsibility for virtio and vhost
As original author of virtio PMD (coauthor with Rashmin) and vhost user,
claim responsibility for virtio PMD, vhost lib and vhost example.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
James Davidson [Mon, 4 May 2015 15:28:13 +0000 (08:28 -0700)]
e1000: add 82583v pci id
Add support for 82583V (E1000) PCI device id.
Signed-off-by: James Davidson <james.davidson@brocade.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Mon, 13 Jul 2015 02:32:21 +0000 (10:32 +0800)]
maintainers: claim responsibility for e1000 drivers
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Mon, 13 Jul 2015 08:51:40 +0000 (10:51 +0200)]
mk: fix shared lib build with stable abi
When next ABI is enabled, the shared lib extension is .so.x.1.
That's why a double basename was introduced.
But the "ifeq NEXT_ABI" was forgotten, removing the .so
extension when NEXT_ABI is disabled.
It was preventing the linker from finding the .so libraries.
Fixes:
506f51cc0da7 ("mk: enable next abi preview")
Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Pablo de Lara [Sat, 11 Jul 2015 00:18:56 +0000 (01:18 +0100)]
doc: update hash guide
Updates hash library documentation, reflecting
the new implementation changes.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Sat, 11 Jul 2015 00:18:55 +0000 (01:18 +0100)]
doc: announce deprecation of macros in hash API
Two of the macros in rte_hash.h are now deprecated, so this patch
adds notice that they will be removed in 2.2.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Sat, 11 Jul 2015 00:18:54 +0000 (01:18 +0100)]
maintainers: claim responsibility for hash library
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Pablo de Lara [Sat, 11 Jul 2015 00:18:53 +0000 (01:18 +0100)]
hash: add iterate function
Since now rte_hash structure is private, a new function
has been added to let the user iterate through the hash table,
returning next key and data associated on each iteration,
plus the position where they were stored.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Sat, 11 Jul 2015 00:18:52 +0000 (01:18 +0100)]
hash: allow to store data in hash table
Usually hash tables not only store keys, but also data associated
to them. In order to maintain the existing API, the old functions
will still return the index where the key was stored.
The new functions will return the data associated to that key.
In the case of the lookup_bulk function, it will return also
the number of entries found and a bitmask of which entries
were found.
Unit tests have been updated to use these new functions.
As a final point, a flag has been added in rte_hash_parameters
to indicate if there are new parameters for future versions,
so there is no need to maintain multiple versions
of the existing functions in the future.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: fix || operator in a precondition check]
Pablo de Lara [Sat, 11 Jul 2015 00:18:51 +0000 (01:18 +0100)]
hash: add reset function
Added reset function to be able to empty the table,
without having to destroy and create it again.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Sat, 11 Jul 2015 00:18:50 +0000 (01:18 +0100)]
hash: replace with cuckoo hash implementation
This patch replaces the existing hash library with another approach,
using the Cuckoo Hash method to resolve collisions (open addressing),
which pushes items from a full bucket when a new entry tries
to be added in it, storing the evicted entry in an alternative location,
using a secondary hash function.
This gives the user the ability to store more entries when a bucket
is full, in comparison with the previous implementation.
Therefore, the unit test has been updated, as some scenarios have changed
(such as the previous removed restriction).
Also note that the API has not been changed, although new fields
have been added in the rte_hash structure (structure is internal now).
The main change when creating a new table is that the number of entries
per bucket is fixed now, so its parameter is ignored now
(still there to maintain the same parameters structure).
The hash unit test has been updated to reflect these changes.
As a last note, the maximum burst size in lookup_burst function
hash been increased to 64, to improve performance.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
John McNamara [Fri, 10 Jul 2015 13:08:13 +0000 (14:08 +0100)]
ethdev: call Rx and Tx callbacks in the order they were added
Change the order that user supplied RX and TX callbacks are called
to the order that they were added (fifo).
The previous calling order was the reverse of this (lifo) and was
counter intuitive for users.
Suggested-by: Robert Sanford <rsanford@akamai.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Tetsuya Mukawa [Thu, 9 Jul 2015 08:19:14 +0000 (17:19 +0900)]
ethdev: improve API comments of close and detach functions
The patch fixes doxygen comments of below functions.
- rte_eth_dev_close()
Add description about when the function can be called and also about
what kind of resources will be freed.
- rte_eth_dev_detach()
Add description about when the function can be called.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Jijiang Liu [Wed, 8 Jul 2015 02:08:25 +0000 (10:08 +0800)]
doc: announce ABI change to support 1024 queues per port
The significant ABI change is planned for struct rte_eth_dev to support
up to 1024 queues per port which will be taken effect from release 2.2.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Jijiang Liu [Wed, 8 Jul 2015 01:24:35 +0000 (09:24 +0800)]
config: revert the max queues per port to 256
The previous commit changed the size and the offsets of struct rte_eth_dev,
so it is an ABI breakage.
I revert it, and will send a deprecation notice for this.
Fixes:
1a1109404e70 ("config: increase max queues per port")
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Simon Kagstrom [Wed, 24 Jun 2015 08:33:52 +0000 (10:33 +0200)]
mem: warn once if pagemap is unreadable
Newer kernels make this unreadable for security reasons for non-roots.
Running the application will then fill the logs with
rte_mem_virt2phy: cannot open /proc/self/pagemap
messages.
However, there are cases when DPDK is and should be run as non-root,
without the need for virtual-to-physical address translations: a
typical example is when working with PCAP input/output. This patch
adds a start-time check for /proc/self/pagemap readability, and
directly returns an error code from rte_mem_virt2phy().
This way, there is only a one-time warning at startup instead of
constant warnings all the time.
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net>
Xuelin Shi [Tue, 24 Mar 2015 05:58:20 +0000 (13:58 +0800)]
lpm: fix big endian support
This module uses type conversion between struct and int.
Also truncation and comparison is used with this int.
It is not safe for different endian arch.
Add ifdef for big endian struct to fix this issue.
Signed-off-by: Xuelin Shi <xuelin.shi@freescale.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tero Aho [Wed, 8 Jul 2015 15:53:20 +0000 (16:53 +0100)]
pcap: support jumbo frames
Extend eth_pcap rx and tx to support jumbo frames.
On the receive side read large packets into multiple mbufs and
on the transmit side convert them back to a single pcap buffer.
Signed-off-by: Tero Aho <tero.aho@coriant.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Chen Jing D(Mark) [Fri, 10 Jul 2015 08:19:20 +0000 (16:19 +0800)]
fm10k: fix RETA table initialization
fm10k has 128 RETA entries in 32 registers, but it only initialized
first 32 when doing multiple rx queue configurations. This fix will
initialize all 128 entries instead.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Shaopeng He [Fri, 26 Jun 2015 02:37:26 +0000 (10:37 +0800)]
fm10k: fix error when adding default vlan
The default MAC address is read from hardware and copied to
Device Ethernet Link address array in the device initialization phase,
which bypasses fm10k MAC address number check mechanism,
and will cause an error message when adding default VLAN:
"MAC address number not match"
Fix it by moving default MAC address registration to device
initialize phase.
Fixes:
f5c1a236a218 ("fm10k: fix default mac/vlan in switch")
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Damjan Marion [Wed, 10 Jun 2015 22:19:25 +0000 (00:19 +0200)]
i40e: prefetch next mbuf in Rx init loop
This patch improves performance of Rx with i40e devices.
Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
[Thomas: apply Helin's comments]
Zhe Tao [Thu, 9 Jul 2015 02:58:08 +0000 (10:58 +0800)]
i40e: fix check of descriptor done flag
If a descriptor the device drive is handling is the context descriptor,
its type value will be 0x1.
When using the not operator ! to do the conditional check, if the expression
value is zero, the device driver will consider the transaction for this
descriptor has been completed, even its DD field is still 0x1 which means
NIC has not finished the operation on this descriptor.
Use the 0xF to check the DD status to avoid the above issue happens.
Fixes:
4861cde46116 ("i40e: new poll mode driver")
Fixes:
05999aab4ca6 ("i40e: add or delete flow director")
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Wenzhuo Lu [Wed, 8 Jul 2015 01:14:05 +0000 (09:14 +0800)]
ixgbe: allow to disable flow control
There's a parameter "autoneg on|off" in testpmd CLI "set flow_ctrl ...". This
parameter is used to enable/disable auto negotiation for flow control. But it's
not supported yet.
The auto negotiation is enabled by default, we have no way to disable it. This
patch lets the parameter "autoneg on|off" be supproted.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Michael Qiu [Thu, 11 Jun 2015 07:29:52 +0000 (15:29 +0800)]
ixgbe: reset hardware stats on initialization
When initialize the hardware, the stat should be reset.
Otherwise when detach then attach port, the stat will not
be re-init to zero.
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Pablo de Lara [Thu, 9 Jul 2015 16:54:30 +0000 (17:54 +0100)]
app/test: improve hash unit tests
Add new unit test for calculating the average table utilization,
using random keys, based on number of entries that can be added
until we encounter one that cannot be added (bucket if full).
Also, replace current hash_perf unit test to see performance more clearly.
The current hash_perf unit test takes too long and add keys that
may or may not fit in the table and look up/delete that may not be
in the table. This new unit test gets a set of keys that we know
that fits in the table, and then measure the time to add/look up/delete
them.
Note that performance numbers include time to take a random key
from a pre-made array of keys, plus a quick check of return value.
Also, as stated above, expect higher numbers, as all operations
in the new unit tests will be successful, which means that
it will take more time, than mixing both successful and unsuccesful
operations.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Wed, 8 Jul 2015 11:27:34 +0000 (12:27 +0100)]
hash: hide structure from header and make it internal
rte_hash structure should not be a public structure,
and therefore it should be moved to the C file and be declared
as internal. rte_hash_hash implementation is also moved
to the C file, as it uses the structure.
This patch also removes part of a unit test that was checking
a field of the structure.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Miguel Bernal Marin [Fri, 26 Jun 2015 22:14:38 +0000 (17:14 -0500)]
kni: fix build with vhost header enabled
A missing port from memcpy_toiovecend to copy_to_iter
is showed when vHost HDR is enabled. DPDK would not build.
This patch add this validation to build with kernel > 3.19.
Fixes:
45e63ba8db31 ("kni: fix vhost build with kernels 3.19 and 4.0")
Linux:
ba7438aed924 ("vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()")
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Miguel Bernal Marin [Fri, 26 Jun 2015 22:14:37 +0000 (17:14 -0500)]
kni: fix vhost build with kernel 4.1
Parameters from sendmsg and recvmsg has been changed in 4.1 kernel.
The function pointers belong to proto_ops structure were updated removing
the struct kiocb parameter.
Linux:
1b784140474e ("net: Remove iocb argument from sendmsg and recvmsg")
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Miguel Bernal Marin [Fri, 26 Jun 2015 22:14:36 +0000 (17:14 -0500)]
kni: fix build with kernel 4.1
rebuild member was removed from headers_ops in kernel release
4.1. Therefore kni module compilation breaks.
This patch add the properly checks to fix it.
Linux:
d476059e77d1 ("net: Kill dev_rebuild_header")
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Miguel Bernal Marin [Fri, 26 Jun 2015 22:14:35 +0000 (17:14 -0500)]
kni: fix igb build with kernel 4.1
ndo_bridge_getlink has changed in kernel release 4.1. It
adds new parameter which breaks compilation.
This patch add the properly checks to fix it.
Linux:
46c264daaaa5 ("bridge/nl: remove wrong use of NLM_F_MULTI")
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Rahul Lakkireddy [Tue, 7 Jul 2015 17:12:30 +0000 (22:42 +0530)]
cxgbe: update documentation
Update cxgbe documentation with the following:
1. Add instructions on how to flash firmware and config file on Chelsio T5
devices.
2. Add a list of supported devices.
3. Add instructions on how to enable and disable flow control via testpmd.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Rahul Lakkireddy [Tue, 7 Jul 2015 17:12:29 +0000 (22:42 +0530)]
cxgbe: add more supported devices
Update pci id table to include more supported Chelsio T5 devices.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Rahul Lakkireddy [Tue, 7 Jul 2015 17:12:28 +0000 (22:42 +0530)]
cxgbe: improve Rx performance
CXGBE PMD rx allocates a new mbuf everytime, which could lead to performance
hit. Instead, do bulk allocation of mbufs and re-use them.
Also, simplify the overall rx-handler, and update its logic to fix rx perf.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
John McNamara [Thu, 9 Jul 2015 13:30:19 +0000 (14:30 +0100)]
app/testpmd: refactor ieee1588 forwarding
Refactor the ieee1588_fwd mode in testpmd to use the new ethdev
APIs to enable and read IEEE1588 PTP timestamps.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
John McNamara [Thu, 9 Jul 2015 13:30:18 +0000 (14:30 +0100)]
i40e: add ieee1588 timestamping
Add ixgbe support for new ethdev APIs to enable and read IEEE1588/
802.1AS PTP timestamps.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
John McNamara [Thu, 2 Jul 2015 15:16:30 +0000 (16:16 +0100)]
ixgbe: add ieee1588 timestamping
Add ixgbe support for new ethdev APIs to enable and read IEEE1588
PTP timestamps.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
John McNamara [Thu, 2 Jul 2015 15:16:29 +0000 (16:16 +0100)]
e1000: add ieee1588 timestamping
Add e1000/igb support for new ethdev APIs to enable and read
IEEE1588 PTP timestamps.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
John McNamara [Thu, 9 Jul 2015 13:30:15 +0000 (14:30 +0100)]
mbuf: add ieee1588 timestamping
Add mbuf field to store the IEEE1588 RX register index and other flags.
The size of the structure is not changed (still 2 cache lines).
Signed-off-by: John McNamara <john.mcnamara@intel.com>
John McNamara [Thu, 2 Jul 2015 15:16:28 +0000 (16:16 +0100)]
ethdev: add ieee1588 timestamping
Add ethdev API to enable and read IEEE1588/802.1AS PTP timestamps
from devices that support it. The following functions are added:
rte_eth_timesync_enable()
rte_eth_timesync_disable()
rte_eth_timesync_read_rx_timestamp()
rte_eth_timesync_read_tx_timestamp()
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
[Thomas: merged with new macro VALID_PORTID_OR_ERR_RET]
Stephen Hemminger [Thu, 9 Jul 2015 18:24:16 +0000 (11:24 -0700)]
vmxnet3: remove unnecessary inlining
No reason to inline large functions. Compiler will decide already
based on optimization level.
Also register array should be const.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Stephen Hemminger [Thu, 9 Jul 2015 18:24:15 +0000 (11:24 -0700)]
vmxnet3: get rid of debug ifdefs
By defining macro as a stub it is possible to get rid of #ifdef's
in the actual code. Always evaluate the argument (even in the stub)
so that there are no extra unused variable errors.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Stephen Hemminger [Thu, 9 Jul 2015 18:24:14 +0000 (11:24 -0700)]
vmxnet3: support RSS and refactor Rx offload
Refactor the logic to compute receive offload flags to a simpler
function. And add support for putting RSS flow hash into packet.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bill Hong <bhong@brocade.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Stephen Hemminger [Thu, 9 Jul 2015 18:24:13 +0000 (11:24 -0700)]
vmxnet3: fix link state handling
The Intel version of VMXNET3 driver does not handle link state properly.
The VMXNET3 API returns 1 if connected and 0 if disconnected.
Also need to return correct value to indicate state change.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Stephen Hemminger [Thu, 9 Jul 2015 18:24:12 +0000 (11:24 -0700)]
vmxnet3: support multi-segment transmit
Change sending loop to support multi-segment mbufs.
The VMXNET3 api has start-of-packet and end-packet flags, so it
is not hard to send multi-segment mbuf's.
Also, update descriptor in 32 bit value rather than toggling
bitfields which is slower and error prone.
Based on code in earlier driver, and the Linux kernel driver.
Add a compiler barrier to make sure that update of earlier descriptor
are completed prior to update of generation bit on start of packet.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Stephen Hemminger [Thu, 9 Jul 2015 18:24:11 +0000 (11:24 -0700)]
vmxnet3: cleanup Tx stats per queue
There are several stats here which are never set, and have no way
to be displayed. Assume in future xstats could be used.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Stephen Hemminger [Thu, 9 Jul 2015 18:24:10 +0000 (11:24 -0700)]
vmxnet3: remove mtu check
Remove check for packets greater than MTU. No other driver does
this, it should be handled at higher layer
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Stephen Hemminger [Thu, 9 Jul 2015 18:24:09 +0000 (11:24 -0700)]
vmxnet3: enable vlan filtering
Support the VLAN filter functionality of the VMXNET3 interface.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
Olivier Matz [Thu, 9 Jul 2015 09:01:29 +0000 (11:01 +0200)]
app/test: decrease size of requested mempool
In test application, the default size of allocated mempool is calculated
as following:
(RTE_MAX_LCORE * (RTE_MEMPOOL_CACHE_MAX_SIZE + max_kept_objects)) - 1
The objective is to ensure that all cores can fill their cache and keep
'max_kept_objects' at the same time. As RTE_MAX_LCORE is 128 and
RTE_MEMPOOL_CACHE_MAX_SIZE is 512 in the default configuration, it can
produce very large mempools (170 MB).
We can replace the number of core by a dynamic value, which drastically
reduces the amount of memory needed for this test (5 MB with 4 cores).
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Maciej Gajdzica [Tue, 7 Jul 2015 08:09:35 +0000 (10:09 +0200)]
examples/ip_pipeline: rework flow classification pipeline
Flow classification pipeline implementation is split to two files.
pipeline_flow_classification.c file handles front-end functions (cli
commands parsing) pipeline_flow_classification_ops.c contains
implementation of functions done by pipeline (back-end).
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Maciej Gajdzica [Tue, 7 Jul 2015 08:09:34 +0000 (10:09 +0200)]
examples/ip_pipeline: rework routing pipeline
Routing pipeline implementation is split to two files.
pipeline_routing.c file handles front-end functions (cli commands
parsing) pipeline_routing_ops.c contains implementation of functions
done by pipeline (back-end).
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Daniel Mrzyglod [Tue, 7 Jul 2015 08:09:33 +0000 (10:09 +0200)]
examples/ip_pipeline: rework firewall pipeline
Firewall pipeline implementation is split to two files.
pipeline_firewall.c file handles front-end functions (cli commands
parsing) pipeline_firewall_ops.c contains implementation of functions
done by pipeline (back-end).
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Tue, 7 Jul 2015 08:09:32 +0000 (10:09 +0200)]
examples/ip_pipeline: rework passthrough pipeline
Passthrough pipeline implementation is split to two files.
pipeline_passthrough.c file handles front-end functions (cli commands
parsing) pipeline_passthrough_ops.c contains implementation of functions
done by pipeline (back-end).
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Maciej Gajdzica [Tue, 7 Jul 2015 08:09:31 +0000 (10:09 +0200)]
examples/ip_pipeline: move config files to separate directory
Created new folder for config(.cfg) and script(.sh) files.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Maciej Gajdzica [Tue, 7 Jul 2015 08:09:30 +0000 (10:09 +0200)]
examples/ip_pipeline: add application thread
Application thread runs pipelines on assigned cores.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Tue, 7 Jul 2015 08:09:29 +0000 (10:09 +0200)]
examples/ip_pipeline: add master pipeline
Master pipeline is responsible for command line handling and
communicationg with all other pipelines via message queues. Removed
cmdline.c file, as its functionality will be split over multiple
pipeline files.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Maciej Gajdzica [Tue, 7 Jul 2015 08:09:28 +0000 (10:09 +0200)]
examples/ip_pipeline: move pipelines to separate directory
Moved pipelines to separate folder, removed not needed pipelines and
modified Makefile to match that change.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Maciej Gajdzica [Tue, 7 Jul 2015 08:09:27 +0000 (10:09 +0200)]
examples/ip_pipeline: rework initialization parameters
After changes in config parser, app params struct is changed and
requires modifications in initialization procedures.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Tue, 7 Jul 2015 08:09:26 +0000 (10:09 +0200)]
examples/ip_pipeline: add config file checks
After loading configuration from a file, data integrity is checked.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Pawel Wodkowski [Tue, 7 Jul 2015 08:09:25 +0000 (10:09 +0200)]
examples/ip_pipeline: rework config file syntax
New syntax of config files is needed for ip_pipeline example
enhancements. Some old files are temporarily disabled in the Makefile.
It is part of a bigger change.
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Maciej Gajdzica [Thu, 9 Jul 2015 08:17:10 +0000 (10:17 +0200)]
pipeline: fix missing exported symbols
Exported symbols for port in, port out and table stats.
Fixes:
6504bb5ec460 ("pipeline: add statistics for ports and tables")
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Maciej Gajdzica [Thu, 9 Jul 2015 08:17:09 +0000 (10:17 +0200)]
port: fix missing exported symbols
Exported symbols for nodrop, fragmentation, reassembly ports
Fixes:
304c8091e90a ("port: add ethdev writer nodrop")
Fixes:
5f4cd47309d6 ("port: add ring writer nodrop")
Fixes:
bf673b7553e1 ("port: add IPv6 fragmentation port")
Fixes:
50f54a84dfb7 ("port: add IPv6 reassembly port")
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
David Marchand [Thu, 9 Jul 2015 09:19:26 +0000 (11:19 +0200)]
eal/linux: fix out of bound access in hugepage init
Using IBM advance toolchain on Ubuntu 14.04 (package 8.0-3), gcc is complaining
about out of bound accesses.
CC eal_hugepage_info.o
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:
In function ‘eal_hugepage_info_init’:
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:350:35:
error: array subscript is above array bounds [-Werror=array-bounds]
internal_config.hugepage_info[j].hugepage_sz)
^
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:350:35:
error: array subscript is above array bounds [-Werror=array-bounds]
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:349:37:
error: array subscript is above array bounds [-Werror=array-bounds]
if (internal_config.hugepage_info[j-1].hugepage_sz <
^
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:350:35:
error: array subscript is above array bounds [-Werror=array-bounds]
internal_config.hugepage_info[j].hugepage_sz)
Looking at the code, these warnings are invalid from my pov and they disappeared
when upgrading the toolchain to new version (8.0-4).
However, the code was buggy (sorting code is wrong), so fix this by using qsort
and adding a check on num_sizes to avoid potential out of bound accesses.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
David Marchand [Thu, 9 Jul 2015 09:19:25 +0000 (11:19 +0200)]
eal/linux: fix indent of hugepage init
With this, we should be checkpatch compliant.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
David Marchand [Thu, 9 Jul 2015 09:19:24 +0000 (11:19 +0200)]
eal/linux: rework loop in hugepage init
Replace this while loop with a for loop and simplify error handling.
Indent is broken on purpose, fixed in next commit.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
David Marchand [Thu, 9 Jul 2015 09:19:23 +0000 (11:19 +0200)]
eal/linux: improve coding style of hugepage init
Prepare for checkpatch compliance.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
David Marchand [Thu, 9 Jul 2015 09:19:22 +0000 (11:19 +0200)]
eal/linux: remove useless casts in hugepage init
Rather than cast the huge pages number returned by get_num_hugepages, rework
this function so that it returns 0 when something goes wrong.
And no need for casts in log.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
David Marchand [Thu, 9 Jul 2015 09:19:21 +0000 (11:19 +0200)]
eal/linux: remove useless process type check in hugepage init
The code in eal_hugepage_info.c is not reachable by secondary processes.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Bruce Liu [Wed, 8 Jul 2015 15:15:47 +0000 (23:15 +0800)]
hash: fix build on non-x86 arch
In the no-x86 branch, a parentheses is missing.
And need to include <limits.h> header to use CHAR_BIT.
Fixes:
49361c3f3cfa ("hash: remove duplicated code")
Signed-off-by: Bruce Liu <2103458176@qq.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Helin Zhang [Fri, 12 Jun 2015 07:34:01 +0000 (15:34 +0800)]
app/testpmd: show the hash key size
As querying hash key size in byte was supported, it can be shown
in testpmd after getting the device information if not zero.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Helin Zhang [Fri, 12 Jun 2015 07:33:56 +0000 (15:33 +0800)]
ethdev: add the hash key size per device
To support querying hash key size per port, an new field of
'hash_key_size' was added in 'struct rte_eth_dev_info' for storing
hash key size in bytes.
The correct hash key size in bytes should be filled into the
'struct rte_eth_dev_info', to support querying it.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Thomas Monjalon [Thu, 2 Jul 2015 21:03:40 +0000 (23:03 +0200)]
mk: enable next abi preview
When a change makes really hard to keep ABI compatibility,
instead of waiting next release to break the ABI, it is smoother
to introduce the new code as a preview and disable it when packaging.
The flag RTE_NEXT_ABI must be used to "ifdef" the new code.
When the release is out, a dynamically linked application can use
the new shared libraries with the old ABI while developpers can prepare
their application for the next ABI by reading the deprecation notice
and easily testing the new code.
When starting the next release cycle, the "ifdefs" will be removed
and the ABI break will be marked by incrementing LIBABIVER. The map
files will also be updated.
The default value is enabled to be developer compliant.
The packagers must disable it as done in pkg/dpdk.spec.
When enabled, all shared library numbers are incremented by appending
a minor .1 to the old ABI number. In the next release, only impacted
libraries will have a major +1 increment.
The impacted libraries must provide an alternative map file to use
with this option.
The ABI policy is updated.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Thomas Monjalon [Wed, 8 Jul 2015 10:34:26 +0000 (12:34 +0200)]
mk: remove variables identical to config ones
CONFIG_RTE_BUILD_SHARED_LIB and CONFIG_RTE_BUILD_COMBINE_LIBS does not
have quotes in their values (only y or n). That's why the variables
RTE_BUILD_SHARED_LIB and RTE_BUILD_COMBINE_LIBS are always identical to
their CONFIG_ counterpart, and are useless.
In order to have consistent naming of config options in the makefiles,
these options are removed and the "CONFIG_ prefixed" variables are used.
Fixes:
e25e4d7ef16b ("mk: shared libraries")
Fixes:
4d3d79e7a5c6 ("mk: combined library")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Raz Amir [Thu, 5 Mar 2015 16:24:23 +0000 (18:24 +0200)]
nic_uio: probe and attach devices after unload
Added code that saves the pointers to the detached devices, during
driver loading, and during driver unloading, go over the list,
and re-attach them by calling device_probe_and_attach
on each device.
Signed-off-by: Raz Amir <razamir22@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tetsuya Mukawa [Tue, 30 Jun 2015 08:26:51 +0000 (17:26 +0900)]
eal: enable port hotplug as default for linux and bsd
This patch removes CONFIG_RTE_LIBRTE_EAL_HOTPLUG option, and enables it
as default in both Linux and BSD.
Also, to support port hotplug, rte_eal_pci_scan() and below missing
symbols should be exported to ethdev library.
- rte_eal_parse_devargs_str()
- rte_eal_pci_close_one()
- rte_eal_pci_probe_one()
- rte_eal_pci_scan()
- rte_eal_vdev_init()
- rte_eal_vdev_uninit()
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:53 +0000 (19:34 +0900)]
pci: merge probing and closing functions for linux and bsd
This patch consolidates below functions, and implements these in common
eal code.
- rte_eal_pci_probe_one_driver()
- rte_eal_pci_close_one_driver()
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:52 +0000 (19:34 +0900)]
pci: merge mapping functions for linux and bsd
The patch consolidates below functions, and implemented in common
eal code.
- pci_map_device()
- pci_unmap_device()
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:51 +0000 (19:34 +0900)]
pci: merge uio functions for linux and bsd
The patch consolidates below functions, and implement these
in eal_common_pci_uio.c.
- pci_uio_map_secondary()
- pci_uio_map_resource()
- pci_uio_unmap()
- pci_uio_find_resource()
- pci_uio_unmap_resource()
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:50 +0000 (19:34 +0900)]
pci: merge resource mapping functions for linux and bsd
The patch consolidates below functions, and implemented in common
eal code.
- pci_map_resource()
- pci_unmap_resource()
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:49 +0000 (19:34 +0900)]
pci: merge mapping structures for linux and bsd
This patch consolidates below structures, and defines them in common code.
- struct pci_map
- struct mapped_pci_resources
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:48 +0000 (19:34 +0900)]
pci: introduce function to map uio resource by index
This patch adds a new function called pci_uio_map_resource_by_index().
The function hides how to map uio resource in linuxapp and bsdapp.
With the function, pci_uio_map_resource() will be more abstracted.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:47 +0000 (19:34 +0900)]
pci: introduce functions to alloc and free uio resource
This patch adds new functions called pci_uio_alloc_resource() and
pci_uio_free_resource().
The functions hides how to prepare or free uio resource in linuxapp
and bsdapp. With the function, pci_uio_map_resource() will be more
abstracted.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:46 +0000 (19:34 +0900)]
pci: fix uio mapping differences between linux and bsd
This patch fixes below.
- bsdapp
- Use map_id in pci_uio_map_resource().
- Fix interface of pci_map_resource().
- Move path variable of mapped_pci_resource structure to pci_map.
- linuxapp
- Remove redundant error message of linuxapp.
'pci_uio_map_resource()' is implemented in both linuxapp and bsdapp,
but interface is different. The patch fixes the function of bsdapp
to do same as linuxapp. After applying it, file descriptor should be
opened and closed out of pci_map_resource().
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:45 +0000 (19:34 +0900)]
pci/bsd: rename structures
To merge pci code of linuxapp and bsdapp, this patch changes names
like below.
- uio_map to pci_map
- uio_resource to mapped_pci_resource
- uio_res_list to mapped_pci_res_list
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:44 +0000 (19:34 +0900)]
pci: fix memory leaks and needless increment of map address
This patch fixes following memory leaks.
- When open() is failed, uio_res and fds won't be freed in
pci_uio_map_resource().
- When pci_map_resource() is failed but path is allocated correctly,
path and fds won't be freed in pci_uio_map_recource().
Also, some mapped resources should be freed.
- When pci_uio_unmap() is called, path should be freed.
Also, fixes below.
- When pci_map_resource() is failed, mapaddr will be MAP_FAILED.
In this case, pci_map_addr should not be incremented in
pci_uio_map_resource().
- To shrink code, move close().
- Remove fail variable.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:43 +0000 (19:34 +0900)]
pci: close file descriptor of uio configuration
When pci_uio_unmap_resource() is called, a file descriptor that is used
for uio configuration should be closed.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Tetsuya Mukawa [Wed, 8 Jul 2015 10:34:42 +0000 (19:34 +0900)]
pci: fix coding style
This patch fixes coding style of below files in linuxapp and bsdapp.
- eal_pci.c
- eal_pci_uio.c
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Pablo de Lara [Wed, 8 Jul 2015 09:51:33 +0000 (10:51 +0100)]
eal: add const in prefetch functions
rte_prefetchX functions included volatile void *p as parameter,
but the function does not modify it,
so it should include the const keyword.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Jingjing Wu [Wed, 8 Jul 2015 06:37:19 +0000 (14:37 +0800)]
i40e: fix build with gcc 4.4
Fix the build warning reported like:
error: dereferencing pointer 'cmd' does break strict-aliasing rules
Fixes:
a4def5edf0fc ("i40e: enable port mirroring")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Jingjing Wu [Tue, 16 Jun 2015 03:43:46 +0000 (11:43 +0800)]
app/testpmd: add flow director for L2 payload
This patch extends flow director commands to support l2_payload flow type.
Test report: http://dpdk.org/ml/archives/dev/2015-June/020238.html
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>