Commit Graph

21 Commits

Author SHA1 Message Date
Ravi Kerur
d6b324c00f mbuf: get DMA address
Macros RTE_MBUF_DATA_DMA_ADDR and RTE_MBUF_DATA_DMA_ADDR_DEFAULT
are defined in each PMD driver file. Convert macros to inline
functions and move them to common lib/librte_mbuf/rte_mbuf.h file.
PMD drivers include rte_mbuf.h file directly/indirectly hence no
additioanl header file inclusion is necessary.

Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-03-04 16:01:15 +01:00
Huawei Xie
693f715da4 remove extra parentheses in return statement
fix the error reported by checkpatch:
  "ERROR: return is not a function, parentheses are not required"

remove parentheses in return like:
  "return (logical expressions)"

remove parentheses in return a function like:
  "return (rte_mempool_lookup(...))"

Fixes: 6307b909b8 ("lib: remove extra parenthesis after return")

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
2016-02-10 15:47:50 +01:00
Stephen Hemminger
1685a92a15 remove blank lines at end-of-file
This is one of those trivial things git and other tools complain
about.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-12-07 04:57:16 +01:00
Bernard Iremonger
bcf1c37b9c vmxnet3: support port hotplug
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2015-11-03 19:26:31 +01:00
Bernard Iremonger
eeefe73f0a drivers: copy PCI device info to ethdev data
Use new function rte_eth_copy_pci_info.
Copy device info for the following pdevs:

bnx2x
cxgbe
e1000
enic
fm10k
i40e
ixgbe
mlx4
mlx5
virtio
vmxnet3

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-11-03 18:39:26 +01:00
Konstantin Ananyev
cac43b19e3 vmxnet3: get descriptor limits
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2015-11-02 00:14:00 +01:00
Thomas Monjalon
ab351fe1c9 mbuf: remove packet type from offload flags
The extended unified packet type is now part of the standard ABI.
As mbuf struct is changed, the mbuf library version is incremented.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-09-03 19:22:48 +02:00
John McNamara
eebeb3f60b drivers: add warning note to base dirs
This patch adds a note to the README files in the
drivers/net/pmd/base dirs to highlight that the code should not
be modifed by the user apart from the pmd_osdep.[ch] files.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2015-08-11 00:22:41 +02:00
Sergio Gonzalez Monroy
2f9d47013e mem: move librte_malloc to eal/common
Move malloc inside eal and create a new section in MAINTAINERS file for
Memory Allocation in EAL.

Create a dummy malloc library to avoid breaking applications that have
librte_malloc in their DT_NEEDED entries.

This is the first step towards using malloc to allocate memory directly
from memsegs. Thus, memzones would allocate memory through malloc,
allowing to free memzones.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-07-16 13:44:48 +02:00
Helin Zhang
15072df01d vmxnet3: replace some offload flags with packet type
To unify packet types among all PMDs, bit masks of packet type for
'ol_flags' are replaced by unified packet type.

To avoid breaking ABI compatibility, all the changes would be
enabled by RTE_NEXT_ABI.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-07-16 00:57:32 +02:00
Stephen Hemminger
bd5d7beecd 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>
2015-07-10 00:45:29 +02:00
Stephen Hemminger
cd3606435b 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>
2015-07-10 00:45:09 +02:00
Stephen Hemminger
9fd5e98b62 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>
2015-07-10 00:42:38 +02:00
Stephen Hemminger
bb1d14b87f 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>
2015-07-10 00:42:23 +02:00
Stephen Hemminger
7ba5de417e 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>
2015-07-10 00:41:47 +02:00
Stephen Hemminger
3df28ed516 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>
2015-07-10 00:40:03 +02:00
Stephen Hemminger
c3d685bfcd 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>
2015-07-10 00:39:22 +02:00
Stephen Hemminger
f003fc3834 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>
2015-07-10 00:38:44 +02:00
Stephen Hemminger
6c52c126f2 drivers: explicit initialization of pci drivers
Upcoming drivers will need to be able to support other bus types.
This is a transparent change to how struct eth_driver is initialized.
It has not function or ABI layout impact, but makes adding a later
bus type (Xen, Hyper-V, ...) much easier.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-06-12 11:10:10 +02:00
Stephen Hemminger
ce6bc60c57 vmxnet3: fix spelling
Fix spelling errors in strings and comments.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2015-06-11 14:19:38 +02:00
Bruce Richardson
09452c07ed vmxnet3: move to drivers/net/
Move vmxnet3 PMD to drivers/net directory.
As part of the move, rename the "vmxnet3" subdirectory, containing the
original FreeBSD drivers, from "vmxnet3" to the more standard name
"base", to indicate it contains the base drivers used for the
implementation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-05-22 16:06:23 +02:00