Fixed issue of byte order in ethdev library that the structure
for setting fdir's mask and flow entry is inconsist and made
inputs of mask be in big endian.
Fixes: 2d4c1a9ea2 ("ethdev: add new flow director masks")
Fixes: 76c6f89e80 ("ixgbe: support new flow director masks")
Reported-by: Yaacov Hazan <yaacovh@mellanox.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Zhe Tao <zhe.tao@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Several NICs can handle 512 entries/queues in their RETA table,
an 8 bit field is not large enough for them.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Allow long command lines in testpmd (like flow director with IPv6, ...).
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
removed _VIRTIO_PMD=n from arch config and let arch to use _VIRTIO_PMD
from config/common_linuxapp.
Signed-off-by: Santosh Shukla <sshukla@mvista.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Add RTE_DEVEL_BUILD make-variable which can be used to do things
differently when doing development vs building a release,
autodetected from source root .git presence and overridable via
commandline. It is used it to enable -Werror compiler flag and may
be extended to other checks.
Failing build on warnings is a useful developer tool but its bad
for release tarballs which can and do get built with newer
compilers than what was used/available during development. Compilers
routinely add new warnings so code which built silently with cc X
might no longer do so with X+1. This doesn't make the existing code
any more buggier and failing the build in this case does not help
to improve the quality of an already released version either.
This change the default flags which can be tuned with EXTRA_CFLAGS.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The physically linked-together combined library has been an increasing
source of problems, as was predicted when library and symbol versioning
was introduced. Replace the complex and fragile construction with a
simple linker script which achieves the same without all the problems,
remove the related kludges from eg mlx drivers.
Since creating the linker script is practically zero cost, remove the
config option and just create it always.
Based on a patch by Sergio Gonzales Monroy, linker script approach
initially suggested by Neil Horman.
Suggested-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Suggested-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Fix crc32c hash functions to return a valid crc32c value for
data lengths not multiple of 4 bytes.
ARM code is not tested.
Fixes: af75078fec ("first public release")
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
rte_pktmbuf_alloc_bulk allocates a bulk of packet mbufs.
There is related thread about this bulk API.
http://dpdk.org/dev/patchwork/patch/4718/
Thanks to Konstantin's loop unrolling.
Attached the wiki page about duff's device. It explains the performance
optimization through loop unwinding, and also the most dramatic use of
case label fall-through.
https://en.wikipedia.org/wiki/Duff%27s_device
In this implementation, while() loop is used because we could not assume
count is strictly positive. Using while() loop saves one line of check.
Signed-off-by: Gerald Rogers <gerald.rogers@intel.com>
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
How to reproduce:
1. Start vhost-switch
./examples/vhost/build/vhost-switch -c 0x3 -n 4 -- -p 1 --stat 0
2. Start VM with a virtio port
$ $QEMU -smp cores=2,sockets=1 -m 4G -cpu host -enable-kvm \
-chardev socket,id=char1,path=<path to vhost-user socket> \
-device virtio-net-pci,netdev=vhostuser1 \
-netdev vhost-user,id=vhostuser1,chardev=char1
-object memory-backend-file,id=mem,size=4G,mem-path=<hugetlbfs path>,share=on \
-numa node,memdev=mem -mem-prealloc \
-hda <path to VM img>
3. Start l2fwd in VM
$ ./examples/l2fwd/build/l2fwd -c 0x1 -n 4 -m 1024 -- -p 0x1
4. Use ixia to inject packets in a small data bit rate.
Error:
vhost-switch keeps printing error message:
failed to allocate memory for mbuf.
Root cause:
How many mbufs allocated for a port is calculated by below formula.
NUM_MBUFS_PER_PORT = ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \
(num_switching_cores*MAX_PKT_BURST) + \
(num_switching_cores*RTE_TEST_TX_DESC_DEFAULT) +\
(num_switching_cores*MBUF_CACHE_SIZE))
We suppose num_switching_cores is 1 and MBUF_CACHE_SIZE is 128.
And when initializing port, master core fills mbuf mempool cache,
so there would be some left in that cache, for example 121.
So total mbufs which can be used is:
(MAX_PKT_BURST + MBUF_CACHE_SIZE - 121) = (32 + 128 - 121) = 39.
What makes it worse is that there is a buffer to store mbufs
(which will be tx_burst to physical port), if it occupies some mbufs,
there will be possible < 32 mbufs left, so vhost dequeue prints out
this msg.
In all, it fails to include master core's mbuf mempool cache.
Reported-by: Qian Xu <qian.q.xu@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Fixing the version of the kernel required in the QAT documentation.
Signed-off-by: John Griffin <john.griffin@intel.com>
Acked by: Declan Doherty <declan.doherty@intel.com>
cryptodev_aesni_mb_init was returning the device id of
the device just created, but rte_eal_vdev_init
(the function that calls the first one), was expecting 0 or
negative value.
This made impossible to create more than one aesni_mb device
from command line.
Fixes: 924e84f873 ("aesni_mb: add driver for multi buffer based crypto")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
To claim that we support vhost-user live migration support:
SET_LOG_BASE request will be send only when this feature flag
is set.
Besides this flag, we actually need another feature flag set
to make vhost-user live migration work: VHOST_F_LOG_ALL.
Which, however, has been enabled long time ago.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Pavel Fedin <p.fedin@samsung.com>
Add guest offload setting in vhost lib.
Virtio 1.0 spec (5.1.6.4 Processing of Incoming Packets) says:
1. If the VIRTIO_NET_F_GUEST_CSUM feature was negotiated, the
VIRTIO_NET_HDR_F_NEEDS_CSUM bit in flags can be set: if so,
the packet checksum at offset csum_offset from csum_start
and any preceding checksums have been validated. The checksum
on the packet is incomplete and csum_start and csum_offset
indicate how to calculate it (see Packet Transmission point 1).
2. If the VIRTIO_NET_F_GUEST_TSO4, TSO6 or UFO options were
negotiated, then gso_type MAY be something other than
VIRTIO_NET_HDR_GSO_NONE, and gso_size field indicates the
desired MSS (see Packet Transmission point 2).
In order to support these features, the following changes are added,
1. Extend 'VHOST_SUPPORTED_FEATURES' macro to add the offload features negotiation.
2. Enqueue these offloads: convert some fields in mbuf to the fields in virtio_net_hdr.
There are more explanations for the implementation.
For VM2VM case, there is no need to do checksum, for we think the
data should be reliable enough, and setting VIRTIO_NET_HDR_F_NEEDS_CSUM
at RX side will let the TCP layer to bypass the checksum validation,
so that the RX side could receive the packet in the end.
In terms of us-vhost, at vhost RX side, the offload information is
inherited from mbuf, which is in turn inherited from TX side. If we
can still get those info at RX side, it means the packet is from
another VM at same host. So, it's safe to set the
VIRTIO_NET_HDR_F_NEEDS_CSUM, to skip checksum validation.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Add vhost TX offload (CSUM and TSO) support capabilities in vhost lib.
In order to support these features, and the following changes are added,
1. Extend 'VHOST_SUPPORTED_FEATURES' macro to add the offload features
negotiation.
2. Dequeue TX offload: convert the fileds in virtio_net_hdr to the
related fileds in mbuf.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Updated release documentation to reflect new numbering scheme.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
It was requested by Intel, more than one year ago, to replace the name
"Intel DPDK" by "DPDK".
Some references to the old name were still in some docs and code comments,
leading to confusion.
Fixes: ac8ada004c ("doc: remove Intel references from release notes")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
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>
In order to better compare the drivers and check what is missing
for a common baseline, we need to fill a matrix.
A CSS trick is used to fit the HTML page.
The PDF output needs some LaTeX wizardry.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Add a further ACL example where the elements of the search key
are not entirely fitting into the 4 consecutive bytes of all
input fields.
Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
* remove outdated chapter reference to Multi-process support.
* html output converts "--" to "-", this is wrong when explaining the
command arguments, used fixed width quotes for them.
Fixes: fc1f2750a3 ("doc: programmers guide")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Modern (v1.0) virtio pci device defines several pci capabilities.
Each cap has a configure structure corresponding to it, and the
cap.bar and cap.offset fields tell us where to find it.
Firstly, we map the pci resources by rte_eal_pci_map_device().
We then could easily locate a cfg structure by:
cfg_addr = dev->mem_resources[cap.bar].addr + cap.offset;
Therefore, the entrance of enabling modern (v1.0) pci device support
is to iterate the pci capability lists, and to locate some configs
we care; and they are:
- common cfg
For generic virtio and virtqueue configuration, such as setting/getting
features, enabling a specific queue, and so on.
- nofity cfg
Combining with `queue_notify_off' from common cfg, we could use it to
notify a specific virt queue.
- device cfg
Where virtio_net_config structure is located.
- isr cfg
Where to read isr (interrupt status).
If any of above cap is not found, we fallback to the legacy virtio
handling.
If succeed, hw->vtpci_ops is assigned to modern_ops, where all
operations are implemented by reading/writing a (or few) specific
configuration space from above 4 cfg structures. And that's basically
how this patch works.
Besides those changes, virtio 1.0 introduces a new status field:
FEATURES_OK, which is set after features negotiation is done.
Last, set the VIRTIO_F_VERSION_1 feature flag.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
Reviewed-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Tested-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Huawei Xie <huawei.xie@intel.com>
Fix issue where the navigation levels weren't displayed in the
html sidebar with the new read_the_docs theme.
This was due to the :titlesonly: directive in the high level
index.rst and also due to a stray newline in the parsed version
number.
Reported-by: Matthew Hall <mhall@mhcomputing.net>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Fix missing link in the Linux GSG, accidentally removed
in previous merge:
WARNING: undefined label: linux_gsg_compiling_dpdk
Fixes: 29c673401c ("doc: improve Linux guide layout")
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
In HTML and PDF guides, it is clear in the header that the doc
is related to the DPDK.
So "DPDK" is redundant and can be removed from FAQ and release notes
titles to improve consistency.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Replace "entries" by "queues", it clarifies the case.
Fixes: bd3cea78ab ("doc: announce ABI change for RETA configuration")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Current filtering support will be enhanced to accommodate support
for Chelsio T5 hardware filtering support.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
The faq refers to Linux*, with an asterisk, without any equivalent
note or footnote. This is a legacy from older versions of the docs.
This update removes it.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Remove **Contents** and |Today| from the rst doc index files since
these are already added automatically to PDF files and are of
little value to the Html files where the Contents is shown in a
sidebar.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Fix minor rst doc issues in the contributing/design.rst doc to correct
rendering of notes and code blocks.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This patch updates the release notes to include the changes
made (by me), which were not appropriately documented at the time.
Hence, this patch fixes a number of missing docs,
Fixes: e81a315e5d ("ixgbe: add MAC short packet discard count to Rx errors")
Fixes: 48dd1a82a6 ("ixgbe: remove mac fault counts from Rx errors")
Fixes: 256ff05a9c ("ixgbe: fix Rx errors statistics for UDP checksum")
Also, the CRC byte removal was not added to release notes, so
Fixes: 156c5a8cf9 ("e1000: remove CRC size from byte counters")
Fixes: c03fcee9ab ("ixgbe: remove CRC size from byte counters")
Fixes: 0834d1524d ("i40e: remove CRC size from byte counters")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
test_mp_secondary was initially added by mistake.
rte_snprintf has been removed.
Fixes: 9d41beed24 ("lib: provide initial versioning")
Fixes: 3185322809 ("eal: remove rte_snprintf")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
A rework was prepared by Marc Sune:
http://dpdk.org/ml/archives/dev/2015-October/026037.html
The goal is to retrieve the supported link speed of a device
and to allow 100G devices while having a consistent API.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: Matej Vido <matejvido@gmail.com>
Current buffer size are not enough for a few testpmd commands.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
This patch adds the patch submission cheatsheet to
the contributers guide. Both HTML and PDF docs show
the cheatsheet on its own page.
Right clicking the SVG image in the HTML doc allows
for viewing the image on its own, useful for printing
in high quality.
The exact appearance of of the cheatsheet will depend
on the default monospace font installed.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Add a document to explain the DPDK patch submission and review process.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Add a known issue to warn that PF reset event/request is not
handled by any VF drivers till 2.2, and which should be fixed
in the future.
Reported-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
This patch updates the release notes with the features
added to ip_pipeline application.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Fix typos in sample console commands.
Remove "user@target:~$" prefixes in command lines.
Add --socket-mem 1024 to vhost-switch command lines.
Without the --socket-mem parameter all hugepages will be allocated
to vhost-switch, leaving no memory for the VM.
Add --disable-hw-vlan-filter parameter to testpmd command lines.
Without this parameter testpmd fails on startup in the VM.
Increase value of --sock-mem parameter to testpmd as original
value was too small.
Fixes: d0dff9ba44 ("doc: sample application user guide"
Fixes: 9bc23cb820 ("doc: add vhost-user to sample guide")
Fixes: 43866bf71d ("doc: fix vhost sample parameter")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>