Home
last modified time | relevance | path

Searched refs:cfg (Results 1 – 25 of 68) sorted by relevance

123

/net/bridge/
Dbr_mdb.c711 static int br_mdb_replace_group_sg(const struct br_mdb_config *cfg, in br_mdb_replace_group_sg() argument
720 pg->rt_protocol = cfg->rt_protocol; in br_mdb_replace_group_sg()
721 if (!(flags & MDB_PG_FLAGS_PERMANENT) && !cfg->src_entry) in br_mdb_replace_group_sg()
727 br_mdb_notify(cfg->br->dev, mp, pg, RTM_NEWMDB); in br_mdb_replace_group_sg()
732 static int br_mdb_add_group_sg(const struct br_mdb_config *cfg, in br_mdb_add_group_sg() argument
743 (p = mlock_dereference(*pp, cfg->br)) != NULL; in br_mdb_add_group_sg()
745 if (p->key.port == cfg->p) { in br_mdb_add_group_sg()
746 if (!(cfg->nlflags & NLM_F_REPLACE)) { in br_mdb_add_group_sg()
750 return br_mdb_replace_group_sg(cfg, mp, p, brmctx, in br_mdb_add_group_sg()
753 if ((unsigned long)p->key.port < (unsigned long)cfg->p) in br_mdb_add_group_sg()
[all …]
/net/netfilter/
Dxt_hashlimit.c122 struct hashlimit_cfg3 cfg; /* config */ member
142 struct hashlimit_cfg1 *cfg = (struct hashlimit_cfg1 *)from; in cfg_copy() local
144 to->mode = cfg->mode; in cfg_copy()
145 to->avg = cfg->avg; in cfg_copy()
146 to->burst = cfg->burst; in cfg_copy()
147 to->size = cfg->size; in cfg_copy()
148 to->max = cfg->max; in cfg_copy()
149 to->gc_interval = cfg->gc_interval; in cfg_copy()
150 to->expire = cfg->expire; in cfg_copy()
151 to->srcmask = cfg->srcmask; in cfg_copy()
[all …]
Dxt_RATEEST.c115 } cfg; in xt_rateest_tg_checkentry() local
153 cfg.opt.nla_len = nla_attr_size(sizeof(cfg.est)); in xt_rateest_tg_checkentry()
154 cfg.opt.nla_type = TCA_STATS_RATE_EST; in xt_rateest_tg_checkentry()
155 cfg.est.interval = info->interval; in xt_rateest_tg_checkentry()
156 cfg.est.ewma_log = info->ewma_log; in xt_rateest_tg_checkentry()
159 &est->lock, NULL, &cfg.opt); in xt_rateest_tg_checkentry()
/net/ipv4/
Dfib_frontend.c472 struct fib_config *cfg) in rtentry_to_fib_config() argument
477 memset(cfg, 0, sizeof(*cfg)); in rtentry_to_fib_config()
478 cfg->fc_nlinfo.nl_net = net; in rtentry_to_fib_config()
507 cfg->fc_dst_len = plen; in rtentry_to_fib_config()
508 cfg->fc_dst = addr; in rtentry_to_fib_config()
511 cfg->fc_nlflags = NLM_F_CREATE; in rtentry_to_fib_config()
512 cfg->fc_protocol = RTPROT_BOOT; in rtentry_to_fib_config()
516 cfg->fc_priority = rt->rt_metric - 1; in rtentry_to_fib_config()
519 cfg->fc_scope = RT_SCOPE_HOST; in rtentry_to_fib_config()
520 cfg->fc_type = RTN_UNREACHABLE; in rtentry_to_fib_config()
[all …]
Dfib_semantics.c378 const struct fib_config *cfg) in fib_find_info_nh() argument
384 hash = fib_info_hashfn_1(fib_devindex_hashfn(cfg->fc_nh_id), in fib_find_info_nh()
385 cfg->fc_protocol, cfg->fc_scope, in fib_find_info_nh()
386 (__force u32)cfg->fc_prefsrc, in fib_find_info_nh()
387 cfg->fc_priority); in fib_find_info_nh()
394 if (!fi->nh || fi->nh->id != cfg->fc_nh_id) in fib_find_info_nh()
396 if (cfg->fc_protocol == fi->fib_protocol && in fib_find_info_nh()
397 cfg->fc_scope == fi->fib_scope && in fib_find_info_nh()
398 cfg->fc_prefsrc == fi->fib_prefsrc && in fib_find_info_nh()
399 cfg->fc_priority == fi->fib_priority && in fib_find_info_nh()
[all …]
Dudp_tunnel_core.c10 int udp_sock_create4(struct net *net, struct udp_port_cfg *cfg, in udp_sock_create4() argument
21 if (cfg->bind_ifindex) { in udp_sock_create4()
22 err = sock_bindtoindex(sock->sk, cfg->bind_ifindex, true); in udp_sock_create4()
28 udp_addr.sin_addr = cfg->local_ip; in udp_sock_create4()
29 udp_addr.sin_port = cfg->local_udp_port; in udp_sock_create4()
35 if (cfg->peer_udp_port) { in udp_sock_create4()
37 udp_addr.sin_addr = cfg->peer_ip; in udp_sock_create4()
38 udp_addr.sin_port = cfg->peer_udp_port; in udp_sock_create4()
45 sock->sk->sk_no_check_tx = !cfg->use_udp_checksums; in udp_sock_create4()
61 struct udp_tunnel_sock_cfg *cfg) in setup_udp_tunnel_sock() argument
[all …]
Dfou_core.c491 static bool fou_cfg_cmp(struct fou *fou, struct fou_cfg *cfg) in fou_cfg_cmp() argument
494 struct udp_port_cfg *udp_cfg = &cfg->udp_config; in fou_cfg_cmp()
522 struct fou_cfg *cfg) in fou_add_to_port_list() argument
529 if (fou_cfg_cmp(fout, cfg)) { in fou_add_to_port_list()
551 static int fou_create(struct net *net, struct fou_cfg *cfg, in fou_create() argument
561 err = udp_sock_create(net, &cfg->udp_config, &sock); in fou_create()
574 fou->port = cfg->udp_config.local_udp_port; in fou_create()
575 fou->family = cfg->udp_config.family; in fou_create()
576 fou->flags = cfg->flags; in fou_create()
577 fou->type = cfg->type; in fou_create()
[all …]
Dnexthop.c546 nexthop_res_table_alloc(struct net *net, u32 nhg_id, struct nh_config *cfg) in nexthop_res_table_alloc() argument
548 const u16 num_nh_buckets = cfg->nh_grp_res_num_buckets; in nexthop_res_table_alloc()
561 res_table->idle_timer = cfg->nh_grp_res_idle_timer; in nexthop_res_table_alloc()
562 res_table->unbalanced_timer = cfg->nh_grp_res_unbalanced_timer; in nexthop_res_table_alloc()
1291 int fib6_check_nexthop(struct nexthop *nh, struct fib6_config *cfg, in fib6_check_nexthop() argument
1303 if (cfg && check_src_addr(&cfg->fc_src, extack) < 0) in fib6_check_nexthop()
1957 struct nexthop *new, const struct nh_config *cfg, in replace_nexthop_grp() argument
1991 if (cfg->nh_grp_res_has_num_buckets && in replace_nexthop_grp()
1992 cfg->nh_grp_res_num_buckets != in replace_nexthop_grp()
2008 if (cfg->nh_grp_res_has_idle_timer) in replace_nexthop_grp()
[all …]
Dfib_lookup.h37 struct fib_info *fib_create_info(struct fib_config *cfg,
39 int fib_nh_match(struct net *net, struct fib_config *cfg, struct fib_info *fi,
41 bool fib_metrics_match(struct fib_config *cfg, struct fib_info *fi);
Dfib_trie.c1216 struct fib_config *cfg, struct netlink_ext_ack *extack) in fib_table_insert() argument
1223 u8 plen = cfg->fc_dst_len; in fib_table_insert()
1229 key = ntohl(cfg->fc_dst); in fib_table_insert()
1236 fi = fib_create_info(cfg, extack); in fib_table_insert()
1242 dscp = cfg->fc_dscp; in fib_table_insert()
1261 if (cfg->fc_nlflags & NLM_F_EXCL) in fib_table_insert()
1280 if (fa->fa_type == cfg->fc_type && in fib_table_insert()
1287 if (cfg->fc_nlflags & NLM_F_REPLACE) { in fib_table_insert()
1306 new_fa->fa_type = cfg->fc_type; in fib_table_insert()
1334 tb->tb_id, &cfg->fc_nlinfo, nlflags); in fib_table_insert()
[all …]
/net/sched/
Dact_bpf.c187 static int tcf_bpf_init_from_ops(struct nlattr **tb, struct tcf_bpf_cfg *cfg) in tcf_bpf_init_from_ops() argument
216 cfg->bpf_ops = bpf_ops; in tcf_bpf_init_from_ops()
217 cfg->bpf_num_ops = bpf_num_ops; in tcf_bpf_init_from_ops()
218 cfg->filter = fp; in tcf_bpf_init_from_ops()
219 cfg->is_ebpf = false; in tcf_bpf_init_from_ops()
224 static int tcf_bpf_init_from_efd(struct nlattr **tb, struct tcf_bpf_cfg *cfg) in tcf_bpf_init_from_efd() argument
244 cfg->bpf_name = name; in tcf_bpf_init_from_efd()
245 cfg->filter = fp; in tcf_bpf_init_from_efd()
246 cfg->is_ebpf = true; in tcf_bpf_init_from_efd()
251 static void tcf_bpf_cfg_cleanup(const struct tcf_bpf_cfg *cfg) in tcf_bpf_cfg_cleanup() argument
[all …]
/net/ethtool/
Dmm.c159 struct ethtool_mm_cfg *cfg) in mm_state_to_cfg() argument
168 cfg->verify_enabled = state->verify_enabled; in mm_state_to_cfg()
169 cfg->verify_time = state->verify_time; in mm_state_to_cfg()
170 cfg->tx_enabled = state->tx_enabled; in mm_state_to_cfg()
171 cfg->pmac_enabled = state->pmac_enabled; in mm_state_to_cfg()
172 cfg->tx_min_frag_size = state->tx_min_frag_size; in mm_state_to_cfg()
189 struct ethtool_mm_cfg cfg = {}; in ethnl_set_mm() local
197 mm_state_to_cfg(&state, &cfg); in ethnl_set_mm()
199 ethnl_update_bool(&cfg.verify_enabled, tb[ETHTOOL_A_MM_VERIFY_ENABLED], in ethnl_set_mm()
201 ethnl_update_u32(&cfg.verify_time, tb[ETHTOOL_A_MM_VERIFY_TIME], &mod); in ethnl_set_mm()
[all …]
Dcabletest.c230 struct phy_tdr_config *cfg) in ethnl_act_cable_test_tdr_cfg() argument
235 cfg->first = 100; in ethnl_act_cable_test_tdr_cfg()
236 cfg->step = 100; in ethnl_act_cable_test_tdr_cfg()
237 cfg->last = MAX_CABLE_LENGTH_CM; in ethnl_act_cable_test_tdr_cfg()
238 cfg->pair = PHY_PAIR_ALL; in ethnl_act_cable_test_tdr_cfg()
251 cfg->first = nla_get_u32( in ethnl_act_cable_test_tdr_cfg()
255 cfg->last = nla_get_u32(tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST]); in ethnl_act_cable_test_tdr_cfg()
258 cfg->step = nla_get_u32(tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP]); in ethnl_act_cable_test_tdr_cfg()
261 cfg->pair = nla_get_u8(tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR]); in ethnl_act_cable_test_tdr_cfg()
262 if (cfg->pair > ETHTOOL_A_CABLE_PAIR_D) { in ethnl_act_cable_test_tdr_cfg()
[all …]
/net/ipv6/
Dip6_udp_tunnel.c16 int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg, in udp_sock_create6() argument
27 if (cfg->ipv6_v6only) { in udp_sock_create6()
32 if (cfg->bind_ifindex) { in udp_sock_create6()
33 err = sock_bindtoindex(sock->sk, cfg->bind_ifindex, true); in udp_sock_create6()
39 memcpy(&udp6_addr.sin6_addr, &cfg->local_ip6, in udp_sock_create6()
41 udp6_addr.sin6_port = cfg->local_udp_port; in udp_sock_create6()
47 if (cfg->peer_udp_port) { in udp_sock_create6()
50 memcpy(&udp6_addr.sin6_addr, &cfg->peer_ip6, in udp_sock_create6()
52 udp6_addr.sin6_port = cfg->peer_udp_port; in udp_sock_create6()
60 udp_set_no_check6_tx(sock->sk, !cfg->use_udp6_tx_checksums); in udp_sock_create6()
[all …]
Droute.c3315 static int ip6_nh_lookup_table(struct net *net, struct fib6_config *cfg, in ip6_nh_lookup_table() argument
3320 .flowi6_oif = cfg->fc_ifindex, in ip6_nh_lookup_table()
3322 .saddr = cfg->fc_prefsrc, in ip6_nh_lookup_table()
3331 if (!ipv6_addr_any(&cfg->fc_prefsrc)) in ip6_nh_lookup_table()
3336 err = fib6_table_lookup(net, table, cfg->fc_ifindex, &fl6, res, flags); in ip6_nh_lookup_table()
3338 fib6_select_path(net, res, &fl6, cfg->fc_ifindex, in ip6_nh_lookup_table()
3339 cfg->fc_ifindex != 0, NULL, flags); in ip6_nh_lookup_table()
3345 struct fib6_config *cfg, in ip6_route_check_nh_onlink() argument
3350 const struct in6_addr *gw_addr = &cfg->fc_gateway; in ip6_route_check_nh_onlink()
3354 err = ip6_nh_lookup_table(net, cfg, gw_addr, tbid, 0, &res); in ip6_route_check_nh_onlink()
[all …]
Daddrconf.c1073 ipv6_add_addr(struct inet6_dev *idev, struct ifa6_config *cfg, in ipv6_add_addr() argument
1077 int addr_type = ipv6_addr_type(cfg->pfx); in ipv6_add_addr()
1087 !(cfg->ifa_flags & IFA_F_MCAUTOJOIN)) { in ipv6_add_addr()
1114 .i6vi_addr = *cfg->pfx, in ipv6_add_addr()
1131 f6i = addrconf_f6i_alloc(net, idev, cfg->pfx, false, gfp_flags, extack); in ipv6_add_addr()
1140 ifa->addr = *cfg->pfx; in ipv6_add_addr()
1141 if (cfg->peer_pfx) in ipv6_add_addr()
1142 ifa->peer_addr = *cfg->peer_pfx; in ipv6_add_addr()
1147 ifa->scope = cfg->scope; in ipv6_add_addr()
1148 ifa->prefix_len = cfg->plen; in ipv6_add_addr()
[all …]
/net/l2tp/
Dl2tp_netlink.c158 static int l2tp_nl_cmd_tunnel_create_get_addr(struct nlattr **attrs, struct l2tp_tunnel_cfg *cfg) in l2tp_nl_cmd_tunnel_create_get_addr() argument
161 cfg->local_udp_port = nla_get_u16(attrs[L2TP_ATTR_UDP_SPORT]); in l2tp_nl_cmd_tunnel_create_get_addr()
163 cfg->peer_udp_port = nla_get_u16(attrs[L2TP_ATTR_UDP_DPORT]); in l2tp_nl_cmd_tunnel_create_get_addr()
164 cfg->use_udp_checksums = nla_get_flag(attrs[L2TP_ATTR_UDP_CSUM]); in l2tp_nl_cmd_tunnel_create_get_addr()
169 cfg->local_ip6 = nla_data(attrs[L2TP_ATTR_IP6_SADDR]); in l2tp_nl_cmd_tunnel_create_get_addr()
170 cfg->peer_ip6 = nla_data(attrs[L2TP_ATTR_IP6_DADDR]); in l2tp_nl_cmd_tunnel_create_get_addr()
171 cfg->udp6_zero_tx_checksums = nla_get_flag(attrs[L2TP_ATTR_UDP_ZERO_CSUM6_TX]); in l2tp_nl_cmd_tunnel_create_get_addr()
172 cfg->udp6_zero_rx_checksums = nla_get_flag(attrs[L2TP_ATTR_UDP_ZERO_CSUM6_RX]); in l2tp_nl_cmd_tunnel_create_get_addr()
177 cfg->local_ip.s_addr = nla_get_in_addr(attrs[L2TP_ATTR_IP_SADDR]); in l2tp_nl_cmd_tunnel_create_get_addr()
178 cfg->peer_ip.s_addr = nla_get_in_addr(attrs[L2TP_ATTR_IP_DADDR]); in l2tp_nl_cmd_tunnel_create_get_addr()
[all …]
Dl2tp_core.c1288 struct l2tp_tunnel_cfg *cfg, in l2tp_tunnel_sock_create() argument
1295 switch (cfg->encap) { in l2tp_tunnel_sock_create()
1300 if (cfg->local_ip6 && cfg->peer_ip6) { in l2tp_tunnel_sock_create()
1302 memcpy(&udp_conf.local_ip6, cfg->local_ip6, in l2tp_tunnel_sock_create()
1304 memcpy(&udp_conf.peer_ip6, cfg->peer_ip6, in l2tp_tunnel_sock_create()
1307 !cfg->udp6_zero_tx_checksums; in l2tp_tunnel_sock_create()
1309 !cfg->udp6_zero_rx_checksums; in l2tp_tunnel_sock_create()
1314 udp_conf.local_ip = cfg->local_ip; in l2tp_tunnel_sock_create()
1315 udp_conf.peer_ip = cfg->peer_ip; in l2tp_tunnel_sock_create()
1316 udp_conf.use_udp_checksums = cfg->use_udp_checksums; in l2tp_tunnel_sock_create()
[all …]
Dl2tp_core.h200 struct l2tp_session_cfg *cfg);
240 u32 peer_tunnel_id, struct l2tp_tunnel_cfg *cfg,
243 struct l2tp_tunnel_cfg *cfg);
249 struct l2tp_session_cfg *cfg);
Dl2tp_eth.c249 struct l2tp_session_cfg *cfg) in l2tp_eth_create() argument
259 if (cfg->ifname) { in l2tp_eth_create()
260 strscpy(name, cfg->ifname, IFNAMSIZ); in l2tp_eth_create()
268 peer_session_id, cfg); in l2tp_eth_create()
/net/core/
Ddev_ioctl.c187 static int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) in net_hwtstamp_validate() argument
194 if (cfg->flags & ~HWTSTAMP_FLAG_MASK) in net_hwtstamp_validate()
197 tx_type = cfg->tx_type; in net_hwtstamp_validate()
198 rx_filter = cfg->rx_filter; in net_hwtstamp_validate()
272 struct kernel_hwtstamp_config *cfg) in dev_get_hwtstamp_phylib() argument
275 return phy_hwtstamp_get(dev->phydev, cfg); in dev_get_hwtstamp_phylib()
277 return dev->netdev_ops->ndo_hwtstamp_get(dev, cfg); in dev_get_hwtstamp_phylib()
284 struct hwtstamp_config cfg; in dev_get_hwtstamp() local
302 hwtstamp_config_from_kernel(&cfg, &kernel_cfg); in dev_get_hwtstamp()
304 if (copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg))) in dev_get_hwtstamp()
[all …]
/net/mpls/
Daf_mpls.c768 static int mpls_nh_build_from_cfg(struct mpls_route_config *cfg, in mpls_nh_build_from_cfg() argument
771 struct net *net = cfg->rc_nlinfo.nl_net; in mpls_nh_build_from_cfg()
779 nh->nh_labels = cfg->rc_output_labels; in mpls_nh_build_from_cfg()
781 nh->nh_label[i] = cfg->rc_output_label[i]; in mpls_nh_build_from_cfg()
783 nh->nh_via_table = cfg->rc_via_table; in mpls_nh_build_from_cfg()
784 memcpy(__mpls_nh_via(rt, nh), cfg->rc_via, cfg->rc_via_alen); in mpls_nh_build_from_cfg()
785 nh->nh_via_alen = cfg->rc_via_alen; in mpls_nh_build_from_cfg()
787 err = mpls_nh_assign_dev(net, rt, nh, cfg->rc_ifindex); in mpls_nh_build_from_cfg()
885 static int mpls_nh_build_multi(struct mpls_route_config *cfg, in mpls_nh_build_multi() argument
889 struct rtnexthop *rtnh = cfg->rc_mp; in mpls_nh_build_multi()
[all …]
/net/caif/
Dcaif_dev.c51 struct cfcnfg *cfg; member
62 return caifn->cfg; in get_cfcnfg()
320 struct cfcnfg *cfg = get_cfcnfg(dev_net(dev)); in caif_enroll_dev() local
348 res = cfcnfg_add_phy_layer(cfg, in caif_enroll_dev()
369 struct cfcnfg *cfg; in caif_device_notify() local
375 cfg = get_cfcnfg(dev_net(dev)); in caif_device_notify()
416 cfcnfg_set_phy_state(cfg, &caifd->layer, true); in caif_device_notify()
430 cfcnfg_set_phy_state(cfg, &caifd->layer, false); in caif_device_notify()
481 cfcnfg_del_phy_layer(cfg, &caifd->layer) != 0) { in caif_device_notify()
513 caifn->cfg = cfcnfg_create(); in caif_init_net()
[all …]
Dcfcnfg.c117 void cfcnfg_remove(struct cfcnfg *cfg) in cfcnfg_remove() argument
120 if (cfg) { in cfcnfg_remove()
123 kfree(cfg->mux); in cfcnfg_remove()
124 cfctrl_remove(cfg->ctrl); in cfcnfg_remove()
125 kfree(cfg); in cfcnfg_remove()
182 struct cfcnfg *cfg = get_cfcnfg(net); in caif_disconnect_client() local
185 cfctrl_cancel_req(cfg->ctrl, adap_layer); in caif_disconnect_client()
189 servl = cfmuxl_remove_uplayer(cfg->mux, channel_id); in caif_disconnect_client()
190 cfctrl_linkdown_req(cfg->ctrl, channel_id, adap_layer); in caif_disconnect_client()
308 struct cfcnfg *cfg = get_cfcnfg(net); in caif_connect_client() local
[all …]
/net/openvswitch/
Dvport-vxlan.c25 __be16 dst_port = vxlan->cfg.dst_port; in vxlan_get_options()
30 if (vxlan->cfg.flags & VXLAN_F_GBP) { in vxlan_get_options()
37 if (vxlan->cfg.flags & VXLAN_F_GBP && in vxlan_get_options()

123