From: Adrien Mazarguil Date: Fri, 1 Sep 2017 08:06:21 +0000 (+0200) Subject: net/mlx4: remove useless code X-Git-Tag: spdx-start~2050 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=863f34f710d49e1a5e134214f86bea094fa8d34d;p=dpdk.git net/mlx4: remove useless code Less code makes refactoring easier. No impact on functionality. Signed-off-by: Adrien Mazarguil --- diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 6f8d3281f7..cb07a53e9b 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -69,13 +69,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include /* Generated configuration header. */ #include "mlx4_autoconf.h" @@ -4649,10 +4649,6 @@ mlx4_link_update(struct rte_eth_dev *dev, int wait_to_complete) return -1; } -static int -mlx4_ibv_device_to_pci_addr(const struct ibv_device *device, - struct rte_pci_addr *pci_addr); - /** * DPDK callback to change the MTU. * @@ -4998,10 +4994,6 @@ mlx4_dev_filter_ctrl(struct rte_eth_dev *dev, return -EINVAL; *(const void **)arg = &mlx4_flow_ops; return 0; - case RTE_ETH_FILTER_FDIR: - DEBUG("%p: filter type FDIR is not supported by this PMD", - (void *)dev); - break; default: ERROR("%p: filter type (%d) not supported", (void *)dev, filter_type); @@ -5024,22 +5016,15 @@ static const struct eth_dev_ops mlx4_dev_ops = { .link_update = mlx4_link_update, .stats_get = mlx4_stats_get, .stats_reset = mlx4_stats_reset, - .queue_stats_mapping_set = NULL, .dev_infos_get = mlx4_dev_infos_get, .dev_supported_ptypes_get = mlx4_dev_supported_ptypes_get, .vlan_filter_set = mlx4_vlan_filter_set, - .vlan_tpid_set = NULL, - .vlan_strip_queue_set = NULL, - .vlan_offload_set = NULL, .rx_queue_setup = mlx4_rx_queue_setup, .tx_queue_setup = mlx4_tx_queue_setup, .rx_queue_release = mlx4_rx_queue_release, .tx_queue_release = mlx4_tx_queue_release, - .dev_led_on = NULL, - .dev_led_off = NULL, .flow_ctrl_get = mlx4_dev_get_flow_ctrl, .flow_ctrl_set = mlx4_dev_set_flow_ctrl, - .priority_flow_ctrl_set = NULL, .mac_addr_remove = mlx4_mac_addr_remove, .mac_addr_add = mlx4_mac_addr_add, .mac_addr_set = mlx4_mac_addr_set, diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index a12d1fafa0..702f9c9091 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -34,7 +34,6 @@ #ifndef RTE_PMD_MLX4_H_ #define RTE_PMD_MLX4_H_ -#include #include #include @@ -150,17 +149,6 @@ enum { /* Number of elements in array. */ #define elemof(a) (sizeof(a) / sizeof((a)[0])) -/* Cast pointer p to structure member m to its parent structure of type t. */ -#define containerof(p, t, m) ((t *)((uint8_t *)(p) - offsetof(t, m))) - -/* Branch prediction helpers. */ -#ifndef likely -#define likely(c) __builtin_expect(!!(c), 1) -#endif -#ifndef unlikely -#define unlikely(c) __builtin_expect(!!(c), 0) -#endif - /* Debugging */ #ifndef NDEBUG #include