summaryrefslogtreecommitdiff
path: root/datapath/vport-patch.c
diff options
context:
space:
mode:
authorPravin Shelar <pshelar@nicira.com>2011-09-09 19:09:47 -0700
committerPravin Shelar <pshelar@nicira.com>2011-09-09 19:09:47 -0700
commit3544358aa5960b148bc31435a0062e9392530ec2 (patch)
treeaf87a0e875081e2222fefd6e92ad1deb55be2fc7 /datapath/vport-patch.c
parentd9065a90b6b955aa38586c952e8804ca7a22547e (diff)
downloadopenvswitch-3544358aa5960b148bc31435a0062e9392530ec2.tar.gz
datapath: Improve kernel hash table
Currently OVS uses its own hashing implmentation for hash tables which has some problems, e.g. error case on deletion code. Following patch replaces that with hlist based hash table which is consistent with other kernel hash tables. As Jesse suggested, flex-array is used for allocating hash buckets, So that we can have large hash-table without large contiguous kernel memory. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath/vport-patch.c')
-rw-r--r--datapath/vport-patch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/datapath/vport-patch.c b/datapath/vport-patch.c
index 068179c58..1ec3a4c96 100644
--- a/datapath/vport-patch.c
+++ b/datapath/vport-patch.c
@@ -175,15 +175,13 @@ static void free_port_rcu(struct rcu_head *rcu)
vport_free(vport_from_priv(patch_vport));
}
-static int patch_destroy(struct vport *vport)
+static void patch_destroy(struct vport *vport)
{
struct patch_vport *patch_vport = patch_vport_priv(vport);
update_peers(patch_vport->name, NULL);
hlist_del(&patch_vport->hash_node);
call_rcu(&patch_vport->rcu, free_port_rcu);
-
- return 0;
}
static int patch_set_options(struct vport *vport, struct nlattr *options)