aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-10-22 08:51:43 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-24 06:56:40 -0700
commit959e1781aa230aecc90e4deb80117fd9a53dede7 (patch)
tree623deab93b0a27fe2208d1c1da55741d6cd926bc /net/tipc/bcast.c
parenttipc: simplify bearer level broadcast (diff)
downloadlinux-dev-959e1781aa230aecc90e4deb80117fd9a53dede7.tar.xz
linux-dev-959e1781aa230aecc90e4deb80117fd9a53dede7.zip
tipc: introduce jumbo frame support for broadcast
Until now, we have only been supporting a fix MTU size of 1500 bytes for all broadcast media, irrespective of their actual capability. We now make the broadcast MTU adaptable to the carrying media, i.e., we use the smallest MTU supported by any of the interfaces attached to TIPC. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 74ee09ac430d..d8c399d31288 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -148,9 +148,9 @@ void tipc_bclink_input(struct net *net)
tipc_sk_mcast_rcv(net, &tn->bcbase->arrvq, &tn->bcbase->inputq);
}
-uint tipc_bcast_get_mtu(void)
+int tipc_bcast_get_mtu(struct net *net)
{
- return MAX_PKT_DEFAULT_MCAST;
+ return tipc_link_mtu(tipc_bc_sndlink(net));
}
static u16 bcbuf_acks(struct sk_buff *skb)
@@ -175,7 +175,7 @@ static void tipc_bcbase_select_primary(struct net *net)
{
struct tipc_bc_base *bb = tipc_bc_base(net);
int all_dests = tipc_link_bc_peers(bb->link);
- int i;
+ int i, mtu;
bb->primary_bearer = INVALID_BEARER_ID;
@@ -183,6 +183,13 @@ static void tipc_bcbase_select_primary(struct net *net)
return;
for (i = 0; i < MAX_BEARERS; i++) {
+ if (!bb->dests[i])
+ continue;
+
+ mtu = tipc_bearer_mtu(net, i);
+ if (mtu < tipc_link_mtu(bb->link))
+ tipc_link_set_mtu(bb->link, mtu);
+
if (bb->dests[i] < all_dests)
continue;
@@ -1220,7 +1227,7 @@ int tipc_bcast_init(struct net *net)
bb->node.net = net;
if (!tipc_link_bc_create(&bb->node, 0, 0,
- MAX_PKT_DEFAULT_MCAST,
+ U16_MAX,
BCLINK_WIN_DEFAULT,
0,
&bb->inputq,