Lines Matching refs:xp
18 struct ila_xlat_params xp; member
57 return (ila->xp.ifindex && ila->xp.ifindex != ifindex); in ila_cmp_wildcards()
61 struct ila_xlat_params *xp) in ila_cmp_params() argument
63 return (ila->xp.ifindex != xp->ifindex); in ila_cmp_params()
71 return (ila->xp.ip.locator_match.v64 != *(__be64 *)arg->key); in ila_cmpfn()
78 if (ila->xp.ifindex) in ila_order()
87 .key_offset = offsetof(struct ila_map, xp.ip.locator_match),
96 struct ila_xlat_params *xp) in parse_nl_config() argument
98 memset(xp, 0, sizeof(*xp)); in parse_nl_config()
101 xp->ip.locator.v64 = (__force __be64)nla_get_u64( in parse_nl_config()
105 xp->ip.locator_match.v64 = (__force __be64)nla_get_u64( in parse_nl_config()
109 xp->ip.csum_mode = nla_get_u8(info->attrs[ILA_ATTR_CSUM_MODE]); in parse_nl_config()
111 xp->ip.csum_mode = ILA_CSUM_NO_ACTION; in parse_nl_config()
114 xp->ip.ident_type = nla_get_u8( in parse_nl_config()
117 xp->ip.ident_type = ILA_ATYPE_USE_FORMAT; in parse_nl_config()
120 xp->ifindex = nla_get_s32(info->attrs[ILA_ATTR_IFINDEX]); in parse_nl_config()
144 static inline struct ila_map *ila_lookup_by_params(struct ila_xlat_params *xp, in ila_lookup_by_params() argument
150 &xp->ip.locator_match, in ila_lookup_by_params()
153 if (!ila_cmp_params(ila, xp)) in ila_lookup_by_params()
203 static int ila_add_mapping(struct net *net, struct ila_xlat_params *xp) in ila_add_mapping() argument
207 spinlock_t *lock = ila_get_lock(ilan, xp->ip.locator_match); in ila_add_mapping()
226 ila_init_saved_csum(&xp->ip); in ila_add_mapping()
228 ila->xp = *xp; in ila_add_mapping()
235 &xp->ip.locator_match, in ila_add_mapping()
245 if (!ila_cmp_params(tila, xp)) { in ila_add_mapping()
282 static int ila_del_mapping(struct net *net, struct ila_xlat_params *xp) in ila_del_mapping() argument
286 spinlock_t *lock = ila_get_lock(ilan, xp->ip.locator_match); in ila_del_mapping()
292 &xp->ip.locator_match, rht_params); in ila_del_mapping()
298 if (ila_cmp_params(ila, xp)) { in ila_del_mapping()
360 struct ila_xlat_params xp; in ila_xlat_nl_cmd_del_mapping() local
363 err = parse_nl_config(info, &xp); in ila_xlat_nl_cmd_del_mapping()
367 ila_del_mapping(net, &xp); in ila_xlat_nl_cmd_del_mapping()
375 return ila_get_lock(ilan, ila->xp.ip.locator_match); in lock_from_ila_map()
426 (__force u64)ila->xp.ip.locator.v64, in ila_fill_info()
429 (__force u64)ila->xp.ip.locator_match.v64, in ila_fill_info()
431 nla_put_s32(msg, ILA_ATTR_IFINDEX, ila->xp.ifindex) || in ila_fill_info()
432 nla_put_u8(msg, ILA_ATTR_CSUM_MODE, ila->xp.ip.csum_mode) || in ila_fill_info()
433 nla_put_u8(msg, ILA_ATTR_IDENT_TYPE, ila->xp.ip.ident_type)) in ila_fill_info()
465 struct ila_xlat_params xp; in ila_xlat_nl_cmd_get_mapping() local
469 ret = parse_nl_config(info, &xp); in ila_xlat_nl_cmd_get_mapping()
480 ila = ila_lookup_by_params(&xp, ilan); in ila_xlat_nl_cmd_get_mapping()
659 ila_update_ipv6_locator(skb, &ila->xp.ip, sir2ila); in ila_xlat_addr()