12 Dec, 2012
1 commit
-
This patch removes the redundant occurences of simple_strto
Signed-off-by: Abhijit Pawar
Signed-off-by: David S. Miller
11 Dec, 2012
1 commit
-
This patch replace the obsolete simple_strto with kstrto
Signed-off-by: Abhijit Pawar
Acked-by: Neil Horman
Signed-off-by: David S. Miller
20 Sep, 2012
1 commit
-
In netpoll tx path, we miss the chance of calling ->ndo_select_queue(),
thus could cause problems when bonding is involved.This patch makes dev_pick_tx() extern (and rename it to netdev_pick_tx())
to let netpoll call it in netpoll_send_skb_on_dev().Reported-by: Sylvain Munaut
Cc: "David S. Miller"
Cc: Eric Dumazet
Signed-off-by: Cong Wang
Tested-by: Sylvain Munaut
Signed-off-by: David S. Miller
01 Sep, 2012
1 commit
-
Merge the 'net' tree to get the recent set of netfilter bug fixes in
order to assist with some merge hassles Pablo is going to have to deal
with for upcoming changes.Signed-off-by: David S. Miller
31 Aug, 2012
1 commit
-
Let's fill IP header ident field with a meaningful value,
it might help some setups.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
30 Aug, 2012
1 commit
-
Against -net.
In the patch "netpoll: re-enable irq in poll_napi()", I tried to
fix the following warning:[100718.051041] ------------[ cut here ]------------
[100718.051048] WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0x7d/0xb0()
(Not tainted)
[100718.051049] Hardware name: ProLiant BL460c G7
...
[100718.051068] Call Trace:
[100718.051073] [] ? warn_slowpath_common+0x87/0xc0
[100718.051075] [] ? warn_slowpath_null+0x1a/0x20
[100718.051077] [] ? local_bh_enable_ip+0x7d/0xb0
[100718.051080] [] ? _spin_unlock_bh+0x1b/0x20
[100718.051085] [] ? be_process_mcc+0x74/0x230 [be2net]
[100718.051088] [] ? be_poll_tx_mcc+0x16c/0x290 [be2net]
[100718.051090] [] ? netpoll_poll_dev+0xd6/0x490
[100718.051095] [] ? bond_poll_controller+0x75/0x80 [bonding]
[100718.051097] [] ? netpoll_poll_dev+0x45/0x490
[100718.051100] [] ? ksize+0x19/0x80
[100718.051102] [] ? netpoll_send_skb_on_dev+0x157/0x240by reenabling IRQ before calling ->poll, but it seems more
problems are introduced after that patch:http://ozlabs.org/~akpm/stuff/IMG_20120824_122054.jpg
http://marc.info/?l=linux-netdev&m=134563282530588&w=2So it is safe to fix be2net driver code directly.
This patch reverts the offending commit and fixes be_poll() by
avoid disabling BH there, this is okay because be_poll()
can be called either by poll_napi() which already disables
IRQ, or by net_rx_action() which already disables BH.Reported-by: Andrew Morton
Reported-by: Sylvain Munaut
Cc: Sylvain Munaut
Cc: Andrew Morton
Cc: David Miller
Cc: Sathya Perla
Cc: Subbu Seetharaman
Cc: Ajit Khaparde
Signed-off-by: Cong Wang
Tested-by: Sylvain Munaut
Signed-off-by: David S. Miller
15 Aug, 2012
6 commits
-
napi->poll() needs IRQ enabled, so we have to re-enable IRQ before
calling it.Cc: David Miller
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller -
Without this patch, I can't get netconsole logs remotely over
vlan. The reason is probably we don't handle vlan tags in either
netpoll tx or rx path.I am not sure if I use these vlan functions correctly, at
least this patch works.Cc: Benjamin LaHaise
Cc: Patrick McHardy
Cc: David Miller
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller -
This patch fixes several problems in the call path of
netpoll_send_skb_on_dev():1. Disable IRQ's before calling netpoll_send_skb_on_dev().
2. All the callees of netpoll_send_skb_on_dev() should use
rcu_dereference_bh() to dereference ->npinfo.3. Rename arp_reply() to netpoll_arp_reply(), the former is too generic.
Cc: "David S. Miller"
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller -
In __netpoll_rx(), it dereferences ->npinfo without rcu_dereference_bh(),
this patch fixes it by using the 'npinfo' passed from netpoll_rx()
where it is already dereferenced with rcu_dereference_bh().Cc: "David S. Miller"
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller -
Like the previous patch, slave_disable_netpoll() and __netpoll_cleanup()
may be called with read_lock() held too, so we should make them
non-block, by moving the cleanup and kfree() to call_rcu_bh() callbacks.Cc: "David S. Miller"
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller -
slave_enable_netpoll() and __netpoll_setup() may be called
with read_lock() held, so should use GFP_ATOMIC to allocate
memory. Eric suggested to pass gfp flags to __netpoll_setup().Cc: Eric Dumazet
Cc: "David S. Miller"
Reported-by: Dan Carpenter
Signed-off-by: Eric Dumazet
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller
18 Jul, 2012
1 commit
-
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
14 Jun, 2012
1 commit
-
Bogdan Hamciuc diagnosed and fixed following bug in netpoll_send_udp() :
"skb->len += len;" instead of "skb_put(skb, len);"
Meaning that _if_ a network driver needs to call skb_realloc_headroom(),
only packet headers would be copied, leaving garbage in the payload.However the skb_realloc_headroom() must be avoided as much as possible
since it requires memory and netpoll tries hard to work even if memory
is exhausted (using a pool of preallocated skbs)It appears netpoll_send_udp() reserved 16 bytes for the ethernet header,
which happens to work for typicall drivers but not all.Right thing is to use LL_RESERVED_SPACE(dev)
(And also add dev->needed_tailroom of tailroom)This patch combines both fixes.
Many thanks to Bogdan for raising this issue.
Reported-by: Bogdan Hamciuc
Signed-off-by: Eric Dumazet
Tested-by: Bogdan Hamciuc
Cc: Herbert Xu
Cc: Neil Horman
Reviewed-by: Neil Horman
Reviewed-by: Cong Wang
Signed-off-by: David S. Miller
20 Feb, 2012
1 commit
-
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.cSmall minor conflict in bnx2x, wherein one commit changed how
statistics were stored in software, and another commit
fixed endianness bugs wrt. reading the values provided by
the chip in memory.Signed-off-by: David S. Miller
15 Feb, 2012
1 commit
-
commit 5a698af53f (bond: service netpoll arp queue on master device)
tested IFF_SLAVE flag against dev->priv_flags instead of dev->flagsSigned-off-by: Eric Dumazet
Cc: WANG Cong
Acked-by: Neil Horman
Signed-off-by: David S. Miller
02 Feb, 2012
2 commits
-
Add the types in the packet layout order.
Signed-off-by: Joe Perches
Reviewed-by: WANG Cong
Signed-off-by: David S. Miller -
Use a more current message logging style.
Add pr_fmt to prefix dmesg output with "netpoll: "
Add macros to print np->name.Signed-off-by: Joe Perches
Reviewed-by: WANG Cong
Signed-off-by: David S. Miller
13 Jan, 2012
1 commit
-
commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to
RCU_INIT_POINTER) did a lot of incorrect changes, since it did a
complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x,
y).We miss needed barriers, even on x86, when y is not NULL.
Signed-off-by: Eric Dumazet
CC: Stephen Hemminger
CC: Paul E. McKenney
Signed-off-by: David S. Miller
30 Nov, 2011
1 commit
-
Create separate queue state flags so that either the stack or drivers
can turn on XOFF. Added a set of functions used in the stack to determine
if a queue is really stopped (either by stack or driver)Signed-off-by: Tom Herbert
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
19 Nov, 2011
1 commit
-
net: Remove all uses of LL_ALLOCATED_SPACE
The macro LL_ALLOCATED_SPACE was ill-conceived. It applies the
alignment to the sum of needed_headroom and needed_tailroom. As
the amount that is then reserved for head room is needed_headroom
with alignment, this means that the tail room left may be too small.This patch replaces all uses of LL_ALLOCATED_SPACE with the macro
LL_RESERVED_SPACE and direct reference to needed_tailroom.This also fixes the problem with needed_headroom changing between
allocating the skb and reserving the head room.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
01 Nov, 2011
1 commit
-
These files are non modular, but need to export symbols using
the macros now living in export.h -- call out the include so
that things won't break when we remove the implicit presence
of module.h from everywhere.Signed-off-by: Paul Gortmaker
22 Sep, 2011
1 commit
-
Conflicts:
MAINTAINERS
drivers/net/Kconfig
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/wireless/iwlwifi/iwl-pci.c
drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/wl12xx/main.c
27 Aug, 2011
1 commit
-
__netpoll_rx() doesnt properly handle skbs with small header
pskb_may_pull() or pskb_trim_rcsum() can change skb->data, we must
reload it.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
02 Aug, 2011
1 commit
-
When assigning a NULL value to an RCU protected pointer, no barrier
is needed. The rcu_assign_pointer, used to handle that but will soon
change to not handle the special case.Convert all rcu_assign_pointer of NULL value.
//smpl
@@ expression P; @@- rcu_assign_pointer(P, NULL)
+ RCU_INIT_POINTER(P, NULL)//
Signed-off-by: Stephen Hemminger
Acked-by: Paul E. McKenney
Signed-off-by: David S. Miller
04 Jul, 2011
2 commits
-
Too trivial to live.
cc: WANG Cong
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
Unused symbols waste space.
Commit 0e34e93177fb
"(netpoll: add generic support for bridge and bonding devices)"
added the symbol more than a year ago with the promise of "future use".Because it is so far unused, remove it for now.
It can be easily readded if or when it actually needs to be used.cc: WANG Cong
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
12 Jun, 2011
1 commit
-
There is a dev_put(ndev) missing on an error path. This was
introduced in 0c1ad04aecb "netpoll: prevent netpoll setup on slave
devices".Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller
09 Jun, 2011
1 commit
-
In commit 8d8fc29d02a33e4bd5f4fa47823c1fd386346093
(netpoll: disable netpoll when enslave a device), we automatically
disable netpoll when the underlying device is being enslaved,
we also need to prevent people from setuping netpoll on
devices that are already enslaved.Signed-off-by: WANG Cong
Signed-off-by: David S. Miller
10 May, 2011
1 commit
-
mac_pton() parses MAC address in form XX:XX:XX:XX:XX:XX and only in that form.
mac_pton() doesn't dirty result until it's sure string representation is valid.
mac_pton() doesn't care about characters _after_ last octet,
it's up to caller to deal with it.mac_pton() diverges from 0/-E return value convention.
Target usage:if (!mac_pton(str, whatever->mac))
return -EINVAL;
/* ->mac being u8 [ETH_ALEN] is filled at this point. */
/* optionally check str[3 * ETH_ALEN - 1] for termination */Use mac_pton() in pktgen and netconsole for start.
Signed-off-by: Alexey Dobriyan
Signed-off-by: David S. Miller
23 Apr, 2011
1 commit
-
Add const qualifiers to structs iphdr, ipv6hdr and in6_addr pointers
where possible, to make code intention more obvious.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
28 Feb, 2011
2 commits
-
Neil pointed out that we can't send ARP reply on behalf of slaves,
we need to move the arp queue to their bond device.Signed-off-by: WANG Cong
Acked-by: Neil Horman
Signed-off-by: David S. Miller -
V4: rebase to net-next-2.6
This patch removes the flag IFF_IN_NETPOLL, we don't need it any more since
we have netpoll_tx_running() now.Signed-off-by: WANG Cong
Acked-by: Neil Horman
Cc: Herbert Xu
Signed-off-by: David S. Miller
08 Jan, 2011
1 commit
-
* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
usb: don't use flush_scheduled_work()
speedtch: don't abuse struct delayed_work
media/video: don't use flush_scheduled_work()
media/video: explicitly flush request_module work
ioc4: use static work_struct for ioc4_load_modules()
init: don't call flush_scheduled_work() from do_initcalls()
s390: don't use flush_scheduled_work()
rtc: don't use flush_scheduled_work()
mmc: update workqueue usages
mfd: update workqueue usages
dvb: don't use flush_scheduled_work()
leds-wm8350: don't use flush_scheduled_work()
mISDN: don't use flush_scheduled_work()
macintosh/ams: don't use flush_scheduled_work()
vmwgfx: don't use flush_scheduled_work()
tpm: don't use flush_scheduled_work()
sonypi: don't use flush_scheduled_work()
hvsi: don't use flush_scheduled_work()
xen: don't use flush_scheduled_work()
gdrom: don't use flush_scheduled_work()
...Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
as per Tejun.
20 Dec, 2010
1 commit
-
These macros never be used, so remove them.
Signed-off-by: Shan Wei
Signed-off-by: David S. Miller
15 Dec, 2010
1 commit
-
cancel_rearming_delayed_work[queue]() has been superceded by
cancel_delayed_work_sync() quite some time ago. Convert all the
in-kernel users. The conversions are completely equivalent and
trivial.Signed-off-by: Tejun Heo
Acked-by: "David S. Miller"
Acked-by: Greg Kroah-Hartman
Acked-by: Evgeniy Polyakov
Cc: Jeff Garzik
Cc: Benjamin Herrenschmidt
Cc: Mauro Carvalho Chehab
Cc: netdev@vger.kernel.org
Cc: Anton Vorontsov
Cc: David Woodhouse
Cc: "J. Bruce Fields"
Cc: Neil Brown
Cc: Alex Elder
Cc: xfs-masters@oss.sgi.com
Cc: Christoph Lameter
Cc: Pekka Enberg
Cc: Andrew Morton
Cc: netfilter-devel@vger.kernel.org
Cc: Trond Myklebust
Cc: linux-nfs@vger.kernel.org
29 Nov, 2010
1 commit
-
When testing struct netdev_queue state against FROZEN bit, we also test
XOFF bit. We can test both bits at once and save some cycles.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
20 Oct, 2010
1 commit
-
In an erlier patch I modified napi_poll so that devices with IFF_MASTER polled
the per_cpu list instead of the device list for napi. I did this because the
bonding driver has no napi instances to poll, it instead expects to check the
slave devices napi instances, which napi_poll was unaware of. Looking at this
more closely however, I now see this isn't strictly needed. As the bond driver
poll_controller calls the slaves poll_controller via netpoll_poll_dev, which
recursively calls poll_napi on each slave, allowing those napi instances to get
serviced. The earlier patch isn't at all harmfull, its just not needed, so lets
revert it to make the code cleaner. Sorry for the noise,Signed-off-by: Neil Horman
Reviewed-by: WANG Cong
Signed-off-by: David S. Miller
18 Oct, 2010
2 commits
-
Usually the netpoll path, when preforming a napi poll can get away with just
polling all the napi instances of the configured device. Thats not the case for
the bonding driver however, as the napi instances which may wind up getting
flagged as needing polling after the poll_controller call don't belong to the
bonded device, but rather to the slave devices. Fix this by checking the device
in question for the IFF_MASTER flag, if set, we know we need to check the full
poll list for this cpu, rather than just the devices napi instance list.Signed-off-by: Neil Horman
Signed-off-by: David S. Miller -
The bonding driver currently modifies the netpoll structure in its xmit path
while sending frames from netpoll. This is racy, as other cpus can access the
netpoll structure in parallel. Since the bonding driver points np->dev to a
slave device, other cpus can inadvertently attempt to send data directly to
slave devices, leading to improper locking with the bonding master, lost frames,
and deadlocks. This patch fixes that up.This patch also removes the real_dev pointer from the netpoll structure as that
data is really only used by bonding in the poll_controller, and we can emulate
its behavior by check each slave for IS_UP.Signed-off-by: Neil Horman
Signed-off-by: David S. Miller