Lines Matching refs:mfc
54 const struct mr_mfc *mfc);
57 struct mr_mfc *mfc);
81 struct mr_mfc *mfc; member
110 vifi_t ivif = mr_route->mfc->mfc_parent; in mlxsw_sp_mr_route_ivif_in_evifs()
112 return mr_route->mfc->mfc_un.res.ttls[ivif] != 255; in mlxsw_sp_mr_route_ivif_in_evifs()
297 struct mr_mfc *mfc) in mlxsw_sp_mr_route_create() argument
312 mr_cache_hold(mfc); in mlxsw_sp_mr_route_create()
313 mr_route->mfc = mfc; in mlxsw_sp_mr_route_create()
314 mr_table->ops->key_create(mr_table, &mr_route->key, mr_route->mfc); in mlxsw_sp_mr_route_create()
318 if (mfc->mfc_un.res.ttls[i] != 255) { in mlxsw_sp_mr_route_create()
329 &mr_table->vifs[mfc->mfc_parent]); in mlxsw_sp_mr_route_create()
334 mr_cache_put(mfc); in mlxsw_sp_mr_route_create()
347 mr_cache_put(mr_route->mfc); in mlxsw_sp_mr_route_destroy()
357 mr_route->mfc->mfc_flags |= MFC_OFFLOAD; in mlxsw_sp_mr_mfc_offload_set()
359 mr_route->mfc->mfc_flags &= ~MFC_OFFLOAD; in mlxsw_sp_mr_mfc_offload_set()
382 struct mr_mfc *mfc, bool replace) in mlxsw_sp_mr_route_add() argument
388 if (!mr_table->ops->is_route_valid(mr_table, mfc)) in mlxsw_sp_mr_route_add()
392 mr_route = mlxsw_sp_mr_route_create(mr_table, mfc); in mlxsw_sp_mr_route_add()
455 struct mr_mfc *mfc) in mlxsw_sp_mr_route_del() argument
460 mr_table->ops->key_create(mr_table, &key, mfc); in mlxsw_sp_mr_route_del()
770 struct mfc_cache *mfc = (struct mfc_cache *) c; in mlxsw_sp_mr_route4_validate() local
775 if (mfc->mfc_origin == htonl(INADDR_ANY) && in mlxsw_sp_mr_route4_validate()
776 mfc->mfc_mcastgrp == htonl(INADDR_ANY)) { in mlxsw_sp_mr_route4_validate()
788 const struct mfc_cache *mfc = (struct mfc_cache *) c; in mlxsw_sp_mr_route4_key() local
791 starg = (mfc->mfc_origin == htonl(INADDR_ANY)); in mlxsw_sp_mr_route4_key()
796 key->group.addr4 = mfc->mfc_mcastgrp; in mlxsw_sp_mr_route4_key()
798 key->source.addr4 = mfc->mfc_origin; in mlxsw_sp_mr_route4_key()
817 struct mfc6_cache *mfc = (struct mfc6_cache *) c; in mlxsw_sp_mr_route6_validate() local
822 if (ipv6_addr_any(&mfc->mf6c_origin) && in mlxsw_sp_mr_route6_validate()
823 ipv6_addr_any(&mfc->mf6c_mcastgrp)) { in mlxsw_sp_mr_route6_validate()
835 const struct mfc6_cache *mfc = (struct mfc6_cache *) c; in mlxsw_sp_mr_route6_key() local
840 key->group.addr6 = mfc->mf6c_mcastgrp; in mlxsw_sp_mr_route6_key()
842 key->source.addr6 = mfc->mf6c_origin; in mlxsw_sp_mr_route6_key()
843 if (!ipv6_addr_any(&mfc->mf6c_origin)) in mlxsw_sp_mr_route6_key()
989 if (mr_route->mfc->mfc_un.res.pkt != packets) in mlxsw_sp_mr_route_stats_update()
990 mr_route->mfc->mfc_un.res.lastuse = jiffies; in mlxsw_sp_mr_route_stats_update()
991 mr_route->mfc->mfc_un.res.pkt = packets; in mlxsw_sp_mr_route_stats_update()
992 mr_route->mfc->mfc_un.res.bytes = bytes; in mlxsw_sp_mr_route_stats_update()