Go to file
Andy Green 9d0b59f84e mbuf: avoid integer promotion in prepend/adj/chain
GCC 8.1 warned:

In function 'rte_pktmbuf_prepend':
rte_mbuf.h:1908:17: warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
  m->data_off -= len;
                 ^~~
m->data_off is a uint16_t

        uint16_t data_off;

len (a uint16_t) is promoted to an int using -=.  Do the
subtraction explicitly and cast the result to uint16_t.

The below += or -= changes are solving the same thing.

In function 'rte_pktmbuf_adj':
rte_mbuf.h:1969:17: warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
  m->data_off += len;
                 ^~~

In function 'rte_pktmbuf_chain':
rte_mbuf.h:2082:19: warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
  head->nb_segs += tail->nb_segs;
                   ^~~~
Also uint16_t

        uint16_t nb_segs;         /**< Number of segments. */

Fixes: 08b563ffb1 ("mbuf: replace data pointer by an offset")
Fixes: 1a60a0daa6 ("mbuf: fix segments number type increase")
Cc: stable@dpdk.org

Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-05-22 16:32:36 +02:00
app app/testpmd: fix burst stats reporting 2018-05-21 17:12:49 +02:00
buildtools buildtools: output build failure reason to stderr 2018-02-08 22:25:37 +01:00
config mempool/bucket: add to meson build 2018-05-21 12:00:09 +02:00
devtools devtools: provide more generic grep in git check 2018-05-14 23:32:23 +02:00
doc doc: add runtime queue setup in release notes 2018-05-17 19:06:29 +02:00
drivers raw/ifpga/base: fix an error return 2018-05-21 16:13:06 +02:00
examples examples/vhost: fix header copy to discontiguous desc buffer 2018-05-14 22:31:03 +01:00
kernel kni: fix possible mbuf leaks and speed up port release 2018-05-13 23:58:20 +02:00
lib mbuf: avoid integer promotion in prepend/adj/chain 2018-05-22 16:32:36 +02:00
license license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
mk bpf: add ability to load eBPF program from ELF object file 2018-05-12 00:35:20 +02:00
pkg version: 18.02.0 2018-02-14 19:11:02 +01:00
test test/eventdev: fix ethdev port id to 16-bit 2018-05-21 01:16:41 +02:00
usertools usertools: add Cavium TIM as an event device 2018-04-16 11:11:06 +02:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add compression driver and ISA-L PMD guides 2018-05-10 17:46:20 +01:00
GNUmakefile move kernel modules directories 2018-03-21 23:04:21 +01:00
MAINTAINERS maintainers: fix responsibility of flow API bits 2018-05-17 19:06:23 +02:00
Makefile license: use SPDX tag in root makefile 2018-01-04 22:41:38 +01:00
meson_options.txt net/mvpp2: add to meson build 2018-04-19 14:10:44 +02:00
meson.build version: 18.05-rc4 2018-05-15 22:38:39 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org