Exemplo n.º 1
0
/*
@func int32 | rtl865x_delNxtHop |delete nexthop entry
@parm uint32 | attr | attribute. NEXTHOP_L3/NEXTHOP_REDIRECT.
@parm uint32 | entryIdx | entry index.
@rvalue SUCCESS | success.
@rvalue FAILED | failed.
@comm	
*/
int32 rtl865x_delNxtHop(uint32 attr, uint32 entryIdx)
{
	int32 retval = FAILED;
	unsigned long flags=0;	
	//rtl_down_interruptible(&nxthop_sem);
	SMP_LOCK_ETH_HW(flags);
	retval = _rtl865x_delNxtHop(attr,entryIdx);
	//rtl_up(&nxthop_sem);
	SMP_UNLOCK_ETH_HW(flags);
	return retval;	
}
/*
@func int32 | rtl865x_delNxtHop |delete nexthop entry
@parm uint32 | attr | attribute. NEXTHOP_L3/NEXTHOP_REDIRECT.
@parm uint32 | entryIdx | entry index.
@rvalue SUCCESS | success.
@rvalue FAILED | failed.
@comm	
*/
int32 rtl865x_delNxtHop(uint32 attr, uint32 entryIdx)
{
	int32 retval = FAILED;
	unsigned long flags;	
	//rtl_down_interruptible(&nxthop_sem);
	local_irq_save(flags);
	retval = _rtl865x_delNxtHop(attr,entryIdx);
	//rtl_up(&nxthop_sem);
	local_irq_restore(flags);
	return retval;	
}
Exemplo n.º 3
0
/*
@func int32 | rtl865x_reinitNxtHopTable |reinitialize the nexthop table
@rvalue SUCCESS | success.
@comm	
*/
int32 rtl865x_reinitNxtHopTable(void)
{
	int32 i;
	_rtl865x_nextHop_unRegister_event();

	for(i = 0; i < NXTHOP_ENTRY_NUM; i++)
	{
		if(rtl865x_nxtHopTable[i].valid)
			_rtl865x_delNxtHop(NEXTHOP_L3,i);
	}
	
	_rtl865x_nextHop_register_event();
	return SUCCESS;
}