summaryrefslogtreecommitdiff
path: root/drivers/net/enic
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2019-03-02 02:42:39 -0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-08 17:52:22 +0100
commit0d0dcd64b8fe333234e6603ad343b7a5ec1baa65 (patch)
tree590865135ac4f89a869700da65eeead6eefffcc4 /drivers/net/enic
parent1598c729595d8d59ebb9dce190401846da16c09c (diff)
downloaddpdk-next-eventdev-0d0dcd64b8fe333234e6603ad343b7a5ec1baa65.zip
dpdk-next-eventdev-0d0dcd64b8fe333234e6603ad343b7a5ec1baa65.tar.gz
dpdk-next-eventdev-0d0dcd64b8fe333234e6603ad343b7a5ec1baa65.tar.xz
net/enic: remove unused functions
Remove unused functions. Specifically, vnic_set_rss_key() is obsolete. enic_{add,del}_vlan() has never been supported in the firmware. And, remove vnic_rss.c altogether as it becomes empty. These were discovered by cppcheck. Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/Makefile1
-rw-r--r--drivers/net/enic/base/vnic_rss.c23
-rw-r--r--drivers/net/enic/base/vnic_rss.h5
-rw-r--r--drivers/net/enic/enic_res.c26
-rw-r--r--drivers/net/enic/enic_res.h2
-rw-r--r--drivers/net/enic/meson.build1
6 files changed, 0 insertions, 58 deletions
diff --git a/drivers/net/enic/Makefile b/drivers/net/enic/Makefile
index e39e476..04bae35 100644
--- a/drivers/net/enic/Makefile
+++ b/drivers/net/enic/Makefile
@@ -37,7 +37,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += base/vnic_wq.c
SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += base/vnic_dev.c
SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += base/vnic_intr.c
SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += base/vnic_rq.c
-SRCS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += base/vnic_rss.c
# The current implementation assumes 64-bit pointers
CC_AVX2_SUPPORT=0
diff --git a/drivers/net/enic/base/vnic_rss.c b/drivers/net/enic/base/vnic_rss.c
deleted file mode 100644
index f41b866..0000000
--- a/drivers/net/enic/base/vnic_rss.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2008-2017 Cisco Systems, Inc. All rights reserved.
- * Copyright 2007 Nuova Systems, Inc. All rights reserved.
- */
-
-#include "enic_compat.h"
-#include "vnic_rss.h"
-
-void vnic_set_rss_key(union vnic_rss_key *rss_key, u8 *key)
-{
- u32 i;
- u32 *p;
- u16 *q;
-
- for (i = 0; i < 4; ++i) {
- p = (u32 *)(key + (10 * i));
- iowrite32(*p++, &rss_key->key[i].b[0]);
- iowrite32(*p++, &rss_key->key[i].b[4]);
- q = (u16 *)p;
- iowrite32(*q, &rss_key->key[i].b[8]);
- }
-}
-
diff --git a/drivers/net/enic/base/vnic_rss.h b/drivers/net/enic/base/vnic_rss.h
index abd7b9f..039041e 100644
--- a/drivers/net/enic/base/vnic_rss.h
+++ b/drivers/net/enic/base/vnic_rss.h
@@ -24,9 +24,4 @@ union vnic_rss_cpu {
u64 raw[32];
};
-void vnic_set_rss_key(union vnic_rss_key *rss_key, u8 *key);
-void vnic_set_rss_cpu(union vnic_rss_cpu *rss_cpu, u8 *cpu);
-void vnic_get_rss_key(union vnic_rss_key *rss_key, u8 *key);
-void vnic_get_rss_cpu(union vnic_rss_cpu *rss_cpu, u8 *cpu);
-
#endif /* _VNIC_RSS_H_ */
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 24b2844..d289f3d 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -212,32 +212,6 @@ int enic_get_vnic_config(struct enic *enic)
return 0;
}
-int enic_add_vlan(struct enic *enic, u16 vlanid)
-{
- u64 a0 = vlanid, a1 = 0;
- int wait = 1000;
- int err;
-
- err = vnic_dev_cmd(enic->vdev, CMD_VLAN_ADD, &a0, &a1, wait);
- if (err)
- dev_err(enic_get_dev(enic), "Can't add vlan id, %d\n", err);
-
- return err;
-}
-
-int enic_del_vlan(struct enic *enic, u16 vlanid)
-{
- u64 a0 = vlanid, a1 = 0;
- int wait = 1000;
- int err;
-
- err = vnic_dev_cmd(enic->vdev, CMD_VLAN_DEL, &a0, &a1, wait);
- if (err)
- dev_err(enic_get_dev(enic), "Can't delete vlan id, %d\n", err);
-
- return err;
-}
-
int enic_set_nic_cfg(struct enic *enic, u8 rss_default_cpu, u8 rss_hash_type,
u8 rss_hash_bits, u8 rss_base_cpu, u8 rss_enable, u8 tso_ipid_split_en,
u8 ig_vlan_strip_en)
diff --git a/drivers/net/enic/enic_res.h b/drivers/net/enic/enic_res.h
index 3786bc0..faaaad9 100644
--- a/drivers/net/enic/enic_res.h
+++ b/drivers/net/enic/enic_res.h
@@ -59,8 +59,6 @@
struct enic;
int enic_get_vnic_config(struct enic *);
-int enic_add_vlan(struct enic *enic, u16 vlanid);
-int enic_del_vlan(struct enic *enic, u16 vlanid);
int enic_set_nic_cfg(struct enic *enic, u8 rss_default_cpu, u8 rss_hash_type,
u8 rss_hash_bits, u8 rss_base_cpu, u8 rss_enable, u8 tso_ipid_split_en,
u8 ig_vlan_strip_en);
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index 9e9a567..6716cda 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -6,7 +6,6 @@ sources = files(
'base/vnic_dev.c',
'base/vnic_intr.c',
'base/vnic_rq.c',
- 'base/vnic_rss.c',
'base/vnic_wq.c',
'enic_clsf.c',
'enic_ethdev.c',