Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264176
b: refs/heads/master
c: b582ad8
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Sep 28, 2011
1 parent d8c9ffd commit 35a780a
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 17 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: a8acfd82ebefbb32f12f413019e53f9e939cf44e
refs/heads/master: b582ad8e961c78458005250ae28fdd7a25db55aa
2 changes: 1 addition & 1 deletion trunk/Documentation/networking/scaling.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ configured. The number of entries in the global flow table is set through:

The number of entries in the per-queue flow table are set through:

/sys/class/net/<dev>/queues/tx-<n>/rps_flow_cnt
/sys/class/net/<dev>/queues/rx-<n>/rps_flow_cnt

== Suggested Configuration

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/bnx2x/bnx2x_dcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2120,6 +2120,7 @@ static u8 bnx2x_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap)
break;
case DCB_CAP_ATTR_DCBX:
*cap = BNX2X_DCBX_CAPS;
break;
default:
rval = -EINVAL;
break;
Expand Down
16 changes: 13 additions & 3 deletions trunk/drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4943,7 +4943,7 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
int igu_seg_id;
int port = BP_PORT(bp);
int func = BP_FUNC(bp);
int reg_offset;
int reg_offset, reg_offset_en5;
u64 section;
int index;
struct hc_sp_status_block_data sp_sb_data;
Expand All @@ -4966,6 +4966,8 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)

reg_offset = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 :
MISC_REG_AEU_ENABLE1_FUNC_0_OUT_0);
reg_offset_en5 = (port ? MISC_REG_AEU_ENABLE5_FUNC_1_OUT_0 :
MISC_REG_AEU_ENABLE5_FUNC_0_OUT_0);
for (index = 0; index < MAX_DYNAMIC_ATTN_GRPS; index++) {
int sindex;
/* take care of sig[0]..sig[4] */
Expand All @@ -4980,7 +4982,7 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
* and not 16 between the different groups
*/
bp->attn_group[index].sig[4] = REG_RD(bp,
reg_offset + 0x10 + 0x4*index);
reg_offset_en5 + 0x4*index);
else
bp->attn_group[index].sig[4] = 0;
}
Expand Down Expand Up @@ -7625,8 +7627,11 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
u32 emac_base = port ? GRCBASE_EMAC1 : GRCBASE_EMAC0;
u8 *mac_addr = bp->dev->dev_addr;
u32 val;
u16 pmc;

/* The mac address is written to entries 1-4 to
preserve entry 0 which is used by the PMF */
* preserve entry 0 which is used by the PMF
*/
u8 entry = (BP_VN(bp) + 1)*8;

val = (mac_addr[0] << 8) | mac_addr[1];
Expand All @@ -7636,6 +7641,11 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
(mac_addr[4] << 8) | mac_addr[5];
EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + entry + 4, val);

/* Enable the PME and clear the status */
pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmc);
pmc |= PCI_PM_CTRL_PME_ENABLE | PCI_PM_CTRL_PME_STATUS;
pci_write_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, pmc);

reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_EN;

} else
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/net/bnx2x/bnx2x_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,18 @@
Latched ump_tx_parity; [31] MCP Latched scpad_parity; */
#define MISC_REG_AEU_ENABLE4_PXP_0 0xa108
#define MISC_REG_AEU_ENABLE4_PXP_1 0xa1a8
/* [RW 32] fifth 32b for enabling the output for function 0 output0. Mapped
* as follows: [0] PGLUE config_space; [1] PGLUE misc_flr; [2] PGLUE B RBC
* attention [3] PGLUE B RBC parity; [4] ATC attention; [5] ATC parity; [6]
* mstat0 attention; [7] mstat0 parity; [8] mstat1 attention; [9] mstat1
* parity; [31-10] Reserved; */
#define MISC_REG_AEU_ENABLE5_FUNC_0_OUT_0 0xa688
/* [RW 32] Fifth 32b for enabling the output for function 1 output0. Mapped
* as follows: [0] PGLUE config_space; [1] PGLUE misc_flr; [2] PGLUE B RBC
* attention [3] PGLUE B RBC parity; [4] ATC attention; [5] ATC parity; [6]
* mstat0 attention; [7] mstat0 parity; [8] mstat1 attention; [9] mstat1
* parity; [31-10] Reserved; */
#define MISC_REG_AEU_ENABLE5_FUNC_1_OUT_0 0xa6b0
/* [RW 1] set/clr general attention 0; this will set/clr bit 94 in the aeu
128 bit vector */
#define MISC_REG_AEU_GENERAL_ATTN_0 0xa000
Expand Down
10 changes: 5 additions & 5 deletions trunk/net/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
struct orig_node *orig_node = NULL;
int data_len = skb->len, ret;
short vid = -1;
bool do_bcast = false;
bool do_bcast;

if (atomic_read(&bat_priv->mesh_state) != MESH_ACTIVE)
goto dropped;
Expand Down Expand Up @@ -598,15 +598,15 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
tt_local_add(soft_iface, ethhdr->h_source);

orig_node = transtable_search(bat_priv, ethhdr->h_dest);
if (is_multicast_ether_addr(ethhdr->h_dest) ||
(orig_node && orig_node->gw_flags)) {
do_bcast = is_multicast_ether_addr(ethhdr->h_dest);
if (do_bcast || (orig_node && orig_node->gw_flags)) {
ret = gw_is_target(bat_priv, skb, orig_node);

if (ret < 0)
goto dropped;

if (ret == 0)
do_bcast = true;
if (ret)
do_bcast = false;
}

/* ethernet packet should be broadcasted */
Expand Down
8 changes: 6 additions & 2 deletions trunk/net/ipv6/ip6mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,10 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb,
int err;

err = ip6mr_fib_lookup(net, &fl6, &mrt);
if (err < 0)
if (err < 0) {
kfree_skb(skb);
return err;
}

read_lock(&mrt_lock);
dev->stats.tx_bytes += skb->len;
Expand Down Expand Up @@ -2052,8 +2054,10 @@ int ip6_mr_input(struct sk_buff *skb)
int err;

err = ip6mr_fib_lookup(net, &fl6, &mrt);
if (err < 0)
if (err < 0) {
kfree_skb(skb);
return err;
}

read_lock(&mrt_lock);
cache = ip6mr_cache_find(mrt,
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ static inline struct rt6_info *ip6_dst_alloc(struct dst_ops *ops,
{
struct rt6_info *rt = dst_alloc(ops, dev, 0, 0, flags);

memset(&rt->rt6i_table, 0, sizeof(*rt) - sizeof(struct dst_entry));
if (rt != NULL)
memset(&rt->rt6i_table, 0,
sizeof(*rt) - sizeof(struct dst_entry));

return rt;
}
Expand Down
10 changes: 6 additions & 4 deletions trunk/net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,14 +1349,16 @@ static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family)
BUG();
}
xdst = dst_alloc(dst_ops, NULL, 0, 0, 0);
memset(&xdst->u.rt6.rt6i_table, 0, sizeof(*xdst) - sizeof(struct dst_entry));
xfrm_policy_put_afinfo(afinfo);

if (likely(xdst))
if (likely(xdst)) {
memset(&xdst->u.rt6.rt6i_table, 0,
sizeof(*xdst) - sizeof(struct dst_entry));
xdst->flo.ops = &xfrm_bundle_fc_ops;
else
} else
xdst = ERR_PTR(-ENOBUFS);

xfrm_policy_put_afinfo(afinfo);

return xdst;
}

Expand Down

0 comments on commit 35a780a

Please sign in to comment.