GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
13 years agostmmac: remove warning when compile as built-in (V2)
Giuseppe CAVALLARO [Wed, 20 Jul 2011 00:05:22 +0000 (00:05 +0000)]
stmmac: remove warning when compile as built-in (V2)

The patch removes the following serie of warnings
when the driver is compiled as built-in:

drivers/net/stmmac/stmmac_main.c: In function stmmac_cmdline_opt:
drivers/net/stmmac/stmmac_main.c:1855:12: warning: ignoring return
value of kstrtoul, declared with attribute warn_unused_result
[snip]

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostmmac: update the version (V2)
Giuseppe CAVALLARO [Wed, 20 Jul 2011 00:05:21 +0000 (00:05 +0000)]
stmmac: update the version (V2)

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Allow zero-length register dumps again
Ben Hutchings [Thu, 21 Jul 2011 22:25:30 +0000 (15:25 -0700)]
ethtool: Allow zero-length register dumps again

Some drivers (ab)use the ethtool_ops::get_regs operation to expose
only a hardware revision ID.  Commit
a77f5db361ed9953b5b749353ea2c7fed2bf8d93 ('ethtool: Allocate register
dump buffer with vmalloc()') had the side-effect of breaking these, as
vmalloc() returns a null pointer for size=0 whereas kmalloc() did not.

For backward-compatibility, allow zero-length dumps again.

Reported-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Cc: stable@kernel.org [2.6.37+]
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoskbuff: fix error handling in pskb_copy()
Dan Carpenter [Tue, 19 Jul 2011 22:51:49 +0000 (22:51 +0000)]
skbuff: fix error handling in pskb_copy()

There are two problems:
1) "n" was allocated with alloc_skb() so we should free it with
   kfree_skb() instead of regular kfree().
2) We return the freed pointer instead of NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: move vlan_group_[gs]et_device to public header
Jiri Pirko [Wed, 20 Jul 2011 04:54:49 +0000 (04:54 +0000)]
vlan: move vlan_group_[gs]et_device to public header

there are no users outside vlan code

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: kill ndo_vlan_rx_register
Jiri Pirko [Wed, 20 Jul 2011 04:54:48 +0000 (04:54 +0000)]
vlan: kill ndo_vlan_rx_register

has no users so remove it

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomacvlan: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:47 +0000 (04:54 +0000)]
macvlan: do vlan cleanup

ndo_vlan_rx_register is no longer in use in any driver so remove it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:46 +0000 (04:54 +0000)]
bonding: do vlan cleanup

Now when all devices are cleaned up, bond can be cleaned up as well

- remove bond->vlgrp
- remove bond_vlan_rx_register
- substitute necessary occurences of vlan_group_get_device

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostaging: et131x: remove unused prototype et131x_vlan_rx_register
Jiri Pirko [Wed, 20 Jul 2011 04:54:45 +0000 (04:54 +0000)]
staging: et131x: remove unused prototype et131x_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: remove usage of vlan_group_get_device
Jiri Pirko [Wed, 20 Jul 2011 04:54:44 +0000 (04:54 +0000)]
qlcnic: remove usage of vlan_group_get_device

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostmmac: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:43 +0000 (04:54 +0000)]
stmmac: do vlan cleanup

- kill priv->vlgrp and stmmac_vlan_rx_register (used for nothing :))

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: kill vlan_gro_frags and vlan_gro_receive
Jiri Pirko [Wed, 20 Jul 2011 04:54:42 +0000 (04:54 +0000)]
vlan: kill vlan_gro_frags and vlan_gro_receive

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:41 +0000 (04:54 +0000)]
qeth: do vlan cleanup

- unify vlan and nonvlan rx path
- kill card->vlangrp and qeth_l3_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:40 +0000 (04:54 +0000)]
vxge: do vlan cleanup

- unify vlan and nonvlan rx path
- kill vdev->vlgrp and vxge_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: do vlan cleanup
Jiri Pirko [Thu, 21 Jul 2011 03:27:27 +0000 (03:27 +0000)]
igb: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and igb_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoforcedeth: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:38 +0000 (04:54 +0000)]
forcedeth: do vlan cleanup

- unify vlan and nonvlan rx path
- kill np->vlangrp and nv_vlan_rx_register
- allow to turn on/off rx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoe1000: do vlan cleanup
Jiri Pirko [Thu, 21 Jul 2011 03:26:31 +0000 (03:26 +0000)]
e1000: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and e1000_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: kill __vlan_hwaccel_rx and vlan_hwaccel_rx
Jiri Pirko [Wed, 20 Jul 2011 04:54:36 +0000 (04:54 +0000)]
vlan: kill __vlan_hwaccel_rx and vlan_hwaccel_rx

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb3: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:35 +0000 (04:54 +0000)]
cxgb3: do vlan cleanup

- unify vlan and nonvlan rx path
- kill pi->vlan_grp and vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl2: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:34 +0000 (04:54 +0000)]
atl2: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and atl2_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl1: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:33 +0000 (04:54 +0000)]
atl1: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and atlx_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agons83820: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:32 +0000 (04:54 +0000)]
ns83820: do vlan cleanup

- unify vlan and nonvlan rx path
- kill dev->vlgrp and ns83820_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostarfire: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:31 +0000 (04:54 +0000)]
starfire: do vlan cleanup

- unify vlan and nonvlan rx path
- kill np->vlgrp and netdev_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovia-velocity: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:30 +0000 (04:54 +0000)]
via-velocity: do vlan cleanup

- unify vlan and nonvlan rx path
- kill vptr->vlgrp and velocity_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoacenic: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:29 +0000 (04:54 +0000)]
acenic: do vlan cleanup

- unify vlan and nonvlan rx path
- kill ap->vlgrp and ace_vlan_rx_register
- enable vlan hw accel always (kill vlan ifdefs)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbevf: do vlan cleanup
Jiri Pirko [Thu, 21 Jul 2011 03:25:09 +0000 (03:25 +0000)]
ixgbevf: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and ixgbevf_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: kill vlan_hwaccel_receive_skb
Jiri Pirko [Wed, 20 Jul 2011 04:54:27 +0000 (04:54 +0000)]
vlan: kill vlan_hwaccel_receive_skb

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotehuti: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:26 +0000 (04:54 +0000)]
tehuti: do vlan cleanup

- unify vlan and nonvlan rx path
- kill priv->vlgrp and bdx_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agospider_net: do not mention dying vlan_hwaccel_receive_skb
Jiri Pirko [Wed, 20 Jul 2011 04:54:25 +0000 (04:54 +0000)]
spider_net: do not mention dying vlan_hwaccel_receive_skb

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:24 +0000 (04:54 +0000)]
s2io: do vlan cleanup

- unify vlan and nonvlan rx path
- kill sp->vlgrp and s2io_vlan_rx_register and s2io_vlan_rx_kill_vid
(which does nothing and is never called :))

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: do vlan cleanup
Jiri Pirko [Thu, 21 Jul 2011 03:24:11 +0000 (03:24 +0000)]
qlge: do vlan cleanup

- unify vlan and nonvlan path
- kill qdev->vlgrp and qlge_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomlx4: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:22 +0000 (04:54 +0000)]
mlx4: do vlan cleanup

- unify vlan and nonvlan path
- kill priv->vlgrp and mlx4_en_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:21 +0000 (04:54 +0000)]
jme: do vlan cleanup

- unify vlan and nonvlan rx path
- kill jme->vlgrp and jme_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigbvf: do vlan cleanup
Jiri Pirko [Thu, 21 Jul 2011 06:30:00 +0000 (06:30 +0000)]
igbvf: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and igbvf_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agogianfar: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:19 +0000 (04:54 +0000)]
gianfar: do vlan cleanup

- unify vlan and nonvlan rx path
- kill priv->vlgrp and gfar_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:18 +0000 (04:54 +0000)]
enic: do vlan cleanup

- unify vlan and nonvlan rx path
- kill enic->vlan_group and enic_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: remove forgotten unused vlan_group
Jiri Pirko [Wed, 20 Jul 2011 04:54:17 +0000 (04:54 +0000)]
cxgb4: remove forgotten unused vlan_group

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:16 +0000 (04:54 +0000)]
cxgb4vf: do vlan cleanup

- unify vlan and nonvlan rx path
- kill pi->vlan_grp and cxgb4vf_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agochelsio: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:15 +0000 (04:54 +0000)]
chelsio: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlan_grp and t1_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnad: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:14 +0000 (04:54 +0000)]
bnad: do vlan cleanup

- unify vlan and nonvlan rx path
- kill bnad->vlan_grp and bnad_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl1e: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:13 +0000 (04:54 +0000)]
atl1e: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and atl1e_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl1c: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:12 +0000 (04:54 +0000)]
atl1c: do vlan cleanup

- unify vlan and nonvlan rx path
- kill adapter->vlgrp and atl1c_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoamd8111e: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:11 +0000 (04:54 +0000)]
amd8111e: do vlan cleanup

- unify vlan and nonvlan rx path
- kill lp->vlgrp and amd8111e_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agolro: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:10 +0000 (04:54 +0000)]
lro: do vlan cleanup

- remove useless vlan parameters and pointers

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agolro: kill lro_vlan_hwaccel_receive_frags
Jiri Pirko [Wed, 20 Jul 2011 04:54:09 +0000 (04:54 +0000)]
lro: kill lro_vlan_hwaccel_receive_frags

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agolro: kill lro_vlan_hwaccel_receive_skb
Jiri Pirko [Wed, 20 Jul 2011 04:54:08 +0000 (04:54 +0000)]
lro: kill lro_vlan_hwaccel_receive_skb

no longer used

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoehea: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:07 +0000 (04:54 +0000)]
ehea: do vlan cleanup

- unify vlan and nonvlan rx path
- kill port->vgrp and ehea_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agones: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:06 +0000 (04:54 +0000)]
nes: do vlan cleanup

- unify vlan and nonvlan rx path
- kill nesvnic->vlan_grp and nes_netdev_vlan_rx_register
- allow to turn on/off rx/tx vlan accel via ethtool (set_features)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: introduce __vlan_find_dev_deep()
Jiri Pirko [Wed, 20 Jul 2011 04:54:05 +0000 (04:54 +0000)]
vlan: introduce __vlan_find_dev_deep()

Since vlan_group_get_device and vlan_group is not going to be accessible
from device drivers, introduce function which substitutes it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: finish removing vlan_find_dev from public header
Jiri Pirko [Wed, 20 Jul 2011 04:54:04 +0000 (04:54 +0000)]
vlan: finish removing vlan_find_dev from public header

else case remained forgotten.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 21 Jul 2011 20:38:42 +0000 (13:38 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
net/bluetooth/l2cap_core.c

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Thu, 21 Jul 2011 19:39:35 +0000 (12:39 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

13 years agonet: filter: BPF 'JIT' compiler for PPC64
Matt Evans [Wed, 20 Jul 2011 15:51:00 +0000 (15:51 +0000)]
net: filter: BPF 'JIT' compiler for PPC64

An implementation of a code generator for BPF programs to speed up packet
filtering on PPC64, inspired by Eric Dumazet's x86-64 version.

Filter code is generated as an ABI-compliant function in module_alloc()'d mem
with stackframe & prologue/epilogue generated if required (simple filters don't
need anything more than an li/blr).  The filter's local variables, M[], live in
registers.  Supports all BPF opcodes, although "complicated" loads from negative
packet offsets (e.g. SKF_LL_OFF) are not yet supported.

There are a couple of further optimisations left for future work; many-pass
assembly with branch-reach reduction and a register allocator to push M[]
variables into volatile registers would improve the code quality further.

This currently supports big-endian 64-bit PowerPC only (but is fairly simple
to port to PPC32 or LE!).

Enabled in the same way as x86-64:

echo 1 > /proc/sys/net/core/bpf_jit_enable

Or, enabled with extra debug output:

echo 2 > /proc/sys/net/core/bpf_jit_enable

Signed-off-by: Matt Evans <matt@ozlabs.org>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Fix endian swapping on firmware version string
Michael Chan [Wed, 20 Jul 2011 14:55:25 +0000 (14:55 +0000)]
bnx2: Fix endian swapping on firmware version string

so that ethtool -i will display it correctly on big endian systems.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Add VLAN ID as a parameter during netevent upcall
Michael Chan [Wed, 20 Jul 2011 14:55:24 +0000 (14:55 +0000)]
cnic: Add VLAN ID as a parameter during netevent upcall

The bnx2fc driver needs to handle netdev events on VLAN devices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Wait for all Context IDs to be deleted before sending FCOE_DESTROY_FUNC
Michael Chan [Wed, 20 Jul 2011 14:55:23 +0000 (14:55 +0000)]
cnic: Wait for all Context IDs to be deleted before sending FCOE_DESTROY_FUNC

Otherwise, the firmware will not respond and we'll have to wait for
timeout.  Refactor the wait loop we already have into a separate
function for this purpose.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Fix Context ID space calculation
Michael Chan [Wed, 20 Jul 2011 14:55:22 +0000 (14:55 +0000)]
cnic: Fix Context ID space calculation

Include FCoE CID space only for E2_PLUS devices.  Remove old CID
offset adjustments that are no longer needed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Fix NVRAM selftest failures for 5720 devs
Matt Carlson [Wed, 20 Jul 2011 10:20:57 +0000 (10:20 +0000)]
tg3: Fix NVRAM selftest failures for 5720 devs

This patch fixes NVRAM selftest failures for 5720 devices by fixing the
checksum area size.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Return size from tg3_vpd_readblock()
Matt Carlson [Wed, 20 Jul 2011 10:20:56 +0000 (10:20 +0000)]
tg3: Return size from tg3_vpd_readblock()

Newer VPD datablocks can exceed the size the tg3 driver is traditionally
used to.  This can cause some of the routines that operate on the VPD
data to fail when in-fact they could have succeeded had they known the
correct size.  This patch fixes the problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Fix int selftest for recent devices.
Matt Carlson [Wed, 20 Jul 2011 10:20:55 +0000 (10:20 +0000)]
tg3: Fix int selftest for recent devices.

This patch fixes interrupt selftest failures for recent devices (57765,
5717, 5718. 5719, 5720) by disabling MSI one-shot mode and applying the
status tag workaround to the selftest code.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Fix RSS indirection table distribution
Matt Carlson [Wed, 20 Jul 2011 10:20:54 +0000 (10:20 +0000)]
tg3: Fix RSS indirection table distribution

The current RSS indirection table is populated such that more traffic
will hit the first RSS ring.  This patch adjusts the indirection table
so that the load is more evenly distributed.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5719 and 5720 to EEE_CAP list
Matt Carlson [Wed, 20 Jul 2011 10:20:53 +0000 (10:20 +0000)]
tg3: Add 5719 and 5720 to EEE_CAP list

This patch adds the 5719 and the 5720 to the list of devices that are
EEE capable.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Fix link down notify failure when EEE disabled
Matt Carlson [Wed, 20 Jul 2011 10:20:52 +0000 (10:20 +0000)]
tg3: Fix link down notify failure when EEE disabled

Occasionally, when the network cable is removed after a successful
autonegotiation, the device will not send a link down interrupt to the
driver.  This happens because of a bad interaction of an EEE
workaround.  The fix is to adjust the code so that the root cause
condition does not happen.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Fix link flap at 100Mbps with EEE enabled
Matt Carlson [Wed, 20 Jul 2011 10:20:51 +0000 (10:20 +0000)]
tg3: Fix link flap at 100Mbps with EEE enabled

This patch increases the scope of the EEE interoperability workaround
to include more asic revisions.  The workarond value is tuned to
workaround a link flap issue at 100Mbps.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Fix io failures after chip reset
Matt Carlson [Wed, 20 Jul 2011 10:20:50 +0000 (10:20 +0000)]
tg3: Fix io failures after chip reset

Commit f2096f94b514d88593355995d5dd276961e88af1, entitled
"tg3: Add 5720 H2BMC support", needed to add code to preserve some bits
set by firmware.  Unfortunately the new code causes throughput to stop
after a chip reset because it enables state machines before they are
ready.  This patch undoes the problematic code.  The bits will be
restored later in the init sequence.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Broken self-test in SF mode on 578xx
Vladislav Zolotarov [Thu, 21 Jul 2011 07:58:54 +0000 (07:58 +0000)]
bnx2x: Broken self-test in SF mode on 578xx

This patch fixes both the failure in the self-test on 578xx
and a hole in a parity recovery flow that this failure
has discovered:
 - internal 'pending' state in a VLAN_MAC object wasn't been cleared
when the object state change was called with DRV_ONLY flag, which in
particular happens when a parity error happens during the self-test.
 - bp->sp_state wasn't cleared in the similar circumstances as described
above.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Parity errors recovery for 578xx
Vladislav Zolotarov [Thu, 21 Jul 2011 07:58:36 +0000 (07:58 +0000)]
bnx2x: Parity errors recovery for 578xx

Fix the parity errors recovery flow for 578xx:
    - Add a separate column for the 578xx in the parity mask
      registers DB.
    - Fix the bnx2x_process_kill_chip_reset() to handle the blocks
      newly introduced in the 578xx.

Cover ATC and PGLUE_B blocks for 57712 and 578xx.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Read FIP mac from SHMEM in single function mode
Vladislav Zolotarov [Thu, 21 Jul 2011 07:57:52 +0000 (07:57 +0000)]
bnx2x: Read FIP mac from SHMEM in single function mode

Read FIP MAC address from SHMEM's "port" section
similar to what we do in a MF mode when we read it from
a "func" section of SHMEM.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Fixed ethtool -d for 578xx
Vladislav Zolotarov [Thu, 21 Jul 2011 07:57:23 +0000 (07:57 +0000)]
bnx2x: Fixed ethtool -d for 578xx

Registers dump code erroneously treated 578xx as 57712.
This patch fixes the above and also removes unused data
structures.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Implementation for netdev->ndo_fcoe_get_wwn
Vladislav Zolotarov [Thu, 21 Jul 2011 07:56:51 +0000 (07:56 +0000)]
bnx2x: Implementation for netdev->ndo_fcoe_get_wwn

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: ipset: fix compiler warnings "'hash_ip4_data_next' declared inline after...
Chris Friesen [Thu, 21 Jul 2011 10:07:10 +0000 (12:07 +0200)]
netfilter: ipset: fix compiler warnings "'hash_ip4_data_next' declared inline after being called"

Some gcc versions warn about prototypes without "inline" when the declaration
includes the "inline" keyword. The fix generates a false error message
"marked inline, but without a definition" with sparse below 0.4.2.

Signed-off-by: Chris Friesen <chris.friesen@genband.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: ipset: hash:net,iface fixed to handle overlapping nets behind different...
Jozsef Kadlecsik [Thu, 21 Jul 2011 10:06:18 +0000 (12:06 +0200)]
netfilter: ipset: hash:net,iface fixed to handle overlapping nets behind different interfaces

If overlapping networks with different interfaces was added to
the set, the type did not handle it properly. Example

    ipset create test hash:net,iface
    ipset add test 192.168.0.0/16,eth0
    ipset add test 192.168.0.0/24,eth1

Now, if a packet was sent from 192.168.0.0/24,eth0, the type returned
a match.

In the patch the algorithm is fixed in order to correctly handle
overlapping networks.

Limitation: the same network cannot be stored with more than 64 different
interfaces in a single set.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: ipset: make possible to hash some part of the data element only
Jozsef Kadlecsik [Thu, 21 Jul 2011 10:05:31 +0000 (12:05 +0200)]
netfilter: ipset: make possible to hash some part of the data element only

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Wed, 20 Jul 2011 05:10:28 +0000 (22:10 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: fix file mode calculation

13 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
Linus Torvalds [Wed, 20 Jul 2011 05:10:05 +0000 (22:10 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/arm/linux-arm-soc

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc:
  davinci: DM365 EVM: fix video input mux bits
  ARM: davinci: Check for NULL return from irq_alloc_generic_chip
  arm: davinci: Fix low level gpio irq handlers' argument

13 years agovmscan: fix a livelock in kswapd
Shaohua Li [Tue, 19 Jul 2011 15:49:26 +0000 (08:49 -0700)]
vmscan: fix a livelock in kswapd

I'm running a workload which triggers a lot of swap in a machine with 4
nodes.  After I kill the workload, I found a kswapd livelock.  Sometimes
kswapd3 or kswapd2 are keeping running and I can't access filesystem,
but most memory is free.

This looks like a regression since commit 08951e545918c159 ("mm: vmscan:
correct check for kswapd sleeping in sleeping_prematurely").

Node 2 and 3 have only ZONE_NORMAL, but balance_pgdat() will return 0
for classzone_idx.  The reason is end_zone in balance_pgdat() is 0 by
default, if all zones have watermark ok, end_zone will keep 0.

Later sleeping_prematurely() always returns true.  Because this is an
order 3 wakeup, and if classzone_idx is 0, both balanced_pages and
present_pages in pgdat_balanced() are 0.  We add a special case here.
If a zone has no page, we think it's balanced.  This fixes the livelock.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofs/libfs.c: fix simple_attr_write() on 32bit machines
Akinobu Mita [Tue, 19 Jul 2011 15:49:25 +0000 (08:49 -0700)]
fs/libfs.c: fix simple_attr_write() on 32bit machines

Assume that /sys/kernel/debug/dummy64 is debugfs file created by
debugfs_create_x64().

# cd /sys/kernel/debug
# echo 0x1234567812345678 > dummy64
# cat dummy64
0x0000000012345678

# echo 0x80000000 > dummy64
# cat dummy64
0xffffffff80000000

A value larger than INT_MAX cannot be written to the debugfs file created
by debugfs_create_u64 or debugfs_create_x64 on 32bit machine.  Because
simple_attr_write() uses simple_strtol() for the conversion.

To fix this, use simple_strtoll() instead.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Wed, 20 Jul 2011 04:50:21 +0000 (21:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  vfs: fix race in rcu lookup of pruned dentry
  Fix cifs_get_root()

[ Edited the last commit to get rid of a 'unused variable "seq"'
  warning due to Al editing the patch.  - Linus ]

13 years agovfs: fix race in rcu lookup of pruned dentry
Linus Torvalds [Mon, 18 Jul 2011 22:43:29 +0000 (15:43 -0700)]
vfs: fix race in rcu lookup of pruned dentry

Don't update *inode in __follow_mount_rcu() until we'd verified that
there is mountpoint there.  Kudos to Hugh Dickins for catching that
one in the first place and eventually figuring out the solution (and
catching a braino in the earlier version of patch).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoslcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure
Matvejchikov Ilya [Mon, 18 Jul 2011 21:58:48 +0000 (21:58 +0000)]
slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoslip: remove unused 'line' field from the 'slip' structure
Matvejchikov Ilya [Mon, 18 Jul 2011 21:56:44 +0000 (21:56 +0000)]
slip: remove unused 'line' field from the 'slip' structure

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoceph: fix file mode calculation
Sage Weil [Tue, 19 Jul 2011 18:25:04 +0000 (11:25 -0700)]
ceph: fix file mode calculation

open(2) must always include one of O_RDONLY, O_WRONLY, or O_RDWR.  No need
for any O_APPEND special case.

Passing O_WRONLY|O_RDWR is undefined according to the man page, but the
Linux VFS interprets this as O_RDWR, so we'll do the same.

This fixes open(2) with flags O_RDWR|O_APPEND, which was incorrectly being
translated to readonly.

Reported-by: Fyodor Ustinov <ufm@ufm.su>
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'vhost-net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mst...
David S. Miller [Tue, 19 Jul 2011 17:12:44 +0000 (10:12 -0700)]
Merge branch 'vhost-net-next' of git://git./linux/kernel/git/mst/vhost

13 years agoMerge branch 'davem-next.r8169' of git://git.kernel.org/pub/scm/linux/kernel/git...
David S. Miller [Tue, 19 Jul 2011 17:11:21 +0000 (10:11 -0700)]
Merge branch 'davem-next.r8169' of git://git./linux/kernel/git/romieu/netdev-2.6

13 years agobnx2x: disable FCoE for 578xx devices since not yet supported
Dmitry Kravkov [Tue, 19 Jul 2011 01:46:11 +0000 (01:46 +0000)]
bnx2x: disable FCoE for 578xx devices since not yet supported

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: fix memory barriers
Vladislav Zolotarov [Tue, 19 Jul 2011 01:45:02 +0000 (01:45 +0000)]
bnx2x: fix memory barriers

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: use BNX2X_Q_FLG_TPA_IPV6 for TPA queue configuration
Vladislav Zolotarov [Tue, 19 Jul 2011 01:44:11 +0000 (01:44 +0000)]
bnx2x: use BNX2X_Q_FLG_TPA_IPV6 for TPA queue configuration

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: disable loacal BH when scheduling FCOE napi
Vladislav Zolotarov [Tue, 19 Jul 2011 01:43:25 +0000 (01:43 +0000)]
bnx2x: disable loacal BH when scheduling FCOE napi

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: fix MB index for 4-port devices
Dmitry Kravkov [Tue, 19 Jul 2011 01:42:40 +0000 (01:42 +0000)]
bnx2x: fix MB index for 4-port devices

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: DCB rework
Dmitry Kravkov [Tue, 19 Jul 2011 01:42:04 +0000 (01:42 +0000)]
bnx2x: DCB rework

create DCB related states in function state-machine
allow handling of DCB errors from FW
allow disablement of DCB in FW, when peer disappears or error
clean up unused functions/variables as pointed by
David Binderman <dcb314@hotmail.com>

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: remove unnecessary dma_sync
Vladislav Zolotarov [Tue, 19 Jul 2011 01:40:27 +0000 (01:40 +0000)]
bnx2x: remove unnecessary dma_sync

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: stop tx before CNIC_STOP
Vladislav Zolotarov [Tue, 19 Jul 2011 01:39:41 +0000 (01:39 +0000)]
bnx2x: stop tx before CNIC_STOP

It may take some time to cnic to respond, this prevents tx_timeout
when it happens.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: add missing command in error handling flow
Dmitry Kravkov [Tue, 19 Jul 2011 01:38:53 +0000 (01:38 +0000)]
bnx2x: add missing command in error handling flow

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: use correct dma_sync function
Vladislav Zolotarov [Tue, 19 Jul 2011 01:37:42 +0000 (01:37 +0000)]
bnx2x: use correct dma_sync function

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: fix sticky accepts packet bits in RxConfig.
Francois Romieu [Tue, 19 Jul 2011 15:21:29 +0000 (17:21 +0200)]
r8169: fix sticky accepts packet bits in RxConfig.

e542a2269f232d61270ceddd42b73a4348dee2bb (r8169: adjust the RxConfig settings)
broke the return from promiscuous mode to physical address match mode.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Signed-off-by: Hayes Wang <hayeswang@realtek.com>
13 years agovhost: optimize interrupt enable/disable
Michael S. Tsirkin [Tue, 19 Jul 2011 14:15:43 +0000 (17:15 +0300)]
vhost: optimize interrupt enable/disable

As we now only update used ring after enabling
the backend, we can write flags with __put_user:
as that's done on data path, it matters.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agovhost: fix zcopy reference counting
Michael S. Tsirkin [Tue, 19 Jul 2011 10:19:18 +0000 (13:19 +0300)]
vhost: fix zcopy reference counting

Fix get/put refcount imbalance with zero copy,
which caused qemu to hang forever on guest driver unload.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agovhost: set log when updating used flags or avail event
Jason Wang [Tue, 21 Jun 2011 10:04:38 +0000 (18:04 +0800)]
vhost: set log when updating used flags or avail event

We need to log writes when updating used flags and avail event
fields.  Otherwise the guest may see a stale value after migration and
miss notifying the host.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agovhost: init used ring after backend was set
Jason Wang [Tue, 21 Jun 2011 10:04:27 +0000 (18:04 +0800)]
vhost: init used ring after backend was set

Move the used ring initialization after backend was set. This
makes it possible to disable the backend and tweak the used ring,
then restart. This will also make it possible to log the used ring
write correctly.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agonetfilter: nfnetlink_queue: batch verdict support
Florian Westphal [Tue, 19 Jul 2011 09:46:33 +0000 (11:46 +0200)]
netfilter: nfnetlink_queue: batch verdict support

Introduces a new nfnetlink type that applies a given
verdict to all queued packets with an id <= the id in the verdict
message.

If a mark is provided it is applied to all matched packets.

This reduces the number of verdicts that have to be sent.
Applications that make use of this feature need to maintain
a timeout to send a batchverdict periodically to avoid starvation.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>