FreeBSD/sys/dev/bxe/ecore_sp.c
/* On 57711 we write the multicast MACs' approximate match
 * table by directly into the TSTORM's internal RAM. So we don't
 * really need to handle any tricks to make it work.
 */
On 57711 we write the multicast MACs' approximate match
table by directly into the TSTORM's internal RAM. So we don't
really need to handle any tricks to make it work.
On 57711 we write the multicast MACs ' approximate match table by directly into the TSTORM ' s internal RAM . So we don ' t really need to handle any tricks to make it work .
static int ecore_mcast_setup_e1h(struct bxe_softc *sc,
				 struct ecore_mcast_ramrod_params *p,
				 enum ecore_mcast_cmd cmd)
{
	int i;
	struct ecore_mcast_obj *o = p->mcast_obj;
	struct ecore_raw_obj *r = &o->raw;
	if (!ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) {
		uint32_t mc_filter[ECORE_MC_HASH_SIZE] = {0};
		switch (cmd) {
		case ECORE_MCAST_CMD_ADD:
			ecore_mcast_hdl_add_e1h(sc, o, p, mc_filter);
			break;
		case ECORE_MCAST_CMD_DEL:
			ECORE_MSG(sc,
				  "Invalidating multicast MACs configuration\n");
			ECORE_MEMSET(o->registry.aprox_match.vec, 0,
			       sizeof(o->registry.aprox_match.vec));
			break;
		case ECORE_MCAST_CMD_RESTORE:
			ecore_mcast_hdl_restore_e1h(sc, o, p, mc_filter);
			break;
		default:
			ECORE_ERR("Unknown command: %d\n", cmd);
			return ECORE_INVAL;
		}
		for (i = 0; i < ECORE_MC_HASH_SIZE; i++)
			REG_WR(sc, ECORE_MC_HASH_OFFSET(sc, i), mc_filter[i]);
	} else
		ECORE_MEMSET(o->registry.aprox_match.vec, 0,
		       sizeof(o->registry.aprox_match.vec));
	r->clear_pending(r);
	return ECORE_SUCCESS;
}
static int ecore_mcast_setup_e1h ( struct bxe_softc * sc , struct ecore_mcast_ramrod_params * p , enum ecore_mcast_cmd cmd ) { int i ; struct ecore_mcast_obj * o = p -> mcast_obj ; struct ecore_raw_obj * r = & o -> raw ; if ( ! ECORE_TEST_BIT ( RAMROD_DRV_CLR_ONLY , & p -> ramrod_flags ) ) { uint32_t mc_filter [ ECORE_MC_HASH_SIZE ] = { 0 } ; switch ( cmd ) { case ECORE_MCAST_CMD_ADD : ecore_mcast_hdl_add_e1h ( sc , o , p , mc_filter ) ; break ; case ECORE_MCAST_CMD_DEL : ECORE_MSG ( sc , " \n " ) ; ECORE_MEMSET ( o -> registry . aprox_match . vec , 0 , sizeof ( o -> registry . aprox_match . vec ) ) ; break ; case ECORE_MCAST_CMD_RESTORE : ecore_mcast_hdl_restore_e1h ( sc , o , p , mc_filter ) ; break ; default : ECORE_ERR ( " \n " , cmd ) ; return ECORE_INVAL ; } for ( i = 0 ; i < ECORE_MC_HASH_SIZE ; i ++ ) REG_WR ( sc , ECORE_MC_HASH_OFFSET ( sc , i ) , mc_filter [ i ] ) ; } else ECORE_MEMSET ( o -> registry . aprox_match . vec , 0 , sizeof ( o -> registry . aprox_match . vec ) ) ; r -> clear_pending ( r ) ; return ECORE_SUCCESS ; }
On 57711 we write the multicast MACs' approximate match
 table by directly into the TSTORM's internal RAM.
On 57711 we write the multicast MACs ' approximate match table by directly into the TSTORM ' s internal RAM .
/* If CLEAR_ONLY has been requested - clear the registry
	 * and clear a pending bit.
	 */ /* Set the multicast filter bits before writing it into
		 * the internal memory.
		 */ /* clear the registry */ /* Set the mcast filter in the internal memory */ /* clear the registry */ /* We are done */