Lines Matching defs:ns
44 * @ns: the network namespace
52 static inline u32 sel_netif_hashfn(const struct net *ns, int ifindex)
54 return (((uintptr_t)ns + ifindex) & (SEL_NETIF_HASH_SIZE - 1));
59 * @ns: the network namespace
67 static inline struct sel_netif *sel_netif_find(const struct net *ns,
70 u32 idx = sel_netif_hashfn(ns, ifindex);
74 if (net_eq(netif->nsec.ns, ns) &&
97 idx = sel_netif_hashfn(netif->nsec.ns, netif->nsec.ifindex);
121 * @ns: the network namespace
132 static int sel_netif_sid_slow(struct net *ns, int ifindex, u32 *sid)
142 dev = dev_get_by_index(ns, ifindex);
150 netif = sel_netif_find(ns, ifindex);
161 new->nsec.ns = ns;
179 * @ns: the network namespace
191 int sel_netif_sid(struct net *ns, int ifindex, u32 *sid)
196 netif = sel_netif_find(ns, ifindex);
204 return sel_netif_sid_slow(ns, ifindex, sid);
209 * @ns: the network namespace
217 static void sel_netif_kill(const struct net *ns, int ifindex)
223 netif = sel_netif_find(ns, ifindex);