dpdk.git
10 years agoi40e/base: remove useless code for pre-boot
Helin Zhang [Tue, 9 Sep 2014 07:21:30 +0000 (15:21 +0800)]
i40e/base: remove useless code for pre-boot

The code wrapped in '#ifdef PREBOOT_SUPPORT' was added for
queue context initialization specifically for A0 silicon.
As A0 silicon has gone for a long time, the code should be
removed at all. In addition, the checks of 'QV_RELEASE'
and 'PREBOOT_SUPPORT' are also not needed anymore and can
be removed.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Chen Jing <jing.d.chen@intel.com>
Tested-by: HuilongX Xu <huilongx.xu@intel.com>
10 years agoi40e/base: remove useless code for Solaris
Helin Zhang [Tue, 9 Sep 2014 07:21:27 +0000 (15:21 +0800)]
i40e/base: remove useless code for Solaris

The code wrapped in '#ifdef DMA_SYNC_SUPPORT' was written specially
for Solaris, it is not needed anymore for others including DPDK.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Chen Jing <jing.d.chen@intel.com>
Tested-by: HuilongX Xu <huilongx.xu@intel.com>
10 years agoi40e/base: remove test code for ethtool
Helin Zhang [Tue, 9 Sep 2014 07:21:28 +0000 (15:21 +0800)]
i40e/base: remove test code for ethtool

The code wrapped in '#ifdef ETHTOOL_TEST' in i40e_diag.c is for
ethtool testing only, it is not needed anymore and can be removed.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Chen Jing <jing.d.chen@intel.com>
Tested-by: HuilongX Xu <huilongx.xu@intel.com>
10 years agoi40e/base: support nvmupdate by default
Helin Zhang [Tue, 9 Sep 2014 07:21:26 +0000 (15:21 +0800)]
i40e/base: support nvmupdate by default

'nvmupdate' is intended to support the userland NVMUpdate tool for
Fortville eeprom. These code changes is to remove the conditional
compile macro, and support those by default. In addition, renaming
all 'errno' to avoid any compile warning or error.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Chen Jing <jing.d.chen@intel.com>
Tested-by: HuilongX Xu <huilongx.xu@intel.com>
10 years agoi40e/base: make the indentation more consistent
Helin Zhang [Tue, 9 Sep 2014 07:21:25 +0000 (15:21 +0800)]
i40e/base: make the indentation more consistent

In share code, 'tab' is used to align values rather than 'space'.
The changes in i40e_adminq_cmd.h is to make the indentation more
consistent in share code.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Chen Jing <jing.d.chen@intel.com>
Tested-by: HuilongX Xu <huilongx.xu@intel.com>
10 years agoixgbe: support X550
Ouyang Changchun [Mon, 29 Sep 2014 07:16:26 +0000 (15:16 +0800)]
ixgbe: support X550

Update device id and PF driver to support X550.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: support X550
Ouyang Changchun [Mon, 29 Sep 2014 07:16:25 +0000 (15:16 +0800)]
ixgbe/base: support X550

Add new file to support controller X550, therefore update the Makefile
and README file. It also updates the API functions, DCB related functions,
mailbox related functions, etc to support X550.
In addition, some new macros used by X550 are added.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: merge dependent patches]

10 years agoixgbe/base: i2c combined read/write
Ouyang Changchun [Tue, 7 Oct 2014 08:11:12 +0000 (10:11 +0200)]
ixgbe/base: i2c combined read/write

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: malicious driver detection
Ouyang Changchun [Tue, 7 Oct 2014 12:49:03 +0000 (14:49 +0200)]
ixgbe/base: malicious driver detection

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: iosf sideband read/write
Ouyang Changchun [Tue, 7 Oct 2014 12:47:41 +0000 (14:47 +0200)]
ixgbe/base: iosf sideband read/write

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: anti spoofing
Ouyang Changchun [Tue, 7 Oct 2014 12:45:16 +0000 (14:45 +0200)]
ixgbe/base: anti spoofing

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: source address pruning
Ouyang Changchun [Tue, 7 Oct 2014 12:43:35 +0000 (14:43 +0200)]
ixgbe/base: source address pruning

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: support EEE
Ouyang Changchun [Tue, 7 Oct 2014 12:42:01 +0000 (14:42 +0200)]
ixgbe/base: support EEE

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: dma coalescing
Ouyang Changchun [Tue, 7 Oct 2014 12:39:24 +0000 (14:39 +0200)]
ixgbe/base: dma coalescing

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: thermal sensor
Ouyang Changchun [Tue, 7 Oct 2014 12:31:21 +0000 (14:31 +0200)]
ixgbe/base: thermal sensor

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: fdir cloud mode
Ouyang Changchun [Mon, 29 Sep 2014 07:16:12 +0000 (15:16 +0800)]
ixgbe/base: fdir cloud mode

Supports flow director cloud mode in IXGBE base code.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: reset VF registers
Ouyang Changchun [Mon, 29 Sep 2014 07:16:23 +0000 (15:16 +0800)]
ixgbe/base: reset VF registers

Reset VF registers to initial values in IXGBE base code.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: clean phy sfp handling
Ouyang Changchun [Tue, 7 Oct 2014 07:53:52 +0000 (09:53 +0200)]
ixgbe/base: clean phy sfp handling

Remove 10GBASE_ER support.
Always support 1000BASE_LX.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: support qsfp and lco
Ouyang Changchun [Fri, 3 Oct 2014 18:48:20 +0000 (20:48 +0200)]
ixgbe/base: support qsfp and lco

- Implement functions to do I2C byte read and write
- Support 82599_QSFP_SF_QP and 82599_LS

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: move phy sfp detection in a function
Ouyang Changchun [Fri, 3 Oct 2014 18:40:49 +0000 (20:40 +0200)]
ixgbe/base: move phy sfp detection in a function

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: rework semaphore
Ouyang Changchun [Mon, 29 Sep 2014 07:16:21 +0000 (15:16 +0800)]
ixgbe/base: rework semaphore

- Store lan_id and physical semaphore mask into hardware physical information,
and use them to control read and write physical registers in IXGBE base code.
- Extend mask from 16 bits to 32 bits for releasing or acquiring SWFW semaphore
in IXGBE base code. It is used in reading and writing I2C byte.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: merge dependent patches]

10 years agoixgbe/base: remove unnecessary delay
Ouyang Changchun [Mon, 29 Sep 2014 07:16:22 +0000 (15:16 +0800)]
ixgbe/base: remove unnecessary delay

Remove unnecessary delay when setting up physical link and negotiating
in IXGBE base code.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: wait longer while polling X540 flash update
Ouyang Changchun [Mon, 29 Sep 2014 07:16:18 +0000 (15:16 +0800)]
ixgbe/base: wait longer while polling X540 flash update

It need wait for 5 ms for polling EEC register in IXGBE X540 base code.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: wait longer for VF link status
Ouyang Changchun [Tue, 7 Oct 2014 08:12:14 +0000 (10:12 +0200)]
ixgbe/base: wait longer for VF link status

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: fix flow control comment
Ouyang Changchun [Tue, 7 Oct 2014 08:12:04 +0000 (10:12 +0200)]
ixgbe/base: fix flow control comment

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: refactor manageability block communication
Ouyang Changchun [Mon, 29 Sep 2014 07:16:14 +0000 (15:16 +0800)]
ixgbe/base: refactor manageability block communication

Introduce a new argument to let caller determine if it need read and
return data or not after executing host interface command in IXGBE base code.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: refactor eeprom checksum calculation
Ouyang Changchun [Mon, 29 Sep 2014 07:16:13 +0000 (15:16 +0800)]
ixgbe/base: refactor eeprom checksum calculation

Refines function to let eeprom checksum calculation return
either a negative error code on error, or the 16-bit checksum
in IXGBE base code.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: factorize fdir command complete check
Ouyang Changchun [Mon, 29 Sep 2014 07:16:11 +0000 (15:16 +0800)]
ixgbe/base: factorize fdir command complete check

Implements a function to check command complete for flow director in
IXGBE base code, and replaces related code snippet with this function.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: move manageability function
Ouyang Changchun [Fri, 3 Oct 2014 13:17:36 +0000 (15:17 +0200)]
ixgbe/base: move manageability function

Manageability query is a common routine (not specific to 82599).

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agoixgbe/base: new error types
Ouyang Changchun [Mon, 29 Sep 2014 07:16:19 +0000 (15:16 +0800)]
ixgbe/base: new error types

This patch defines new error type in IXGBE base code; they are
used to report different kinds of error.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: various clean up
Ouyang Changchun [Mon, 29 Sep 2014 07:16:10 +0000 (15:16 +0800)]
ixgbe/base: various clean up

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoixgbe/base: minor changes
Ouyang Changchun [Mon, 29 Sep 2014 07:16:09 +0000 (15:16 +0800)]
ixgbe/base: minor changes

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovirtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated
Damjan Marion [Thu, 11 Sep 2014 22:25:08 +0000 (15:25 -0700)]
virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated

If VIRTIO_NET_F_CTRL_VQ is not negotiated hw->cvq will be NULL

Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Changchun Ouyang <Changchun.ouyang@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agokni: fix build on Ubuntu 12.04.5
Daniel Mrzyglod [Tue, 30 Sep 2014 12:10:25 +0000 (13:10 +0100)]
kni: fix build on Ubuntu 12.04.5

Recent Ubuntu 12.04.5 LTS is shipped with 3.13.0-36.63 as the only
supported kernel.
So skb_set_hash has been backported and is conflicting with kni kcompat one.
Commit a09b359daca ("fix build on Ubuntu 14.04") describes the initial problem.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
[Thomas: reorder conditions to ease reading]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoixgbe: fix build with clang
Bruce Richardson [Tue, 30 Sep 2014 09:40:08 +0000 (10:40 +0100)]
ixgbe: fix build with clang

Clang fails with an error about a variable being used uninitialized:

lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:67:30:
error: variable 'dma_addr0' is uninitialized
      when used here [-Werror,-Wuninitialized]
                        dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0);
                                                  ^~~~~~~~~

This error can be fixed by replacing the call to xor which
takes two parameters, by a call to setzero, which does not take any.

Reported-by: Keith Wiles <keith.wiles@windriver.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoversion: 1.8.0-rc1
Thomas Monjalon [Mon, 29 Sep 2014 20:03:21 +0000 (22:03 +0200)]
version: 1.8.0-rc1

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoethdev: rename flag for queue start and stop
Ouyang Changchun [Fri, 26 Sep 2014 05:00:53 +0000 (13:00 +0800)]
ethdev: rename flag for queue start and stop

Rename start_?x_per_q to ?x_deferred_start
and add comments.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agodoc: apply one comment to all members of a group
Thomas Monjalon [Wed, 17 Sep 2014 16:11:12 +0000 (18:11 +0200)]
doc: apply one comment to all members of a group

A doxygen group begins with /**@{*/ and ends with /**@}*/.
By enabling DISTRIBUTE_GROUP_DOC, the first comment is applied
to each undocumented member of the group.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agopcap: set port id in received mbuf
Saori Usami [Fri, 5 Sep 2014 10:10:36 +0000 (19:10 +0900)]
pcap: set port id in received mbuf

The port parameter in mbuf should be set with an input port id
because DPDK apps may use it to know where each packet came from.

Signed-off-by: Saori Usami <susami@igel.co.jp>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agopci: remove flag for multiple devices with single id
Thomas Monjalon [Fri, 26 Sep 2014 15:46:38 +0000 (17:46 +0200)]
pci: remove flag for multiple devices with single id

The flag RTE_PCI_DRV_MULTIPLE was used to register an eth_driver allowing
multiples devices with a single PCI id.
It is now possible to register a pci_driver and create ethdev objects
using rte_eth_dev_allocate().

Suggested-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: remove rte_snprintf
Thomas Monjalon [Fri, 26 Sep 2014 14:13:37 +0000 (16:13 +0200)]
eal: remove rte_snprintf

The function rte_snprintf() was deprecated in version 1.7.0
(commit 6f41fe75e2dd).
It's now totally removed.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: remove unused flags field
David Marchand [Tue, 26 Aug 2014 14:11:40 +0000 (16:11 +0200)]
eal: remove unused flags field

This field is not used anymore, remove it.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: set iopl only when needed
David Marchand [Tue, 26 Aug 2014 14:11:39 +0000 (16:11 +0200)]
eal: set iopl only when needed

There is no need for ioport access for applications that won't use virtio pmds.
Make rte_eal_iopl_init() non-static so that it is called from pmds that need it.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal/bsd: fix fd leak
David Marchand [Tue, 26 Aug 2014 14:11:38 +0000 (16:11 +0200)]
eal/bsd: fix fd leak

From man(4) io:
"The initial implementation simply raised the IOPL of the current thread
when open(2) was called on the device. This behaviour is retained in the
current implementation as legacy support for both i386 and amd64."
    http://www.freebsd.org/cgi/man.cgi?query=io&sektion=4

Nothing prevents from closing it just after.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoexamples: do not probe pci twice
Thomas Monjalon [Fri, 26 Sep 2014 11:42:51 +0000 (13:42 +0200)]
examples: do not probe pci twice

Since commit a155d430119 ("support link bonding device initialization"),
rte_eal_pci_probe() is called in rte_eal_init().
So it doesn't have to be called by application anymore.
It has been fixed for testpmd in commit 2950a769315,
and this patch remove it from other applications.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: revert link bonding specific initialization
David Marchand [Tue, 26 Aug 2014 14:12:17 +0000 (16:12 +0200)]
eal: revert link bonding specific initialization

Revert commit a155d430119 ("support link bonding device initialization"),
except PCI probing at rte_eal_init time.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: merge revert with PCI probing restore]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agobond: move param parsing in configure step
David Marchand [Tue, 26 Aug 2014 14:12:16 +0000 (16:12 +0200)]
bond: move param parsing in configure step

Rework bond pmd initialisation so that we don't need to modify eal
for this pmd to work.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoixgbe: allow unsupported SFP
Thomas Monjalon [Fri, 26 Sep 2014 12:36:05 +0000 (14:36 +0200)]
ixgbe: allow unsupported SFP

No need to restrict usage of non Intel SFP.
If (hw->phy.type == ixgbe_phy_sfp_intel) is false,
a warning will be logged.
It was disabled for ixgbe and enabled but unused for i40e.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoixgbe: fix crash caused by bulk allocation failure
Balazs Nemeth [Fri, 26 Sep 2014 09:57:20 +0000 (09:57 +0000)]
ixgbe: fix crash caused by bulk allocation failure

Since the introduction of vector PMD, a bug in ixgbe_rxq_rearm could
cause a crash. As long as the memory pool allocated to the RX queue
has mbufs available, there is no problem. After allocation of _all_
mbufs from the memory pool, previously returned mbufs by
rte_eth_rx_burst could be accessed by subsequent calls to the PMD and
could be returned by subsequent calls to rte_eth_rx_burst. From the
perspective of the application, the means that fields within the mbuf
could change and that previously allocated mbufs could appear multiple
times.

After failure of mbuf allocation, the dd bits should indicate that the
packets are not ready. For this, this patch adds code to reset the dd
bits in the first RTE_IXGBE_DESCS_PER_LOOP packets of the next
RTE_IXGBE_RXQ_REARM_THRESH packets only if the next
RTE_IXGBE_RXQ_REARM_THRESH packets that will be accessed contain
previously allocated packets.

Setting the bits is not enough. The bits are checked _after_ setting
the mbuf fields, thus a mechanism is needed to prevent the previously
used mbuf pointers from being accessed during the speculative load of
the mbuf fields. For this reason, not only the dd bits are reset, but
also the mbufs associated to those descriptors are set to point to a
"fake" mbuf.

Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoixgbe: fix id and hash with flow director
Pawel Wodkowski [Wed, 20 Aug 2014 07:46:28 +0000 (08:46 +0100)]
ixgbe: fix id and hash with flow director

When Flow Director was used together with bulk alloc, id and hash
was swapped when packet matches flow director filter due to improper
fdir field initialization.

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: merged with mbuf changes]

10 years agoigb: fix i211 support
Sergey Mironov [Thu, 4 Sep 2014 08:35:11 +0000 (12:35 +0400)]
igb: fix i211 support

igb_ethdev.c contains function eth_igb_infos_get() which should set
number of tx/rx queues supported by the hardware. It contains huge
[switch] but there is no i211 case!
Also, there are few other places which mention i210, but not mention i211.

I didn't check it enough to say it is totally correct.
For now I see that it just able to send and receive some packets.

Signed-off-by: Sergey Mironov <grrwlf@gmail.com>
Reviewed-by: Helin Zhang <helin.zhang@intel.com>
[Thomas: fix indent]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoapp/testpmd: new command to get extended statistics
Olivier Matz [Wed, 23 Jul 2014 12:28:54 +0000 (14:28 +0200)]
app/testpmd: new command to get extended statistics

Add a new token in "show port" command to dump the extended statistics
of a device. It validates the new xstats framework added in previous commit.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoethdev: new method to retrieve extended statistics
Olivier Matz [Wed, 23 Jul 2014 12:28:53 +0000 (14:28 +0200)]
ethdev: new method to retrieve extended statistics

This method can be implemented by a poll mode driver to provide
non-standard statistics (which are not part of the generic statistics
structure). Each statistic is returned in a generic form: "name" and
"value" and can be used to dump PMD-specific statistics in the same way
than ethtool in linux kernel.

If the PMD does not provide the xstats_get and xstats_set functions, the
ethdev API will return the generic statistics in the xstats format
(name, value).

This commit opens the door for a clean-up of the generic statistics
structure, only keeping statistics that are really common to all PMDs
and moving specific ones into the xstats API.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: fix some comments]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agokni: remove useless file for bsd
Bruce Richardson [Wed, 3 Sep 2014 11:18:40 +0000 (12:18 +0100)]
kni: remove useless file for bsd

KNI applies only to linux, so there should be no need for any kni files to
be present in the bsdapp eal folder.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: indent files
David Marchand [Mon, 22 Sep 2014 08:38:01 +0000 (10:38 +0200)]
eal: indent files

Indent files modified in previous commit.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: rework long options parsing
David Marchand [Mon, 22 Sep 2014 08:38:00 +0000 (10:38 +0200)]
eal: rework long options parsing

Identify all options through the getopt_long return value.
This way, we only need a big switch/case.

Indentation is broken to ease commit review (fixed in next commit).

Suggested-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: merge bsd and linux common options parsing
David Marchand [Mon, 22 Sep 2014 08:37:59 +0000 (10:37 +0200)]
eal: merge bsd and linux common options parsing

All common options are now in a single file.
Common usage() has been moved as well.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: fix checkpatch issues before moving code
David Marchand [Mon, 22 Sep 2014 08:37:58 +0000 (10:37 +0200)]
eal: fix checkpatch issues before moving code

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: remove duplicate handling of white/black list
David Marchand [Mon, 22 Sep 2014 08:37:57 +0000 (10:37 +0200)]
eal: remove duplicate handling of white/black list

We can handle both short and long options for those in the same case.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: factorise unsupported option handling
David Marchand [Mon, 22 Sep 2014 08:37:56 +0000 (10:37 +0200)]
eal: factorise unsupported option handling

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: remove unused --use-device option
David Marchand [Mon, 22 Sep 2014 08:37:55 +0000 (10:37 +0200)]
eal: remove unused --use-device option

Following commit cac6d08c8bde and 4bf3fe634a4
(replace --use-device option by --pci-whitelist and --vdev),
this option is not available anymore.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoeal: set log level from command line
David Marchand [Wed, 17 Sep 2014 13:46:52 +0000 (15:46 +0200)]
eal: set log level from command line

Add a --log-level option to set the default eal log level.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoe1000: add a message when forcing scatter mode
David Marchand [Wed, 17 Sep 2014 13:46:51 +0000 (15:46 +0200)]
e1000: add a message when forcing scatter mode

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoe1000: always log init messages
David Marchand [Wed, 17 Sep 2014 13:46:50 +0000 (15:46 +0200)]
e1000: always log init messages

'init' messages should always be logged and filtered at runtime by rte_log.
All the more so as these messages are not in the datapath.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoe1000: clean log messages
David Marchand [Wed, 17 Sep 2014 13:46:49 +0000 (15:46 +0200)]
e1000: clean log messages

- remove leading \n in some messages,
- remove trailing \n in some messages,
- split multi lines messages,
- introduce PMD_INIT_FUNC_TRACE macro and use it instead of
  PMD_INIT_LOG(DEBUG, "some_func")

Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Jay Rolette <rolette@infiniteio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoe1000: indent logs sections
David Marchand [Wed, 17 Sep 2014 13:46:48 +0000 (15:46 +0200)]
e1000: indent logs sections

Prepare for next commit, indent sections where log messages will be modified so
that next patch is only about \n.

Signed-off-by: David Marchand <david.marchand@6wind.com>
10 years agoe1000/base: add a raw log macro
David Marchand [Wed, 17 Sep 2014 13:46:47 +0000 (15:46 +0200)]
e1000/base: add a raw log macro

Since base driver always add a trailing \n, add a PMD_DRV_LOG_RAW macro that
will not add one.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoe1000: use the right debug macro
David Marchand [Wed, 17 Sep 2014 13:46:46 +0000 (15:46 +0200)]
e1000: use the right debug macro

- We should not use DEBUGOUT* / DEBUGFUNC macros in pmd.
These macros come as compat wrappers for base driver.
- We should avoid calling RTE_LOG directly as pmd provides a wrapper for logs.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Jay Rolette <rolette@infiniteio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoi40e: add log messages when rx bulk mode is not usable
David Marchand [Wed, 17 Sep 2014 13:46:45 +0000 (15:46 +0200)]
i40e: add log messages when rx bulk mode is not usable

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoi40e: always log init messages
David Marchand [Wed, 17 Sep 2014 13:46:44 +0000 (15:46 +0200)]
i40e: always log init messages

'init' messages should always be logged and filtered at runtime by rte_log.
All the more so as these messages are not in the datapath.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoi40e: clean log messages
David Marchand [Wed, 17 Sep 2014 13:46:43 +0000 (15:46 +0200)]
i40e: clean log messages

- remove leading \n in some messages,
- remove trailing \n in some messages,
- split multi lines messages.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Jay Rolette <rolette@infiniteio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoi40e: indent logs sections
David Marchand [Wed, 17 Sep 2014 13:46:42 +0000 (15:46 +0200)]
i40e: indent logs sections

Prepare for next commit, indent sections where log messages will be modified so
that next patch is only about \n.

Signed-off-by: David Marchand <david.marchand@6wind.com>
10 years agoi40e/base: add a raw log macro
David Marchand [Wed, 17 Sep 2014 13:46:41 +0000 (15:46 +0200)]
i40e/base: add a raw log macro

Since base driver always add a trailing \n, add a PMD_DRV_LOG_RAW macro that
will not add one.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoi40e: use the right debug macro
David Marchand [Wed, 17 Sep 2014 13:46:40 +0000 (15:46 +0200)]
i40e: use the right debug macro

- Don't use DEBUGFUNC macro in pmd.
- Don't use printf for logs.
- We should avoid calling RTE_LOG directly as pmd provides a wrapper for logs.
- Replace some PMD_INIT_LOG(DEBUG, "some_func") with PMD_INIT_FUNC_TRACE().

Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Jay Rolette <rolette@infiniteio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: add log messages when rx bulk mode is not usable
David Marchand [Wed, 17 Sep 2014 13:46:39 +0000 (15:46 +0200)]
ixgbe: add log messages when rx bulk mode is not usable

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: add a message when forcing scatter mode
David Marchand [Wed, 17 Sep 2014 13:46:38 +0000 (15:46 +0200)]
ixgbe: add a message when forcing scatter mode

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: always log init messages
David Marchand [Wed, 17 Sep 2014 13:46:37 +0000 (15:46 +0200)]
ixgbe: always log init messages

'init' messages should always be logged and filtered at runtime by rte_log.
All the more so as these messages are not in the datapath.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: clean log messages
David Marchand [Wed, 17 Sep 2014 13:46:36 +0000 (15:46 +0200)]
ixgbe: clean log messages

- remove leading \n in some messages,
- remove trailing \n in some messages,
- split multi lines messages.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Jay Rolette <rolette@infiniteio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: indent logs sections
David Marchand [Wed, 17 Sep 2014 13:46:35 +0000 (15:46 +0200)]
ixgbe: indent logs sections

Prepare for next commit, indent sections where log messages will be modified so
that next patch is only about \n.

Signed-off-by: David Marchand <david.marchand@6wind.com>
[Thomas: fix also some missing whitespaces]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoixgbe/base: add a raw log macro
David Marchand [Wed, 17 Sep 2014 13:46:34 +0000 (15:46 +0200)]
ixgbe/base: add a raw log macro

Since base driver always add a trailing \n, add a PMD_DRV_LOG_RAW macro that
will not add one.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: use the right debug macro
David Marchand [Wed, 17 Sep 2014 13:46:33 +0000 (15:46 +0200)]
ixgbe: use the right debug macro

- We should not use DEBUGOUT*/DEBUGFUNC macros in pmd code.
These macros come as compat wrappers for base driver.
- We should avoid calling RTE_LOG directly as pmd provides a wrapper for logs.
- Replace some PMD_INIT_LOG(DEBUG, "some_func") with PMD_INIT_FUNC_TRACE().

Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Jay Rolette <rolette@infiniteio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agolog: add function to retrieve log level
Matthew Hall [Sun, 14 Sep 2014 08:34:46 +0000 (01:34 -0700)]
log: add function to retrieve log level

It is helpful when you want outside code to cooperate with and respect
log levels set in DPDK. Then you can avoid using duplicate incompatible
log code in the DPDK and non-DPDK parts of the app.

Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[Thomas: add void to fix function signature]

10 years agoixgbe: fix build with gcc 4.4
Bruce Richardson [Thu, 18 Sep 2014 10:55:52 +0000 (11:55 +0100)]
ixgbe: fix build with gcc 4.4

The refcnt field is contained within an anonymous union within the mbuf
data structure, and gcc 4.4 gives an error about an unknown field unless
the initialiser for the field is contained within extra braces.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoixgbe: improve slow-path perf with vector scattered Rx
Bruce Richardson [Thu, 11 Sep 2014 13:15:47 +0000 (14:15 +0100)]
ixgbe: improve slow-path perf with vector scattered Rx

Provide a wrapper routine to enable receive of scattered packets with a
vector driver. This improves the performance of the slow-path RX.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: fix perf regression due to moved pool ptr
Bruce Richardson [Mon, 15 Sep 2014 16:20:13 +0000 (17:20 +0100)]
ixgbe: fix perf regression due to moved pool ptr

Adjust the fast-path code to fix the regression caused by the pool
pointer moving to the second cache line. This change adjusts the
prefetching and also the way in which the mbufs are freed back to the
mempool.
Note: slow-path e.g. path supporting jumbo frames, is still slower, but
is dealt with by a later commit

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: rework vector pmd following mbuf changes
Bruce Richardson [Thu, 11 Sep 2014 13:15:43 +0000 (14:15 +0100)]
ixgbe: rework vector pmd following mbuf changes

The vector PMD expects fields to be in a specific order so that it can
do vector operations on multiple fields at a time. Following mbuf
rework, adjust driver to take account of the new layout and re-enable it
in the config.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agombuf: move l2_len and l3_len to second cache line
Bruce Richardson [Thu, 11 Sep 2014 13:15:45 +0000 (14:15 +0100)]
mbuf: move l2_len and l3_len to second cache line

The l2_len and l3_len fields are used for TX offloads and so should be
put on the second cache line, along with the other fields only used on
TX.

The l2 and l3 lengths can be accessed as a single uint16_t for
performance, as well as individually.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agombuf: split mbuf across two cache lines.
Bruce Richardson [Thu, 11 Sep 2014 13:15:44 +0000 (14:15 +0100)]
mbuf: split mbuf across two cache lines.

This change splits the mbuf in two to move the pool and next pointers to
the second cache line. This frees up 16 bytes in first cache line.

The reason for this change is that we believe that there is no possible
way that we can ever fit all the fields we need to fit into a 64-byte
mbuf, and so we need to start looking at a 128-byte mbuf instead. Examples
of new fields that need to fit in, include -
* 32-bits more for filter information for support for the new filters in
  the i40e driver (and possibly other future drivers)
* an additional 2-4 bytes for storing info on a second vlan tag to allow
  drivers to support double Vlan/QinQ
* 4-bytes for storing a sequence number to enable out of order packet
  processing and subsequent packet reordering
as well as potentially a number of other fields or splitting out fields
that are superimposed over each other right now, e.g. for the qos scheduler.
We also want to allow space for use by other non-Intel NIC drivers that may
be open-sourced to dpdk.org in the future too, where they support fields
and offloads that currently supported hardware doesn't.

If we accept the fact of a 2-cache-line mbuf, then the issue becomes
how to rework things so that we spread our fields over the two
cache lines while causing the lowest slow-down possible. The general
approach that we are looking to take is to focus the first cache
line on fields that are updated on RX , so that receive only deals
with one cache line. The second cache line can be used for application
data and information that will only be used on the TX leg. This would
allow us to work on the first cache line in RX as now, and have the
second cache line being prefetched in the background so that it is
available when necessary. Hardware prefetches should help us out
here. We also may move rarely used, or slow-path RX fields e.g. such
as those for chained mbufs with jumbo frames, to the second
cache line, depending upon the performance impact and bytes savings
achieved.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agombuf: add named points inside the structure
Bruce Richardson [Thu, 11 Sep 2014 13:15:42 +0000 (14:15 +0100)]
mbuf: add named points inside the structure

Add markers or "labels" at given points inside the mbuf which can be
used instead of individual fields to identify the start of logical
sections inside the mbuf.

The use of typedefs and dummy fields was chosen over using unions
because of a couple reasons:
* unions cause an extra level of indentation (more likely two levels as
  a union containing a struct for multiple fields would be needed). This
  makes the lines longer than they need to be and increases the need for
  wrapping. [This was the main reason]
* with markers, you can apply multiple markers at the same point if
  wanted.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agombuf: move metadata macros to rte_port library
Bruce Richardson [Thu, 11 Sep 2014 13:15:41 +0000 (14:15 +0100)]
mbuf: move metadata macros to rte_port library

The metadata macros are only used by libs and apps using the rte_port
packet framework library, so move them to a header file there.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agombuf: use macros only to access metadata
Bruce Richardson [Thu, 11 Sep 2014 13:15:40 +0000 (14:15 +0100)]
mbuf: use macros only to access metadata

Removed the explicit zero-sized metadata definition at the end of the
mbuf data structure. Updated the metadata macros to take account of this
change so that all existing code which uses those macros still works.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agombuf: minor changes for readability
Bruce Richardson [Thu, 11 Sep 2014 13:15:39 +0000 (14:15 +0100)]
mbuf: minor changes for readability

* Ensure comments line up correctly
* Simplify the #ifdefs around the refcnt fields to make them clearer

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agombuf: introduce a flag to indicate a control mbuf
Bruce Richardson [Thu, 11 Sep 2014 13:15:38 +0000 (14:15 +0100)]
mbuf: introduce a flag to indicate a control mbuf

Since the flags field is now 64-bits, we can allow one bit to be used to
indicate a control i.e. non-packet mbuf. Dedicate the high bit (bit 63)
for this purpose and add in a utility macro to test if a given mbuf has
the bit set or not.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agombuf: expand ol_flags field to 64-bits
Bruce Richardson [Thu, 11 Sep 2014 13:15:37 +0000 (14:15 +0100)]
mbuf: expand ol_flags field to 64-bits

The offload flags field (ol_flags) was 16-bits and had no further room
for expansion. This patch increases the field size to 64-bits, using up
the remaining reserved space in the single-cache-line mbuf.

NOTE: none of the values for existing flags have been changed, i.e. no
new numbers have been explicitly reserved between existing flag
definitions.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agombuf: reorder fields by time of use
Bruce Richardson [Thu, 11 Sep 2014 13:15:36 +0000 (14:15 +0100)]
mbuf: reorder fields by time of use

*  Reorder the fields in the mbuf so that we have fields that are used
together side-by-side in the structure. This means that we have a
contiguous block of 8-bytes in the mbuf which are used to reset an mbuf
of descriptor rearm, and a block of 16-bytes of data (excluding flags)
which are set on RX from the received packet descriptor.
* Use dummy fields as appropriate to ensure alignment or to reserve gaps
for later field additions.
* Place most items which are not used by fast-path RX separately at the end
of the structure so they can later be moved to a separate cache line.
[The l2/l3 length fields are not moved at this stage as doing so will
cause overflow to the next cache line].

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agombuf: replace data pointer by an offset
Olivier Matz [Thu, 11 Sep 2014 13:15:35 +0000 (14:15 +0100)]
mbuf: replace data pointer by an offset

The mbuf structure already contains a pointer to the beginning of the
buffer (m->buf_addr). It is not needed to use 8 bytes again to store
another pointer to the beginning of the data.

Using a 16 bits unsigned integer is enough as we know that a mbuf is
never longer than 64KB. We gain 6 bytes in the structure thanks to
this modification.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
* Updated to apply to latest on mainline.
* Disabled vector PMD in config as it relies heavily on the mbuf layout
  This will be re-enabled in a subsequent commit once vPMD has been
  reworked to take account of mbuf changes.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agombuf: flatten struct vlan_macip
Bruce Richardson [Tue, 9 Sep 2014 14:40:56 +0000 (15:40 +0100)]
mbuf: flatten struct vlan_macip

The vlan_macip structure combined a vlan tag id with l2 and l3 headers
lengths for tracking offloads. However, this structure was only used as
a unit by the e1000 and ixgbe drivers, not generally.

This patch removes the structure from the mbuf header and places the
fields into the mbuf structure directly at the required point, without
any net effect on the structure layout. This allows us to treat the vlan
tags and header length fields as separate for future mbuf changes. The
drivers which were written to use the combined structure still do so,
using a driver-local definition of it.

Reduce perf regression caused by splitting vlan_macip field. This is
done by providing a single uint16_t value to allow writing/clearing
the l2 and l3 lengths together. There is still a small perf hit to the
slow path TX due to the reads from vlan_tci and l2/l3 lengths being
separated. (<5% in my tests with testpmd with no extra params).
Unfortunately, this cannot be eliminated, without restoring the vlan
tags and l2/l3 lengths as a combined 32-bit field. This would prevent
us from ever looking to move those fields about and is an artificial tie
that applies only for performance in igb and ixgbe drivers. Therefore,
this patch keeps the vlan_tci field separate from the lengths as the
best solution going forward.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agombuf: rename in_port to just port
Bruce Richardson [Thu, 28 Aug 2014 15:42:38 +0000 (16:42 +0100)]
mbuf: rename in_port to just port

In some cases we may want to tag a packet for a particular destination
or output port, so rename the "in_port" field in the mbuf to just "port"
so that it can be re-used for this purpose if an application needs it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agombuf: remove the rte_pktmbuf structure
Olivier Matz [Thu, 28 Aug 2014 15:42:37 +0000 (16:42 +0100)]
mbuf: remove the rte_pktmbuf structure

The rte_pktmbuf structure was initially included in the rte_mbuf
structure. This was needed when there was 2 types of mbuf (ctrl and
packet). As the control mbuf has been removed, we can merge the
rte_pktmbuf into the rte_mbuf structure.

Advantages of doing this:
  - the access to mbuf fields is easier (ex: m->data instead of m->pkt.data)
  - make the structure more consistent: for instance, there was no reason
    to have the ol_flags field in rte_mbuf
  - it will allow a deeper reorganization of the rte_mbuf structure in the
    next commits, allowing to gain several bytes in it

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
[Bruce: updated for latest code and new example apps]
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agombuf: remove rte_ctrlmbuf
Olivier Matz [Thu, 28 Aug 2014 15:42:36 +0000 (16:42 +0100)]
mbuf: remove rte_ctrlmbuf

The initial role of rte_ctrlmbuf is to carry generic messages (data
pointer + data length) but it's not used by the DPDK or it applications.
Keeping it implies:
  - loosing 1 byte in the rte_mbuf structure
  - having some dead code rte_mbuf.[ch]

This patch removes this feature. Thanks to it, it is now possible to
simplify the rte_mbuf structure by merging the rte_pktmbuf structure
in it. This is done in next commit.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
* Updated patch to HEAD.
* Modified patch to retain the old function names for ctrl mbufs as
  macros. This helps with app compatibility, and allows the concept
  of a control mbuf to be reintroduced via a single-bit flag in
  a future change.
* Updated the packet framework ip_pipeline example application to
  work following this change.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>