FreeBSD/sys/dev/ixl/ixl_pf_main.c
/*
** Find the filter with both matching mac addr and vlan id
*/
Find the filter with both matching mac addr and vlan id
Find the filter with both matching mac addr and vlan id
struct ixl_mac_filter *
ixl_find_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 vlan)
{
	struct ixl_mac_filter	*f;
	bool			match = FALSE;
	SLIST_FOREACH(f, &vsi->ftl, next) {
		if (!cmp_etheraddr(f->macaddr, macaddr))
			continue;
		if (f->vlan == vlan) {
			match = TRUE;
			break;
		}
	}	
	if (!match)
		f = NULL;
	return (f);
}
struct ixl_mac_filter * ixl_find_filter ( struct ixl_vsi * vsi , u8 * macaddr , s16 vlan ) { struct ixl_mac_filter * f ; bool match = FALSE ; SLIST_FOREACH ( f , & vsi -> ftl , next ) { if ( ! cmp_etheraddr ( f -> macaddr , macaddr ) ) continue ; if ( f -> vlan == vlan ) { match = TRUE ; break ; } } if ( ! match ) f = NULL ; return ( f ) ; }
Find the filter with both matching mac addr and vlan id
Find the filter with both matching mac addr and vlan id