/* Description: Add a new port record to the network address hash table.  */
static void sel_netport_insert(struct sel_netport *port)
/* Description: Add a new port record to the network address hash table.  */
static void sel_netport_insert(struct sel_netport *port)
{
	unsigned int idx;
	idx = sel_netport_hashfn(port->psec.port);
	list_add_rcu(&port->list, &sel_netport_hash[idx].list);
	if (sel_netport_hash[idx].size == SEL_NETPORT_HASH_BKT_LIMIT) {
		struct sel_netport *tail;
		tail = list_entry(
			rcu_dereference(sel_netport_hash[idx].list.prev),
			struct sel_netport, list);
		list_del_rcu(&tail->list);
		call_rcu(&tail->rcu, sel_netport_free);
	} else
		sel_netport_hash[idx].size++;
}