Lines Matching refs:xp
19 struct ila_xlat_params xp; member
58 return (ila->xp.ifindex && ila->xp.ifindex != ifindex); in ila_cmp_wildcards()
62 struct ila_xlat_params *xp) in ila_cmp_params() argument
64 return (ila->xp.ifindex != xp->ifindex); in ila_cmp_params()
72 return (ila->xp.ip.locator_match.v64 != *(__be64 *)arg->key); in ila_cmpfn()
79 if (ila->xp.ifindex) in ila_order()
88 .key_offset = offsetof(struct ila_map, xp.ip.locator_match),
97 struct ila_xlat_params *xp) in parse_nl_config() argument
99 memset(xp, 0, sizeof(*xp)); in parse_nl_config()
102 xp->ip.locator.v64 = (__force __be64)nla_get_u64( in parse_nl_config()
106 xp->ip.locator_match.v64 = (__force __be64)nla_get_u64( in parse_nl_config()
110 xp->ip.csum_mode = nla_get_u8(info->attrs[ILA_ATTR_CSUM_MODE]); in parse_nl_config()
112 xp->ip.csum_mode = ILA_CSUM_NO_ACTION; in parse_nl_config()
115 xp->ip.ident_type = nla_get_u8( in parse_nl_config()
118 xp->ip.ident_type = ILA_ATYPE_USE_FORMAT; in parse_nl_config()
121 xp->ifindex = nla_get_s32(info->attrs[ILA_ATTR_IFINDEX]); in parse_nl_config()
145 static inline struct ila_map *ila_lookup_by_params(struct ila_xlat_params *xp, in ila_lookup_by_params() argument
151 &xp->ip.locator_match, in ila_lookup_by_params()
154 if (!ila_cmp_params(ila, xp)) in ila_lookup_by_params()
204 static int ila_add_mapping(struct net *net, struct ila_xlat_params *xp) in ila_add_mapping() argument
208 spinlock_t *lock = ila_get_lock(ilan, xp->ip.locator_match); in ila_add_mapping()
227 ila_init_saved_csum(&xp->ip); in ila_add_mapping()
229 ila->xp = *xp; in ila_add_mapping()
236 &xp->ip.locator_match, in ila_add_mapping()
246 if (!ila_cmp_params(tila, xp)) { in ila_add_mapping()
283 static int ila_del_mapping(struct net *net, struct ila_xlat_params *xp) in ila_del_mapping() argument
287 spinlock_t *lock = ila_get_lock(ilan, xp->ip.locator_match); in ila_del_mapping()
293 &xp->ip.locator_match, rht_params); in ila_del_mapping()
299 if (ila_cmp_params(ila, xp)) { in ila_del_mapping()
361 struct ila_xlat_params xp; in ila_xlat_nl_cmd_del_mapping() local
364 err = parse_nl_config(info, &xp); in ila_xlat_nl_cmd_del_mapping()
368 ila_del_mapping(net, &xp); in ila_xlat_nl_cmd_del_mapping()
376 return ila_get_lock(ilan, ila->xp.ip.locator_match); in lock_from_ila_map()
427 (__force u64)ila->xp.ip.locator.v64, in ila_fill_info()
430 (__force u64)ila->xp.ip.locator_match.v64, in ila_fill_info()
432 nla_put_s32(msg, ILA_ATTR_IFINDEX, ila->xp.ifindex) || in ila_fill_info()
433 nla_put_u8(msg, ILA_ATTR_CSUM_MODE, ila->xp.ip.csum_mode) || in ila_fill_info()
434 nla_put_u8(msg, ILA_ATTR_IDENT_TYPE, ila->xp.ip.ident_type)) in ila_fill_info()
466 struct ila_xlat_params xp; in ila_xlat_nl_cmd_get_mapping() local
470 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()
652 ila_update_ipv6_locator(skb, &ila->xp.ip, sir2ila); in ila_xlat_addr()