Commit Graph

8126 Commits

Author SHA1 Message Date
Harish Patil
e82b275b32 net/qede: remove IPv4/IPv6 as valid ntuple flows
Firmware supports ntuple configuration which is always based on 4-tuples.
So remove RTE_ETH_FLOW_FRAG_IPV4 and RTE_ETH_FLOW_FRAG_IPV6 as valid flows.
Also merge the two switch statements into one.

Fixes: 622075356e ("net/qede: support ntuple and flow director filter")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-04-28 14:46:18 +02:00
Harish Patil
a8ebf42f56 net/qede: use new stripped VLAN mbuf flags
Use new mbuf flags PKT_RX_VLAN_STRIPPED and PKT_RX_QINQ_STRIPPED
introduced by the patch:
commit b37b528d95 ("mbuf: add new Rx flags for stripped VLAN")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-04-28 14:46:18 +02:00
Harish Patil
15ccf70af9 net/qede: fix possible uninitialized pointer
This defect is a functional issue where the RX CQE pointer remains
uninitialized in the LRO code path which can cause null pointer exception
while accessing VLAN or RSS hash value from CQE.

Coverity issue: 143474
Fixes: 29540be7ef ("net/qede: support LRO/TSO offloads")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-04-28 14:46:17 +02:00
Harish Patil
680c850f7e net/qede: fix LRO handling
- Add a common routine to handle ETH_RX_CQE_TYPE_TPA_CONT and
ETH_RX_CQE_TYPE_TPA_END.
- Remove enum qede_agg_state since there is no need to maintain
aggregation state.
- Modify the segment chaining logic by tracking head and tail
TPA segments of each aggregation.
- Add more debug and comments.
- Mark the packet as PKT_RX_LRO.

Fixes: 29540be7ef ("net/qede: support LRO/TSO offloads")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-04-28 14:46:17 +02:00
Harish Patil
b3fb8c5ea0 net/qede: fix fastpath rings reset phase
Perform reset of the fastpath RX/TX rings after stopping device port and
not while starting the ports.

Fixes: cfe28a9885 ("net/qede: support unequal number of Rx/Tx queues")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-04-28 14:46:17 +02:00
Harish Patil
49d8b54e86 net/qede: fix default MAC address handling
- In qede_mac_addr_set(), in order to configure default MAC address we
first delete the existing MAC address before trying to add new one. During
init time, there is no MAC filter to begin with, so trying to remove a
non-existing MAC address causes a firmware exception. This can be prevented
by internally calling qede_mac_addr_add() which has the checks in place to
delete a MAC address only if it was added before.

- Remove setting of the default MAC address from within
qede_dev_configure() since rte_eth_dev_start() calls mac_addr_set() anyway.

Fixes: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-04-28 14:46:17 +02:00
Nélio Laranjeiro
870ba73a64 net/mlx5: fix IPv6 flow pattern item
Only masked bits must be set in Verbs specification for a rule to be valid.

Fixes: 2097d0d1e2 ("net/mlx5: support basic flow items and actions")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-28 14:46:17 +02:00
Jingjing Wu
fe2b27c634 net/i40e: fix array bounds
Fix array bounds when set default ptype mapping.

Fixes: 62e94f7f66 ("net/i40e: configure packet type mapping")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-28 14:46:17 +02:00
Beilei Xing
c00f307f85 net/i40e: fix setup when bulk is disabled
Testpmd failed to start when CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
is disabled, the root cause is the length of sw_ring and queue are
incorrect with the above configuration.

Fixes: 0be2953129 ("net/i40e: fix compile error")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-28 14:46:17 +02:00
Andrew Rybchenko
edd69f7c21 net/sfc: fix LSC interrupt support for UIO cases
Recently link status change interrupt was enabled by default in testpmd,
it has opened the driver bug with not working LSC interrupt if either
igb_uio or uio_pci_generic kernel driver is used.

Fixes: 06bc197796 ("net/sfc: interrupts support sufficient for event queue init")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-28 14:46:17 +02:00
Andrew Rybchenko
b69862719e net/sfc: correct estimation of max DMA descriptors required
Previous too pessimistic estimation made completely impossible to send
packets with many segments (more than 100 with minimum Tx ring size).

Fixes: 8b00f426eb ("net/sfc: implement EF10 native Tx datapath")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-28 14:46:17 +02:00
Wei Dai
b826efba6d net/ixgbe: align register setting when RSC is disabled
When Receive Side Coalescing (RSC) is not used, the RSC Disable
(RSC_DIS) filed of register Receive Filter Control Register (RFCTL)
should be set according to ixgbe datasheet.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-28 14:46:17 +02:00
Wei Dai
bfe977683a net/ixgbe/base: update version to 2017.03.29
* Acquire PHY semaphore before device reset
* Add support for 2.5G KX physical layer
* Add MAC X550em/X557 LED on|off support

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-04-28 14:46:17 +02:00
Wei Dai
999566af0a net/ixgbe/base: support MAC X550em/X557 LED on/off
This patch updates ixgbe_led_[on|off]_t_X550em for MAC or PHY connected
LEDs. To support both MAC or PHY connected LEDs, both MAC and PHY led
control registers are configured.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2017-04-28 14:46:17 +02:00
Wei Dai
d53a80024a net/ixgbe/base: support 2.5G KX physical layer
Add another define for the 2.5G KX physical layer. This requires all
variables and support functions that deal with "physical_layer" to be
bumped to u64 as this is the 33rd define.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2017-04-28 14:46:17 +02:00
Wei Dai
c70a162ad4 net/ixgbe/base: acquire PHY semaphore before device reset
A recent firmware change fixed an issue to acquire the PHY semaphore
before accessing PHY registers. This led to a case where SW can issue
a device reset clearing the MDIO registers. This patch makes SW acquire
the PHY semaphore before issuing a device reset.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2017-04-28 14:46:16 +02:00
Gaetan Rivet
b8628a0e5e doc: add LSC and RMV interrupt to testpmd guide
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-05-01 00:35:50 +02:00
Gaetan Rivet
8b062bbdb6 doc: add device removal event to release notes
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-05-01 00:35:50 +02:00
Gaetan Rivet
4a7e01f04b doc: fix missing backquotes in release notes
Fixes: ea85e7d711 ("ethdev: retrieve xstats by ID")

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-05-01 00:32:07 +02:00
Qi Zhang
631c2190d5 doc: correct the hugepage limitation on 32-bit
The hugepage memory limitation of 32 bit application is
"1GB size" but not "1GB per page size".

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-05-01 00:23:13 +02:00
Wenzhuo Lu
9b3fbb051d cmdline: fix parsing
When parsing a CLI, all the CLI instances are checked
one by one. Even if an instance already matches the CLI,
the parsing will not stop for ambiguous check.
The problem is that the following check may change the
parsing result of the previous one even if the following
instance doesn't match.

Use a temporary validate for the parsing result when
trying to match an instance and only store the result
when it matches, so the previous result has no chance
to be changed.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-05-01 00:16:36 +02:00
Adrien Mazarguil
f5b4a9aa02 latency: fix missing includes in exported header
This commit addresses the following errors:

 In file included from build/include/rte_latencystats.h:43:0,
                  from /tmp/check-includes.sh.6580.c:1:
 build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
 [...]
 In file included from /tmp/check-includes.sh.6580.c:1:0:
 build/include/rte_latencystats.h:66:19: error: expected declaration
    specifiers or '...' before '*' token
 [...]

Fixes: 5cd3cac9ed ("latency: added new library for latency stats")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
045f8a3c75 bitrate: fix exported header
This commit addresses the following error:

 In file included from /tmp/check-includes.sh.28023.c:1:0:
 build/include/rte_bitrate.h:82:2: error: unknown type name 'uint8_t'
 [...]

It also adds C++ awareness to rte_bitrate.h.

Fixes: 2ad7ba9a65 ("bitrate: add bitrate statistics library")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
38accc1edf metrics: fix exported header
This commit addresses the following compilation errors:

 In file included from /tmp/check-includes.sh.21060.c:1:0:
 build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
 [...]

It also adds C++ awareness to rte_metrics.h.

Fixes: 349950ddb9 ("metrics: add information metrics library")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
c67ae2bd09 efd: fix missing include in exported header
This commit addresses the following compilation errors:

 In file included from /tmp/check-includes.sh.8373.c:1:0:
 build/include/rte_efd.h:133:9: error: unknown type name 'uint8_t'
 [...]

Fixes: 56b6ef874f ("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
507fb14c2a eventdev: fix headers for strict compilation flags
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:

 In file included from build/include/rte_eventdev_pmd.h:55:0,
                  from /tmp/check-includes.sh.25816.c:1:
 build/include/rte_eventdev.h:908:8: error: struct has no named members
    [-Werror=pedantic]
 [...]
 In file included from /tmp/check-includes.sh.25816.c:1:0:
 build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit named
    variadic macros [-Werror=variadic-macros]
 [...]

Fixes: 71f2384328 ("eventdev: introduce event driven programming model")
Fixes: 4f0804bbdf ("eventdev: implement the northbound APIs")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
f48a55f78e crypto/scheduler: fix missing includes
This commit addresses the following compilation errors:

 In file included from build/include/rte_cryptodev_scheduler.h:37:0,
                  from /tmp/check-includes.sh.5355.c:1:
 build/include/rte_cryptodev_scheduler_operations.h:43:30: error: unknown
    type name 'uint8_t' struct rte_cryptodev *dev, uint8_t slave_id);
 [...]

Fixes: 097ab0bac0 ("crypto/scheduler: add API")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
f8904d5636 vhost: fix header for strict compilation flags
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:

 In file included from /tmp/check-includes.sh.20132.c:1:0:
 build/include/rte_vhost.h:73:30: error: ISO C forbids zero-size array
    'regions' [-Werror=pedantic]
 [...]

Also:

- Add C++ awareness to rte_vhost.h for consistency with rte_eth_vhost.h.
- Move Linux includes into C++ block to prevent linking issues with
  exported symbols.
- Update check-includes.sh following the removal of rte_virtio_net.h.

Finally, update check-includes.sh to ignore rte_vhost.h and rte_eth_vhost.h
from now on since the Linux headers they depend on are not clean enough:

 In file included from /usr/include/linux/vhost.h:17:0,
                  from build/include/rte_vhost.h:43,
                  from build/include/rte_eth_vhost.h:44,
                  from /tmp/check-includes.sh.20132.c:1:
 /usr/include/linux/virtio_ring.h: In function 'vring_init':
 /usr/include/linux/virtio_ring.h:146:16: error: pointer of type 'void *'
    used in arithmetic [-Werror=pointer-arith]
 [...]
 In file included from build/include/rte_vhost.h:43:0,
                  from build/include/rte_eth_vhost.h:44,
                  from /tmp/check-includes.sh.20132.c:1:
 /usr/include/linux/vhost.h: At top level:
 /usr/include/linux/vhost.h:73:3: error: ISO C99 doesn't support unnamed
    structs/unions [-Werror=pedantic]
 [...]

Fixes: eb32247457 ("vhost: export guest memory regions")
Fixes: a798beb47c ("vhost: rename header file")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
80fcb5cad4 net/avp: fix exported headers
This commit addresses several errors related to missing includes such as:

 In file included from /tmp/check-includes.sh.15315.c:1:0:
 build/include/rte_avp_fifo.h:77:22: error: 'struct rte_avp_fifo' declared
    inside parameter list [-Werror]
 [...]
 build/include/rte_avp_fifo.h: In function 'avp_fifo_init':
 build/include/rte_avp_fifo.h:81:3: error: implicit declaration of function
    'rte_panic' [-Werror=implicit-function-declaration]
 [...]
 build/include/rte_avp_fifo.h:83:6: error: dereferencing pointer to
    incomplete type
 [...]
 build/include/rte_avp_fifo.h:109:2: error: implicit declaration of
    function 'rte_wmb' [-Werror=implicit-function-declaration]
 [...]
 In file included from /tmp/check-includes.sh.15315.c:1:0:
 build/include/rte_avp_common.h:104:2: error: unknown type name 'uint64_t'
 [...]
 build/include/rte_avp_common.h:386:15: error: 'ETHER_ADDR_LEN' undeclared
    here (not in a function)
 [...]

It addresses errors with strict compilation flags:

 In file included from /tmp/check-includes.sh.15315.c:1:0:
 build/include/rte_avp_common.h:122:3: error: ISO C99 doesn't support
    unnamed structs/unions [-Werror=pedantic]
 [...]
 build/include/rte_avp_common.h:136:17: error: ISO C forbids zero-size
    array 'buffer' [-Werror=pedantic]
 [...]

And also adds C++ awareness to both header files.

Fixes: 8e680655e2 ("net/avp: add public header files")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
e4840ef268 ethdev: fix incomplete items in flow API
E-Tag and NVGRE pattern items have been added hastily without updating
documentation nor testpmd.

This commit also adds default masks for these items based on the ixgbe
implementation.

Fixes: 99e7003831 ("net/ixgbe: parse L2 tunnel filter")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-05-01 00:13:15 +02:00
Adrien Mazarguil
5ad56ed71f ethdev: fix flow API for C++
This commit addresses the following compilation errors:

 In file included from build/include/rte_flow_driver.h:50:0,
                  from /tmp/check-includes.sh.1397.cc:1:
 build/include/rte_flow.h:428:2: error: expected primary-expression before
    '.' token
 [...]
 build/include/rte_flow.h:469:1: sorry, unimplemented: non-trivial
    designated initializers not supported
 [...]

 In file included from build/include/rte_flow_driver.h:50:0,
                  from /tmp/check-includes.sh.1397.cc:1:
 build/include/rte_flow.h:631:1: error: C99 designator 'label_tc_s' outside
    aggregate initializer
 [...]
 build/include/rte_flow.h:631:1: error: initializer-string for array of
    chars is too long [-fpermissive]
 [...]
 build/include/rte_flow.h:650:1: sorry, unimplemented: non-trivial
    designated initializers not supported
 [...]

C++ does not support the C99-style designated initializers used in this
file for the default item masks. While the resulting symbols are primarily
useful to PMDs (written in C), they are exposed as part of the public API
for documentation purposes and to assist application writers.

Considering that:

- using pre-C99 initialization style for compatibility with C++ would
  render them difficult to understand (all struct members must be
  initialized)
- using both initialization styles would be needlessly verbose
- not exposing them at all would defeat their purpose
- applications do not normally need these symbols at run time

This commit hides these symbols from C++ applications. Specific C++
initializers will be added later if necessary.

Fixes: 6de5c0f130 ("ethdev: define default item masks in flow API")
Fixes: 7cd048321d ("ethdev: add MPLS and GRE flow API items")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2017-05-01 00:10:38 +02:00
Adrien Mazarguil
089a878fd4 net: fix missing include in exported header
This commit addresses the following errors:

 In file included from /tmp/check-includes.sh.18889.c:1:0:
 build/include/rte_net_crc.h:86:1: error: unknown type name 'uint32_t'
 [...]

Fixes: 986ff526fb ("net: add CRC computation API")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2017-05-01 00:10:23 +02:00
Adrien Mazarguil
d53aad67e8 mbuf: fix missing includes in exported header
This commit addresses the following errors:

 In file included from /tmp/check-includes.sh.681.c:1:0:
 build/include/rte_mbuf_ptype.h:587:35: error: unknown type name 'uint32_t'
 [...]
 build/include/rte_mbuf_ptype.h:662:51: error: unknown type name 'size_t'
 [...]

Fixes: 288541c8ff ("mbuf: add functions to dump packet type")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-05-01 00:10:23 +02:00
Adrien Mazarguil
37aa3a47a2 eal: fix debug macro redefinition
The RTE_FUNC_*_RET() and RTE_PROC_*_RET() macro definitions in rte_dev.h
require RTE_PMD_DEBUG_TRACE(). This macro is defined as needed by users of
rte_dev.h since its value depends on their own debug settings.

It may be defined multiple times as a result when including files from
various components simultaneously. Worse, these redefinitions may be
inconsistent. This causes the following compilation errors:

 In file included from /tmp/check-includes.sh.13890.c:27:0:
    build/include/rte_eventdev_pmd.h:58:0: error: "RTE_PMD_DEBUG_TRACE"
    redefined [-Werror]
 [...]
 In file included from build/include/rte_ethdev_pci.h:39:0,
                  from /tmp/check-includes.sh.13890.c:13:
    build/include/rte_ethdev.h:1042:0: note: this is the location of the
    previous definition
 [...]
 In file included from /tmp/check-includes.sh.13890.c:83:0:
    build/include/rte_cryptodev_pmd.h:65:0: error: "RTE_PMD_DEBUG_TRACE"
    redefined [-Werror]
 [...]
 In file included from /tmp/check-includes.sh.13890.c:27:0:
    build/include/rte_eventdev_pmd.h:58:0: note: this is the location of
    the previous definition
 [...]

This commit moves the RTE_PMD_DEBUG_TRACE() definition to rte_dev.h where
it is enabled consistently depending on global configuration settings and
removes redundant definitions.

Also when disabled, RTE_PMD_DEBUG_TRACE() is now defined as (void)0 to
avoid empty statements warnings if used outside { } blocks.

Fixes: b974e4a40c ("ethdev: make error checking macros public")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-05-01 00:10:23 +02:00
Zhihong Wang
1838af3399 config: make AVX and AVX512 configurable
Making AVX and AVX512 configurable is useful for performance and power
testing.

The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.

AVX512 support like in rte_memcpy has been in DPDK since 16.04, but it's
still unproven in rich use cases in hardware. Therefore it's marked as
experimental for now, will enable it after enough field test and possible
optimization.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-30 23:17:53 +02:00
Jerin Jacob
852572d5db config: set cache line as 128B for generic arm64
armv8 implementations may have 64B or 128B cache line.
Setting to the maximum available cache line size in generic config to
address minimum DMA alignment across all arm64 implementations.

Increasing the cacheline size has no negative impact to cache invalidation
on systems with a smaller cache line.

The need for the minimum DMA alignment has impact on functional aspects
of the platform so default config should cater the functional aspects.

There is an impact on memory usage with this scheme, but that's not too
important for the single image arm64 distribution use case.

The arm64 linux kernel followed the similar approach for single
arm64 image use case.
http://lxr.free-electrons.com/source/arch/arm64/include/asm/cache.h

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-04-30 23:06:23 +02:00
Jan Blunck
9a1774b80a mk: fix external builds with relative output dir
In case the output directory (O=) is undefined or a relative directory lets
turn it into an absolute path before passing it on. Otherwise the output
directory is created relative to the subdir, e.g. pktgen/app/build/... and
pktgen/lib/lua/src/build/...

Signed-off-by: Jan Blunck <jblunck@infradead.org>
2017-04-30 22:45:34 +02:00
John Jacques
e8fbb6d9cf mk: use extra cflags when linking with compiler
When using the compiler to link applications, include EXTRA_CFLAGS. This
is needed, for example, when cross-compiling, to pass --sysroot.
GCC cross-compilers built with Yocto don't use the --with-sysroot option,
making it necessary to pass --sysroot command-line option.

Signed-off-by: John Jacques <john.jacques@intel.com>
Signed-off-by: Gage Eads <gage.eads@intel.com>
2017-04-30 21:53:14 +02:00
Bruce Richardson
586ec205bc mbuf: fix 64-bit address alignment in 32-bit builds
On i686 builds, the uin64_t type is 64-bits in size but is aligned to
32-bits only. This causes mbuf fields for rearm_data to not be 16-byte
aligned on 32-bit builds, which causes errors with some vector PMDs which
expect the rearm data to be aligned as on 64-bit.

Given that we cannot use the extra space in the data structures anyway, as
it's already used on 64-bit builds, we can just force alignment of the
physical address in the mbuf to 8-bytes in all cases. This has no effect on
64-bit systems, but fixes the updated PMDs on 32-bit.

Fixes: f4356d7ca1 ("net/i40e: eliminate mbuf write on rearm")
Fixes: f160666a10 ("net/ixgbe: eliminate mbuf write on rearm")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-04-30 21:43:45 +02:00
Alexey Kardashevskiy
e11222c7f4 vfio: fix structures for sPAPR IOMMU
If Linux UAPI headers in the system do not have VFIO_SPAPR_TCE_v2_IOMMU
defined, DPDK define necessary structures itself. However the existing
definitions are different from ones pushed to the mainline kernel.

This copies structures passed via VFIO_IOMMU_SPAPR_TCE_CREATE and
VFIO_IOMMU_SPAPR_TCE_REMOVE ioctls.

No change in behaviour is expected if installed linux UAPI headers
have knowledge of VFIO_SPAPR_TCE_v2_IOMMU.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2017-04-30 19:44:34 +02:00
Alejandro Lucero
a9c349e3a1 vfio: fix device unplug when several devices per group
VFIO allows a secure way of assigning devices to user space and those
devices which can not be isolated from other ones are set in same VFIO
group. Releasing or unplugging a device should be aware of remaining
devices is the same group for avoiding to close such a group.

Fixes: 94c0776b1b ("vfio: support hotplug")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2017-04-30 19:28:13 +02:00
Andrew Rybchenko
1123f89f6a vfio: set IOMMU type for the container once
If more than one used PCI device belongs to one IOMMU group,
it is still one IOMMU group and the container IOMMU type
should be set only once.

Fixes: 94c0776b1b ("vfio: support hotplug")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2017-04-30 19:26:13 +02:00
Alexey Kardashevskiy
7917d5f5ea pci: initialize generic driver pointer
The existing code initializes a PCI driver pointer but not the common one.
As the result, ring_dma_zone_reserve() in drivers/net/bnx2x/bnx2x_rxtx.c
crashed as dev->device->driver==NULL.

This adds missing initialization.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2017-04-30 15:28:01 +02:00
Gowrishankar Muthukrishnan
63985c5f10 usertools: fix CPU layout for more than 2 threads
Current usertools/cpu_layout.py is broken to handle multithreads
of count more than 2 as in IBM powerpc P8 servers.
Below patch addressed this issue.

Also, added minor exception catch on failing to open unavailable
sys file in case of multithread=off configuration in server.

Patch has been verified not to break existing topology configurations
and also not changing anything in current output.

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Reviewed-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
2017-04-30 15:28:01 +02:00
Ferruh Yigit
b153c00bf8 usertools: add --status-dev option to devbind
Script displays status for all device types and output is much
longer than it used to be. This makes harder to read script output.

This patch adds new --status-dev argument to the script to select
a device group to display status.

Supported device groups:
net
crypto
event
mempool

Sample usage:
./usertools/dpdk-devbind.py --status-dev mempool

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-30 15:28:01 +02:00
Guduri Prathyusha
720b7a0582 usertools: fix device binding with kernel tools
The following sequence of operation gives error in binding devices
1) Bind a device using dpdk-devbind.py
2) Unbind the device using kernel tools(/sys/bus/pci/device/driver/unbind)
3) Bind the device using kernel tools(/sys/bus/pci/driver/new_id and
/sys/bus/pci/driver/bind)

The bind failure was due to cached driver name in 'driver_override'.
Fix it by writing 'null' to driver_override just after binding a
device so that any method of binding/unbinding can be used.

Fixes: 2fc3502935 ("usertools: use optimized driver override scheme to bind")

Reported-by: Lijuan A Tu <lijuanx.a.tu@intel.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
2017-04-30 15:28:01 +02:00
Jerin Jacob
aafaea3d3b devtools: add tags and cscope index generation
This script generates cscope, gtags, and tags index files based on
EAL environment(architecture and OS(linux/bsd)).

Selection of the architecture and OS environment is based on dpdk
configuration target(T=).If EAL environment(T=) is not specified,
the script generates tag files based on available source code.

Usage: make tags|cscope|gtags|etags [T=config]

example usage:
make cscope
make tags T=x86_64-native-linuxapp-gcc
make gtags T=arm64-armv8a-linuxapp-gcc

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
2017-04-30 12:57:04 +02:00
Yuanhan Liu
f051679dc5 devtools: list stable commits without fixline
Some commits for stable releases (with Cc stable tag) may not have the
fixline.
Thus, this patch makes git-log-fixes.sh script also list those stable
commits do not have fixline.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-28 12:05:03 +02:00
Ferruh Yigit
eba33e87ad devtools: add git log checks for acronyms
CRC, LSC and VSI must be uppercased.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-25 11:58:07 +02:00
Guduri Prathyusha
80a1858db2 usertools: add mempool PCI functional device
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-25 11:38:41 +02:00