diff options
author | 2018-11-01 11:59:50 +0000 | |
---|---|---|
committer | 2018-11-01 12:00:19 +0000 | |
commit | 8d01b9cd70a67cdafd5b965a70420c3bd7fb3f82 (patch) | |
tree | 208e3bc33c220854d89d010e3abf720a2e62e546 /drivers/net/fm10k | |
parent | b63264c8342e6a1b6971c79550d2af2024b6a4de (diff) |
New upstream version 18.11-rc1upstream/18.11-rc1
Change-Id: Iaa71986dd6332e878d8f4bf493101b2bbc6313bb
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/fm10k')
-rw-r--r-- | drivers/net/fm10k/base/meson.build | 3 | ||||
-rw-r--r-- | drivers/net/fm10k/fm10k_ethdev.c | 45 |
2 files changed, 20 insertions, 28 deletions
diff --git a/drivers/net/fm10k/base/meson.build b/drivers/net/fm10k/base/meson.build index a8fc5fa8..5525cdc8 100644 --- a/drivers/net/fm10k/base/meson.build +++ b/drivers/net/fm10k/base/meson.build @@ -15,6 +15,9 @@ error_cflags = ['-Wno-unused-parameter', '-Wno-unused-value', '-Wno-unused-variable', '-Wno-missing-field-initializers' ] c_args = cflags +if allow_experimental_apis + c_args += '-DALLOW_EXPERIMENTAL_API' +endif foreach flag: error_cflags if cc.has_argument(flag) c_args += flag diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 541a49b7..c852022d 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -72,7 +72,7 @@ struct fm10k_xstats_name_off { unsigned offset; }; -struct fm10k_xstats_name_off fm10k_hw_stats_strings[] = { +static const struct fm10k_xstats_name_off fm10k_hw_stats_strings[] = { {"completion_timeout_count", offsetof(struct fm10k_hw_stats, timeout)}, {"unsupported_requests_count", offsetof(struct fm10k_hw_stats, ur)}, {"completer_abort_count", offsetof(struct fm10k_hw_stats, ca)}, @@ -87,7 +87,7 @@ struct fm10k_xstats_name_off fm10k_hw_stats_strings[] = { #define FM10K_NB_HW_XSTATS (sizeof(fm10k_hw_stats_strings) / \ sizeof(fm10k_hw_stats_strings[0])) -struct fm10k_xstats_name_off fm10k_hw_stats_rx_q_strings[] = { +static const struct fm10k_xstats_name_off fm10k_hw_stats_rx_q_strings[] = { {"packets", offsetof(struct fm10k_hw_stats_q, rx_packets)}, {"bytes", offsetof(struct fm10k_hw_stats_q, rx_bytes)}, {"dropped", offsetof(struct fm10k_hw_stats_q, rx_drops)}, @@ -96,7 +96,7 @@ struct fm10k_xstats_name_off fm10k_hw_stats_rx_q_strings[] = { #define FM10K_NB_RX_Q_XSTATS (sizeof(fm10k_hw_stats_rx_q_strings) / \ sizeof(fm10k_hw_stats_rx_q_strings[0])) -struct fm10k_xstats_name_off fm10k_hw_stats_tx_q_strings[] = { +static const struct fm10k_xstats_name_off fm10k_hw_stats_tx_q_strings[] = { {"packets", offsetof(struct fm10k_hw_stats_q, tx_packets)}, {"bytes", offsetof(struct fm10k_hw_stats_q, tx_bytes)}, }; @@ -129,13 +129,13 @@ fm10k_mbx_unlock(struct fm10k_hw *hw) } /* Stubs needed for linkage when vPMD is disabled */ -int __attribute__((weak)) +__rte_weak int fm10k_rx_vec_condition_check(__rte_unused struct rte_eth_dev *dev) { return -1; } -uint16_t __attribute__((weak)) +__rte_weak uint16_t fm10k_recv_pkts_vec( __rte_unused void *rx_queue, __rte_unused struct rte_mbuf **rx_pkts, @@ -144,7 +144,7 @@ fm10k_recv_pkts_vec( return 0; } -uint16_t __attribute__((weak)) +__rte_weak uint16_t fm10k_recv_scattered_pkts_vec( __rte_unused void *rx_queue, __rte_unused struct rte_mbuf **rx_pkts, @@ -153,33 +153,33 @@ fm10k_recv_scattered_pkts_vec( return 0; } -int __attribute__((weak)) +__rte_weak int fm10k_rxq_vec_setup(__rte_unused struct fm10k_rx_queue *rxq) { return -1; } -void __attribute__((weak)) +__rte_weak void fm10k_rx_queue_release_mbufs_vec( __rte_unused struct fm10k_rx_queue *rxq) { return; } -void __attribute__((weak)) +__rte_weak void fm10k_txq_vec_setup(__rte_unused struct fm10k_tx_queue *txq) { return; } -int __attribute__((weak)) +__rte_weak int fm10k_tx_vec_condition_check(__rte_unused struct fm10k_tx_queue *txq) { return -1; } -uint16_t __attribute__((weak)) +__rte_weak uint16_t fm10k_xmit_fixed_burst_vec(__rte_unused void *tx_queue, __rte_unused struct rte_mbuf **tx_pkts, __rte_unused uint16_t nb_pkts) @@ -451,12 +451,6 @@ fm10k_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - /* KEEP_CRC offload flag is not supported by PMD - * can remove the below block when DEV_RX_OFFLOAD_CRC_STRIP removed - */ - if (rte_eth_dev_must_keep_crc(dev->data->dev_conf.rxmode.offloads)) - PMD_INIT_LOG(WARNING, "fm10k always strip CRC"); - /* multipe queue mode checking */ ret = fm10k_check_mq_mode(dev); if (ret != 0) { @@ -1325,7 +1319,7 @@ fm10k_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, static int fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) { - uint64_t ipackets, opackets, ibytes, obytes; + uint64_t ipackets, opackets, ibytes, obytes, imissed; struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct fm10k_hw_stats *hw_stats = @@ -1336,22 +1330,25 @@ fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) fm10k_update_hw_stats(hw, hw_stats); - ipackets = opackets = ibytes = obytes = 0; + ipackets = opackets = ibytes = obytes = imissed = 0; for (i = 0; (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) && (i < hw->mac.max_queues); ++i) { stats->q_ipackets[i] = hw_stats->q[i].rx_packets.count; stats->q_opackets[i] = hw_stats->q[i].tx_packets.count; stats->q_ibytes[i] = hw_stats->q[i].rx_bytes.count; stats->q_obytes[i] = hw_stats->q[i].tx_bytes.count; + stats->q_errors[i] = hw_stats->q[i].rx_drops.count; ipackets += stats->q_ipackets[i]; opackets += stats->q_opackets[i]; ibytes += stats->q_ibytes[i]; obytes += stats->q_obytes[i]; + imissed += stats->q_errors[i]; } stats->ipackets = ipackets; stats->opackets = opackets; stats->ibytes = ibytes; stats->obytes = obytes; + stats->imissed = imissed; return 0; } @@ -1796,7 +1793,6 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev) DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_JUMBO_FRAME | - DEV_RX_OFFLOAD_CRC_STRIP | DEV_RX_OFFLOAD_HEADER_SPLIT); } @@ -1982,6 +1978,7 @@ static uint64_t fm10k_get_tx_port_offloads_capa(struct rte_eth_dev *dev) RTE_SET_USED(dev); return (uint64_t)(DEV_TX_OFFLOAD_VLAN_INSERT | + DEV_TX_OFFLOAD_MULTI_SEGS | DEV_TX_OFFLOAD_IPV4_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM | DEV_TX_OFFLOAD_TCP_CKSUM | @@ -3237,14 +3234,6 @@ eth_fm10k_dev_uninit(struct rte_eth_dev *dev) fm10k_dev_interrupt_handler_vf, (void *)dev); } - /* free mac memory */ - if (dev->data->mac_addrs) { - rte_free(dev->data->mac_addrs); - dev->data->mac_addrs = NULL; - } - - memset(hw, 0, sizeof(*hw)); - return 0; } |