aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-06 21:39:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-06 21:39:49 -0400
commit1c8c5a9d38f607c0b6fd12c91cbe1a4418762a21 (patch)
treedcc97181d4d187252e0cc8fdf29d9b365fa3ffd0 /net/tipc/node.c
parent285767604576148fc1be7fcd112e4a90eb0d6ad2 (diff)
parent7170e6045a6a8b33f4fa5753589dc77b16198e2d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) Add Maglev hashing scheduler to IPVS, from Inju Song. 2) Lots of new TC subsystem tests from Roman Mashak. 3) Add TCP zero copy receive and fix delayed acks and autotuning with SO_RCVLOWAT, from Eric Dumazet. 4) Add XDP_REDIRECT support to mlx5 driver, from Jesper Dangaard Brouer. 5) Add ttl inherit support to vxlan, from Hangbin Liu. 6) Properly separate ipv6 routes into their logically independant components. fib6_info for the routing table, and fib6_nh for sets of nexthops, which thus can be shared. From David Ahern. 7) Add bpf_xdp_adjust_tail helper, which can be used to generate ICMP messages from XDP programs. From Nikita V. Shirokov. 8) Lots of long overdue cleanups to the r8169 driver, from Heiner Kallweit. 9) Add BTF ("BPF Type Format"), from Martin KaFai Lau. 10) Add traffic condition monitoring to iwlwifi, from Luca Coelho. 11) Plumb extack down into fib_rules, from Roopa Prabhu. 12) Add Flower classifier offload support to igb, from Vinicius Costa Gomes. 13) Add UDP GSO support, from Willem de Bruijn. 14) Add documentation for eBPF helpers, from Quentin Monnet. 15) Add TLS tx offload to mlx5, from Ilya Lesokhin. 16) Allow applications to be given the number of bytes available to read on a socket via a control message returned from recvmsg(), from Soheil Hassas Yeganeh. 17) Add x86_32 eBPF JIT compiler, from Wang YanQing. 18) Add AF_XDP sockets, with zerocopy support infrastructure as well. From Björn Töpel. 19) Remove indirect load support from all of the BPF JITs and handle these operations in the verifier by translating them into native BPF instead. From Daniel Borkmann. 20) Add GRO support to ipv6 gre tunnels, from Eran Ben Elisha. 21) Allow XDP programs to do lookups in the main kernel routing tables for forwarding. From David Ahern. 22) Allow drivers to store hardware state into an ELF section of kernel dump vmcore files, and use it in cxgb4. From Rahul Lakkireddy. 23) Various RACK and loss detection improvements in TCP, from Yuchung Cheng. 24) Add TCP SACK compression, from Eric Dumazet. 25) Add User Mode Helper support and basic bpfilter infrastructure, from Alexei Starovoitov. 26) Support ports and protocol values in RTM_GETROUTE, from Roopa Prabhu. 27) Support bulking in ->ndo_xdp_xmit() API, from Jesper Dangaard Brouer. 28) Add lots of forwarding selftests, from Petr Machata. 29) Add generic network device failover driver, from Sridhar Samudrala. * ra.kernel.org:/pub/scm/linux/kernel/git/davem/net-next: (1959 commits) strparser: Add __strp_unpause and use it in ktls. rxrpc: Fix terminal retransmission connection ID to include the channel net: hns3: Optimize PF CMDQ interrupt switching process net: hns3: Fix for VF mailbox receiving unknown message net: hns3: Fix for VF mailbox cannot receiving PF response bnx2x: use the right constant Revert "net: sched: cls: Fix offloading when ingress dev is vxlan" net: dsa: b53: Fix for brcm tag issue in Cygnus SoC enic: fix UDP rss bits netdev-FAQ: clarify DaveM's position for stable backports rtnetlink: validate attributes in do_setlink() mlxsw: Add extack messages for port_{un, }split failures netdevsim: Add extack error message for devlink reload devlink: Add extack to reload and port_{un, }split operations net: metrics: add proper netlink validation ipmr: fix error path when ipmr_new_table fails ip6mr: only set ip6mr_table from setsockopt when ip6mr_new_table succeeds net: hns3: remove unused hclgevf_cfg_func_mta_filter netfilter: provide udp*_lib_lookup for nf_tproxy qed*: Utilize FW 8.37.2.0 ...
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index f29549de9245..6a44eb812baf 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -195,6 +195,27 @@ int tipc_node_get_mtu(struct net *net, u32 addr, u32 sel)
195 return mtu; 195 return mtu;
196} 196}
197 197
198bool tipc_node_get_id(struct net *net, u32 addr, u8 *id)
199{
200 u8 *own_id = tipc_own_id(net);
201 struct tipc_node *n;
202
203 if (!own_id)
204 return true;
205
206 if (addr == tipc_own_addr(net)) {
207 memcpy(id, own_id, TIPC_NODEID_LEN);
208 return true;
209 }
210 n = tipc_node_find(net, addr);
211 if (!n)
212 return false;
213
214 memcpy(id, &n->peer_id, TIPC_NODEID_LEN);
215 tipc_node_put(n);
216 return true;
217}
218
198u16 tipc_node_get_capabilities(struct net *net, u32 addr) 219u16 tipc_node_get_capabilities(struct net *net, u32 addr)
199{ 220{
200 struct tipc_node *n; 221 struct tipc_node *n;
@@ -1681,7 +1702,8 @@ discard:
1681 kfree_skb(skb); 1702 kfree_skb(skb);
1682} 1703}
1683 1704
1684void tipc_node_apply_tolerance(struct net *net, struct tipc_bearer *b) 1705void tipc_node_apply_property(struct net *net, struct tipc_bearer *b,
1706 int prop)
1685{ 1707{
1686 struct tipc_net *tn = tipc_net(net); 1708 struct tipc_net *tn = tipc_net(net);
1687 int bearer_id = b->identity; 1709 int bearer_id = b->identity;
@@ -1696,8 +1718,13 @@ void tipc_node_apply_tolerance(struct net *net, struct tipc_bearer *b)
1696 list_for_each_entry_rcu(n, &tn->node_list, list) { 1718 list_for_each_entry_rcu(n, &tn->node_list, list) {
1697 tipc_node_write_lock(n); 1719 tipc_node_write_lock(n);
1698 e = &n->links[bearer_id]; 1720 e = &n->links[bearer_id];
1699 if (e->link) 1721 if (e->link) {
1700 tipc_link_set_tolerance(e->link, b->tolerance, &xmitq); 1722 if (prop == TIPC_NLA_PROP_TOL)
1723 tipc_link_set_tolerance(e->link, b->tolerance,
1724 &xmitq);
1725 else if (prop == TIPC_NLA_PROP_MTU)
1726 tipc_link_set_mtu(e->link, b->mtu);
1727 }
1701 tipc_node_write_unlock(n); 1728 tipc_node_write_unlock(n);
1702 tipc_bearer_xmit(net, bearer_id, &xmitq, &e->maddr); 1729 tipc_bearer_xmit(net, bearer_id, &xmitq, &e->maddr);
1703 } 1730 }