Tetsuya Mukawa [Mon, 21 Mar 2016 05:45:07 +0000 (14:45 +0900)]
ethdev: add queue state change event type
This patch adds a below event type.
- RTE_ETH_EVENT_QUEUE_STATE
This event will occur when some queues are enabled or disabled.
So far, only vhost PMD supports the event, and it indicates some queues
are enabled or disabled by virtio-net device. Such an event is needed
because virtio-net device may not enable all queues vhost PMD prepare.
Because only vhost PMD uses the event so far, it isn't an actual hardware
interrupt but a simple software event.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Rich Lane <rich.lane@bigswitch.com> Tested-by: Rich Lane <rich.lane@bigswitch.com>
Minor modification to event name and comment: Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Jan Medala [Thu, 17 Mar 2016 14:31:18 +0000 (15:31 +0100)]
ena: add polling-mode driver
This is a PMD for the Amazon ethernet ENA (Elastic Network Adapters)
family.
The driver operates variety of ENA adapters through feature negotiation
with the adapter and upgradable commands set.
ENA driver handles PCI Physical and Virtual ENA functions.
Signed-off-by: Evgeny Schemeilin <evgenys@amazon.com> Signed-off-by: Jan Medala <jan@semihalf.com> Signed-off-by: Jakub Palider <jpa@semihalf.com>
Release Note addition: Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Jianfeng Tan [Mon, 14 Mar 2016 20:50:50 +0000 (04:50 +0800)]
ethdev: query supported packet types
Add a new API rte_eth_dev_get_supported_ptypes to query what packet types
can be filled by a given device. The device should be already started or
its PMD RX burst function already decided, since the packet types supported
may vary depending on RX function.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
flake8 checks were run for both python 2.7 and 3.4
There were some style issues as:
- Line width > 79
- No double blank line before function definition
- No double blank space before inline comment
- Some other minor issues
Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it> Acked-by: John McNamara <john.mcnamara@intel.com>
Pablo de Lara [Tue, 22 Mar 2016 21:24:01 +0000 (21:24 +0000)]
examples/l2fwd-crypto: add NULL algorithms
NULL crypto operation is now supported, but l2fwd-crypto
was missing an update on the list of supported algorithms
that can be passed from command line.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Tue, 22 Mar 2016 21:24:00 +0000 (21:24 +0000)]
examples/l2fwd-crypto: add AES-GCM algorithm
AES GCM is an algorithm for both ciphering and authentication,
but the authentication algorithm was missing in the
list of supported algorithms that can be passed from command line.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Thu, 24 Mar 2016 13:39:45 +0000 (13:39 +0000)]
examples/l2fwd-crypto: fix command line help
Previous cdev parameter was changed to cdev_type,
to select a crypto device type preference (HW/SW/ANY),
instead of the device itself (QAT/AESNI...).
Also deleted cdev duplicated parameter from the help.
Fixes: 27cf2d1b18e1 ("examples/l2fwd-crypto: discover capabilities") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Jan Viktorin [Sat, 19 Mar 2016 19:58:04 +0000 (20:58 +0100)]
eal/arm: disable NEON for 32-bit memcpy
The new flag CONFIG_RTE_ARCH_ARM_NEON_MEMCPY is used to enable memcpy
optimizations in EAL.
As it is not always the performance benefit, the feature is disabled.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Sat, 19 Mar 2016 19:58:02 +0000 (20:58 +0100)]
config: remove ARM NEON option
ARMv7 machines have usually the NEON available.
Customization of the -mfpu=neon must be done by hand or by defining
another machine rte.vars.mk.
So, the CONFIG_RTE_ARCH_ARM_NEON is useless (and confusing).
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Normal usage of rte_eth_dev_xstats_get is to call twice. The
first time the function is called with portid, xstats = NULL
and n = 0; this returns the number of entries in the statistics
table that need to be allocated.
The problem is that the routine adds a count value to NULL (0)
and assumes that this is a valid pointer (it isn't). Device drivers
all have a check for NULL, and this no longer matches.
Fixes: d4fef8b0d5e5 ("ethdev: expose generic and driver specific stats in xstats") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Markos Chandras [Tue, 22 Mar 2016 17:13:36 +0000 (17:13 +0000)]
mk: fix gcc-5 version on Suse
In openSUSE Tumbleweed (and in any other SUSE distribution which
uses (or will use) gcc >= 5), gcc -dumpversion returns '5'. This is on
purpose as discussed in https://bugzilla.opensuse.org/show_bug.cgi?id=941428
As a result of which, the gcc-4.x comparison (40 against 5) does not
work leading to tons of warnings and failures during build.
This patch aims to change the way the gcc version is obtained by using
the gcc macros directly.
This is similar to what's being used in the Linux kernel. Querying the
GCC macros directly gives more accurate results compared to -dumpversion
which could vary across distributions.
Signed-off-by: Markos Chandras <mchandras@suse.de> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Daniel Mrzyglod [Tue, 22 Mar 2016 12:51:02 +0000 (13:51 +0100)]
mk: fix missing librt dependencies
For GLIBC < 2.17 it is necessery to add -lrt for linker
from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
available directly in the main C library. This affect Ubuntu 12.04 in i686
and other older Linux Distros).
Panu Matilainen [Mon, 21 Mar 2016 11:33:58 +0000 (13:33 +0200)]
mk: fix missing libm dependencies
Commit e86a699cf6b1 missed two further libm dependencies: ceil() used
by librte_meter is typically inlined so the missing dependency does not
actually cause failures, and librte_pmd_nfp is not built by default
so its easy to miss.
This causes duplicates in LDLIBS in many configurations so its vital
they are removed before passing to linker.
Panu Matilainen [Mon, 21 Mar 2016 11:33:57 +0000 (13:33 +0200)]
mk: eliminate duplicates from libraries list
Duplicates in LDLIBS can cause link failures from multiply defined
symbols, ensure all libraries are only mentioned once. Can't use
sorting for duplicate elimination as order is critical so awk one-liner
is used.
Thomas Monjalon [Mon, 21 Mar 2016 20:12:55 +0000 (21:12 +0100)]
mk: restrict CPU flags list
When compiling each file, the CPU flags are given as RTE_MACHINE_CPUFLAG_*
and in the list RTE_COMPILE_TIME_CPUFLAGS.
RTE_MACHINE_CPUFLAG_* are used to check the CPU features when compiling.
The list RTE_COMPILE_TIME_CPUFLAGS is used only to check the CPU at
runtime in the function rte_cpu_check_supported(). So it is not needed to
define this list for every files.
That's why RTE_COMPILE_TIME_CPUFLAGS is removed from the common variable
MACHINE_CFLAGS and is added only to the CFLAGS of eal_common_cpuflags.c.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Wed, 3 Feb 2016 18:56:38 +0000 (19:56 +0100)]
examples/performance-thread: fix build without SSE4.1
clang reports these errors:
error: too many arguments to function call, expected 2, have 3
examples/performance-thread/l3fwd-thread/main.c:1220:1: note:
'l3fwd_simple_forward' declared here
examples/l3fwd/main.c:550:1: error: unused function 'send_packetsx4'
The function is used only when ENABLE_MULTI_BUFFER_OPTIMIZE is 1.
Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app") Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
ring: fix deadlock in zero object multi enqueue or dequeue
Issuing a zero objects dequeue with a single consumer has no effect.
Doing so with multiple consumers, can get more than one thread to succeed
the compare-and-set operation and observe starvation or even deadlock in
the while loop that checks for preceding dequeues. The problematic piece
of code when n = 0:
In certain autotests lpm->max_rules turned out to be non initialized.
That was caused by a failing allocation for lpm->rules_tbl in rte_lpm6_create.
It then left the function via goto exit with lpm freed, but still a pointer
value being set.
In case of an allocation failure it resets lpm to NULL now, to avoid the
upper layers operate on that already freed memory.
Along that is also makes the RTE_LOG message of the failed allocation unique.
Fixes: 5c510e13a9cb ("lpm: add IPv6 support") Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Olivier Matz <olivier.matz@6wind.com>
lpm6 autotests failed with the default alloc of 512M Memory.
While >=2500M was a workaround it became clear while debugging that it
had a leak.
One could see a lot of output like:
LPM Test tests6[i]: FAIL
LPM: LPM memory allocation failed
It turned out that in rte_lpm6_free
- lpm might not be freed if it didn't find a te (early return)
- lpm->rules_tbl was not freed ever
Fixes: 899d8bc9b3b5 ("lpm: make tailq fully local") Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
There were further chances for a use after free by returning an already
freed pointer in rte_lpm_create for v20 and v1604.
Along that is also makes the RTE_LOG messages of the failed allocations
unique.
Fixes: f1f7261838b3 ("lpm: add a new config structure for IPv4") Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
In rte_lpm_free lpm might not be freed if it didn't find a te (early return)
The two lpm interfaces rte_lpm_free_v20 and rte_lpm_free_v1604 had a leak.
rte_lpm_free_v20 might have missed to free rules_tbl
rte_lpm_free_v1604 due to an early exit might have missed to free
rules_tbl and lpm itself.
Fixes: 899d8bc9b3b5 ("lpm: make tailq fully local") Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Igor Ryzhov [Thu, 10 Mar 2016 13:03:30 +0000 (16:03 +0300)]
ethdev: remove missed packets from error counter
Comment for "ierrors" counter says that it counts erroneous received
packets. But for some reason "imissed" counter is added to "ierrors"
counter in most drivers.
It is a mistake, because missed packets are obviously not received.
This patch fixes it.
Fixes: 70bdb18657da ("ethdev: add Rx error counters for missed, badcrc and badlen packets") Fixes: 6bfe648406b5 ("i40e: add Rx error statistics") Fixes: 856505d303f4 ("cxgbe: add port statistics") Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
examples/l2fwd-cat: add sample application for PQoS CAT and CDP
This patch implements PQoS as a sample application.
PQoS allows management of the CPUs last level cache,
which can be useful for DPDK to ensure quality of service.
The sample app links against the existing 01.org PQoS library
(https://github.com/01org/intel-cmt-cat).
White paper demonstrating example use case "Increasing Platform Determinism
with Platform Quality of Service for the Data Plane Development Kit"
(http://www.intel.com/content/www/us/en/communications/increasing-platform-determinism-pqos-dpdk-white-paper.html)
Signed-off-by: Wojciech Andralojc <wojciechx.andralojc@intel.com> Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com> Signed-off-by: Marcel D Cornu <marcel.d.cornu@intel.com>
Tomasz Kulasek [Fri, 18 Mar 2016 13:31:46 +0000 (14:31 +0100)]
examples/l3fwd: fix exact match performance
It seems that for the most use cases, previous hash_multi_lookup provides
better performance, and more, sequential lookup can cause significant
performance drop.
This patch sets previously optional hash_multi_lookup method as default.
It also provides some minor optimizations such as queue drain only on used
tx ports.
Fixes: 94c54b4158d5 ("examples/l3fwd: rework exact-match") Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field") Fixes: 64d3955de1de ("examples/l3fwd: fix ARM build") Reported-by: Qian Xu <qian.q.xu@intel.com> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Maciej Czekaj [Wed, 16 Mar 2016 06:23:24 +0000 (07:23 +0100)]
examples/l3fwd: fix build with hash multi-lookup
l3fwd does not compile with HASH_MULTI_LOOKUP.
2 issues:
* in 64d395 mask0 changed type from xmm_t to rte_xmm_t
-> use x field from rte_xmm_t
* in dc81eb dst_port parameter changed to uint32_t
-> change uint16_t dst_port to uin32_t dsp_port
Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field") Fixes: 64d3955de1de ("examples/l3fwd: fix ARM build") Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Updated ip_pipeline app is using new changes from LPM library
(Increased number of next hops and added new config structure
for LPM IPv4).
Fixes: f1f7261838b3 ("lpm: add a new config structure for IPv4") Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
David Marchand [Tue, 15 Mar 2016 06:29:12 +0000 (07:29 +0100)]
pci: align ioport special case for x86 in read/write/unmap
Commit b8eb345378bd ("pci: ignore devices already managed in Linux when
mapping x86 ioport") did not update other parts of the ioport api.
The application is not supposed to call these read/write/unmap ioport
functions if map call failed but I prefer aligning the code for the sake
of consistency.
Signed-off-by: David Marchand <david.marchand@6wind.com>
If a bonded device is created when there are no slave devices
there is a loop in bond_ethdev_promiscuous_enable() which results
in a segmentation fault.
The solution is to initialise the current_primary_port to an
invalid port value when the bonded port is created.
Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Eric Kinzie [Tue, 1 Mar 2016 17:32:02 +0000 (09:32 -0800)]
bonding: do not activate slave twice
The current code for detecting link during slave addition can cause a
slave interface to be activated twice -- once during slave_configure()
and again at the end of __eth_bond_slave_add_lock_free(). This will
either cause the active slave count to be incorrect or will cause the
802.3ad activation function to panic. Ensure that the interface is not
activated more than once.
Fixes: 46fb43683679 ("bond: add mode 4") Signed-off-by: Eric Kinzie <ekinzie@brocade.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Declan Doherty <declan.doherty@intel.com>
Eric Kinzie [Tue, 1 Mar 2016 17:32:01 +0000 (09:32 -0800)]
bonding: fix active slaves with no primary
If the link state of a slave is "up" when added, it is added to the list
of active slaves but, even if it is the only slave, is not selected as
the primary interface. Generally, handling of link state interrupts
selects an interface to be primary, but only if the active count is zero.
This change avoids the situation where there are active slaves but
no primary.
Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Eric Kinzie <ekinzie@brocade.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Declan Doherty <declan.doherty@intel.com>
Eric Kinzie [Tue, 1 Mar 2016 17:32:00 +0000 (09:32 -0800)]
bonding: do not ignore multicast in mode 4
The bonding PMD in mode 4 puts all enslaved interfaces into promiscuous
mode in order to receive LACPDUs and must filter unwanted packets
after the traffic has been "collected". Allow broadcast and multicast
through so that ARP and IPv6 neighbor discovery continue to work.
Fixes: 46fb43683679 ("bond: add mode 4") Signed-off-by: Eric Kinzie <ekinzie@brocade.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Declan Doherty <declan.doherty@intel.com>
Eric Kinzie [Tue, 1 Mar 2016 17:31:59 +0000 (09:31 -0800)]
bonding: copy entire config structure in mode 4
Copy all needed fields from the mode8023ad_private structure in
bond_mode_8023ad_conf_get(). This help ensure that a subsequent call
to rte_eth_bond_8023ad_setup() is not passed uninitialized data that
would result in either incorrect behavior or a failed sanity check.
Fixes: 46fb43683679 ("bond: add mode 4") Signed-off-by: Eric Kinzie <ekinzie@brocade.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Declan Doherty <declan.doherty@intel.com>
Ensure that a bonded slave device is not detached,
until it is removed from the bonded device.
Fixes: 2efb58cbab6e ("bond: new link bonding library") Fixes: a45b288ef21a ("bond: support link status polling") Fixes: 494adb7f63f2 ("ethdev: add device fields from PCI layer") Fixes: b1fb53a39d88 ("ethdev: remove some PCI specific handling") Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
Check that the bonded device has no slaves before detaching it.
Fixes: 8d30fe7fa737 ("bonding: support port hotplug") Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
When a device is created with "CREATE" as action, new rings are
allocated for it, then it is a good practice to free them when the
rte_ethdev_dettach method is invoked by the application.
Rings are not freeded when "ATTACH" is used or when the device is
created by means of the rte_eth_from_rings function.
Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Ferruh Yigit [Fri, 26 Feb 2016 16:58:08 +0000 (16:58 +0000)]
ring: clean up driver
Rename nb_rx/tx_queues fields in internals struct to max_rx/tx_queues
Updated fields required to keep max queue numbers configured. For current
queue number requirements data->nb_rx/tx_queues fields used.
Some checkpatch corrections and code clenaup.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Wojciech Zmuda [Wed, 2 Mar 2016 11:55:41 +0000 (12:55 +0100)]
af_packet: make the device detachable
Allow dynamic deallocation of af_packet device through proper
API functions. To achieve this:
* set device flag to RTE_ETH_DEV_DETACHABLE
* implement rte_pmd_af_packet_devuninit() and expose it
through rte_driver.uninit()
* copy device name to ethdev->data to make discoverable with
rte_eth_dev_allocated()
Moreover, make af_packet init function static, as there is no
reason to keep it public.
Signed-off-by: Wojciech Zmuda <woz@semihalf.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
During an MTU change, the adapter is restarted. If hardware VLAN offload
is in use, this existing filter table would also be cleared. Instead,
setup the shadow table once during device initialization and just update
during restart.
vmxnet3_dev_vlan_offload_set(dev, mask) was incorrectly treating the
mask parameter as the bitmask for vlan_strip and vlan_filter, whereas
the mask indicates only what has changed - the values for
vlan_stripping and vlan_filter needs to be taken from dev_conf.rxmode.
Fixes: f003fc383487 ("vmxnet3: enable vlan filtering") Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com> Signed-off-by: Nachiketa Prachanda <nprachan@brocade.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Remy Horton <remy.horton@intel.com>
Add support for linking multi-segment buffers together to
handle Jumbo packets. The vmxnet3 API supports having header
and body buffer types. What this patch does is fill the primary
ring completely with header buffers and the secondary ring
with body buffers. This allows for non-jumbo frames to only
use one mbuf (from primary ring); and jumbo frames will have
first mbuf from primary ring and following mbufs from other
ring.
This could be optimized in future if the DPDK had API
to supply different sized mbufs (two pools) into driver.
Signed-off-by: Stephen Hemminger <shemming@brocade.com> Acked-by: Remy Horton <remy.horton@intel.com>
Release note addition: Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Yong Wang [Wed, 13 Jan 2016 02:08:36 +0000 (18:08 -0800)]
vmxnet3: support TSO
This commit adds vmxnet3 TSO support.
Verified with test-pmd (set fwd csum) that both tso and
non-tso pkts can be successfully transmitted and all
segmentes for a tso pkt are correct on the receiver side.
Signed-off-by: Yong Wang <yongwang@vmware.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Yong Wang [Wed, 13 Jan 2016 02:08:33 +0000 (18:08 -0800)]
vmxnet3: restore Tx data ring support
Tx data ring support was removed in a previous change that
added multi-seg transmit. This change adds it back.
According to the original commit (2e849373), 64B pkt
rate with l2fwd improved by ~20% on an Ivy Bridge
server at which point we start to hit some bottleneck
on the rx side.
I also re-did the same test on a different setup (Haswell
processor, ~2.3GHz clock rate) on top of the master
and still observed ~17% performance gains.
Fixes: 7ba5de417e3c ("vmxnet3: support multi-segment transmit") Signed-off-by: Yong Wang <yongwang@vmware.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Virtio supports a feature that allows sender to put transmit
header prepended to data. It requires that the mbuf be writeable, correct
alignment, and the feature has been negotiatied. If all this works out,
then it will be the optimum way to transmit a single segment packet.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Huawei Xie <huawei.xie@intel.com>
The virtio ring in QEMU/KVM is usually limited to 256 entries
and the normal way that virtio driver was queuing mbufs required
nsegs + 1 ring elements. By using the indirect ring element feature
if available, each packet will take only one ring slot even for
multi-segment packets.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Huawei Xie <huawei.xie@intel.com>
Igor Ryzhov [Fri, 26 Feb 2016 15:01:23 +0000 (18:01 +0300)]
virtio: remove broadcast packets from multicast statistics
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Applied with coding standards fixes: Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Huawei Xie [Thu, 10 Dec 2015 16:07:32 +0000 (00:07 +0800)]
virtio: fix descriptors pointing to the same buffer
The virtio_net_hdr desc all pointed to the same buffer. It doesn't cause
issue because in the simple TX mode we don't use the header. This patch
makes the header desc point to different buffer.
Fixes: b4ae9c505f2e ("virtio: optimize ring layout") Signed-off-by: Huawei Xie <huawei.xie@intel.com> Acked-by: Jianfeng Tan <jianfeng.tan@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
This initialisation of nb_rx_queues and nb_tx_queues has been removed
from eth_virtio_dev_init.
The nb_rx_queues and nb_tx_queues were being initialised in
eth_virtio_dev_init before the tx_queues and rx_queues arrays were
allocated.
The arrays are allocated when the ethdev port is configured and the
nb_tx_queues and nb_rx_queues are initialised.
If any of the following functions were called before the ethdev
port was configured there was a segmentation fault because
rx_queues and tx_queues were NULL:
Fixes: 823ad647950a ("virtio: support multiple queues") Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Jianfeng Tan [Mon, 11 Jan 2016 06:16:13 +0000 (14:16 +0800)]
virtio: fix restart
Fix the issue that virtio device cannot be started after stopped.
The field, hw->started, should be changed by virtio_dev_start/stop instead
of virtio_dev_close.
Fixes: a85786dc816f ("virtio: fix states handling during initialization") Reported-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Tested-by: Pavel Fedin <p.fedin@samsung.com>
Matej Vido [Thu, 28 Jan 2016 22:23:47 +0000 (23:23 +0100)]
szedata2: support link state operations
Mmap PCI resource file and add inline functions for reading from and
writing to PCI resource address space.
Add description of IBUF and OBUF address space.
Add configuration option for setting which firmware type will be used.
Right address space values for IBUFs and OBUFs offsets are used
according to configuration option CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS.
Setting link up/down and getting info about link status is done through
mmapped PCI resource address space.
Matej Vido [Thu, 28 Jan 2016 22:23:46 +0000 (23:23 +0100)]
szedata2: change to physical device type
PMD was of type PMD_VDEV which means that PCI device is not recognised
automatically during EAL initialization, but it has to be created by
EAL option --vdev.
Now, PMD is of type PMD_PDEV which means that PCI device is probed
and recognised during EAL initialization automatically.
Path to szedata2 device file is matched with device and the count
of available RX and TX DMA channels is found out during device
initialization.
Initialization, starting and stopping of queues is changed to better
correspond with Ethernet device API model. Function callbacks
(rx|tx)_queue_(start|stop) are added. Unnecessary items are removed
from ethernet device private data structure.
Thomas Monjalon [Sat, 6 Feb 2016 21:51:16 +0000 (22:51 +0100)]
nfp: fix non-x86 build
The file sys/io.h was included but it can be unavailable in some
non-x86 toolchains.
As others system includes in the file nfp_net.c, it seems useless,
so the easy fix is to remove them.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>