numam-dpdk/lib
Andy Green 3291abb5a2 ethdev: fix type and scope of variables in Rx burst
GCC 8.1 warned:

In function 'rte_eth_rx_burst':
rte_ethdev.h:3836:18: warning: conversion to 'int16_t'
{aka 'short int'} from 'uint16_t' {aka 'short unsigned int'}
may change the sign of the result [-Wsign-conversion]
  int16_t nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
                  ^
rte_ethdev.h:3844:50: warning: conversion to 'uint16_t'
{aka 'short unsigned int'} from 'int16_t' {aka 'short int'}
may change the sign of the result [-Wsign-conversion]
    nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
                                                  ^~~~~
rte_ethdev.h:3844:12: warning: conversion to 'int16_t'
{aka 'short int'} from 'uint16_t' {aka 'short unsigned int'}
may change the sign of the result [-Wsign-conversion]
    nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
            ^~
rte_ethdev.h:3851:9: warning: conversion to 'uint16_t'
{aka 'short unsigned int'} from 'int16_t' {aka 'short int'}
may change the sign of the result [-Wsign-conversion]
  return nb_rx;
         ^~~~~

The second part of the patch is solved by its own basic
block because it is inside a preprocessor conditional.

Bringing the declaration of the var to the top of the
function would require that also being given its own
preprocessor conditional, or a (void)var to avoid an
unused var warning.  The basic block is no worse than
those imho.

Fixes: 467465d86d ("ethdev: add packet count parameter to Rx callback")
Fixes: 4dc294158c ("ethdev: support optional Rx and Tx callbacks")
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
..
librte_acl build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_bbdev bbdev: split queue groups 2018-05-10 17:46:20 +01:00
librte_bitratestats bitratestats: fix library version in meson build 2018-03-28 00:07:35 +02:00
librte_bpf bpf: add missed experimental tags 2018-05-14 17:42:43 +02:00
librte_cfgfile build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_cmdline cmdline: standardize conversion of IP address strings 2018-04-23 21:31:40 +02:00
librte_compat compat: relicense some files 2018-02-06 23:13:47 +01:00
librte_compressdev compressdev: get device id from name 2018-05-10 17:46:20 +01:00
librte_cryptodev lib: clear experimental version tag in linker scripts 2018-05-14 03:37:28 +02:00
librte_distributor build: set compat lib as universal dependency 2018-01-30 21:59:00 +01:00
librte_eal eal: explicit cast in rwlock functions 2018-05-22 16:27:01 +02:00
librte_efd build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_ethdev ethdev: fix type and scope of variables in Rx burst 2018-05-22 16:32:36 +02:00
librte_eventdev eventdev: fix build with clang on ARM 2018-05-21 00:55:50 +02:00
librte_flow_classify flow_classify: remove void pointer cast 2018-03-30 14:08:43 +02:00
librte_gro build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_gso build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_hash hash: explicit casts for truncation in CRC32c 2018-05-13 22:45:37 +02:00
librte_ip_frag ip_frag: fix some debug logs 2018-05-14 21:14:49 +02:00
librte_jobstats build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_kni fix ethdev port id validation 2018-04-18 00:37:05 +02:00
librte_kvargs kvargs: fix syntax in comments 2018-03-28 00:43:22 +02:00
librte_latencystats ethdev: remove experimental flag of ports enumeration 2018-04-27 18:00:24 +01:00
librte_lpm lpm: fix allocation of an existing object 2018-02-01 00:35:06 +01:00
librte_mbuf mbuf: avoid integer promotion in prepend/adj/chain 2018-05-22 16:32:36 +02:00
librte_member build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_mempool mempool: fix virtual address population 2018-05-15 16:30:14 +02:00
librte_meter lib: clear experimental version tag in linker scripts 2018-05-14 03:37:28 +02:00
librte_metrics metrics: fix potential missing string termination 2018-04-04 17:33:08 +02:00
librte_net net: explicit cast in L4 checksum 2018-05-22 16:27:09 +02:00
librte_pci pci: use z specifier to format size_t 2018-04-04 13:43:33 +02:00
librte_pdump pdump: use generic multi-process channel 2018-04-18 01:26:21 +02:00
librte_pipeline lib: clear experimental version tag in linker scripts 2018-05-14 03:37:28 +02:00
librte_port build: remove checks for non-optional libraries 2018-04-17 16:09:43 +02:00
librte_power build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_rawdev rawdev: remove dead code 2018-05-14 01:01:11 +02:00
librte_reorder build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
librte_ring ring: remove signed type flip-flopping 2018-05-21 00:20:16 +02:00
librte_sched lib: clear experimental version tag in linker scripts 2018-05-14 03:37:28 +02:00
librte_security security: extend userdata for IPsec events 2018-04-23 18:20:10 +01:00
librte_table table: add dedicated params struct for cuckoo hash 2018-05-08 16:19:58 +02:00
librte_timer eal: make semantics of lcore role function more intuitive 2018-04-26 16:58:18 +02:00
librte_vhost vhost: improve dirty pages logging performance 2018-05-17 14:19:05 +02:00
Makefile bpf: add BPF loading and execution framework 2018-05-12 00:35:15 +02:00
meson.build build: ensure compatibility with future meson versions 2018-05-08 22:22:02 +02:00