Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335784
b: refs/heads/master
c: a8203d3
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Nov 16, 2012
1 parent 2ef2132 commit 78e6a1b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26c6e80892d8c160dffaba85889bd4e65b1dacf6
refs/heads/master: a8203d3ccd7796675739aaa50f708a047601eed2
12 changes: 6 additions & 6 deletions trunk/net/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,19 +325,19 @@ void batadv_interface_rx(struct net_device *soft_iface,

soft_iface->last_rx = jiffies;

/* Let the bridge loop avoidance check the packet. If will
* not handle it, we can safely push it up.
*/
if (batadv_bla_rx(bat_priv, skb, vid, is_bcast))
goto out;

if (orig_node)
batadv_tt_add_temporary_global_entry(bat_priv, orig_node,
ethhdr->h_source);

if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest))
goto dropped;

/* Let the bridge loop avoidance check the packet. If will
* not handle it, we can safely push it up.
*/
if (batadv_bla_rx(bat_priv, skb, vid, is_bcast))
goto out;

netif_rx(skb);
goto out;

Expand Down
15 changes: 14 additions & 1 deletion trunk/net/batman-adv/translation-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv,
*/
tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP;

/* the change can carry possible "attribute" flags like the
* TT_CLIENT_WIFI, therefore they have to be copied in the
* client entry
*/
tt_global_entry->common.flags |= flags;

/* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only
* one originator left in the list and we previously received a
* delete + roaming change for this originator.
Expand Down Expand Up @@ -1496,7 +1502,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,

memcpy(tt_change->addr, tt_common_entry->addr,
ETH_ALEN);
tt_change->flags = BATADV_NO_FLAGS;
tt_change->flags = tt_common_entry->flags;

tt_count++;
tt_change++;
Expand Down Expand Up @@ -2450,6 +2456,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv,
{
bool ret = false;

/* if the originator is a backbone node (meaning it belongs to the same
* LAN of this node) the temporary client must not be added because to
* reach such destination the node must use the LAN instead of the mesh
*/
if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig))
goto out;

if (!batadv_tt_global_add(bat_priv, orig_node, addr,
BATADV_TT_CLIENT_TEMP,
atomic_read(&orig_node->last_ttvn)))
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2818,8 +2818,10 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,
if (unlikely(tcpu != next_cpu) &&
(tcpu == RPS_NO_CPU || !cpu_online(tcpu) ||
((int)(per_cpu(softnet_data, tcpu).input_queue_head -
rflow->last_qtail)) >= 0))
rflow->last_qtail)) >= 0)) {
tcpu = next_cpu;
rflow = set_rps_cpu(dev, skb, rflow, next_cpu);
}

if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) {
*rflowp = rflow;
Expand Down
12 changes: 9 additions & 3 deletions trunk/net/ipv4/tcp_metrics.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
#include <linux/jiffies.h>
#include <linux/bootmem.h>
#include <linux/module.h>
#include <linux/cache.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/tcp.h>
#include <linux/hash.h>
#include <linux/tcp_metrics.h>
#include <linux/vmalloc.h>

#include <net/inet_connection_sock.h>
#include <net/net_namespace.h>
Expand Down Expand Up @@ -1034,7 +1034,10 @@ static int __net_init tcp_net_metrics_init(struct net *net)
net->ipv4.tcp_metrics_hash_log = order_base_2(slots);
size = sizeof(struct tcpm_hash_bucket) << net->ipv4.tcp_metrics_hash_log;

net->ipv4.tcp_metrics_hash = kzalloc(size, GFP_KERNEL);
net->ipv4.tcp_metrics_hash = kzalloc(size, GFP_KERNEL | __GFP_NOWARN);
if (!net->ipv4.tcp_metrics_hash)
net->ipv4.tcp_metrics_hash = vzalloc(size);

if (!net->ipv4.tcp_metrics_hash)
return -ENOMEM;

Expand All @@ -1055,7 +1058,10 @@ static void __net_exit tcp_net_metrics_exit(struct net *net)
tm = next;
}
}
kfree(net->ipv4.tcp_metrics_hash);
if (is_vmalloc_addr(net->ipv4.tcp_metrics_hash))
vfree(net->ipv4.tcp_metrics_hash);
else
kfree(net->ipv4.tcp_metrics_hash);
}

static __net_initdata struct pernet_operations tcp_net_metrics_ops = {
Expand Down

0 comments on commit 78e6a1b

Please sign in to comment.