Jacob Keller [Tue, 9 Apr 2013 07:20:09 +0000 (07:20 +0000)]
ixgbe: enable devices with internal switch to read pci parent
This patch modifies the driver to enable certain devices, which have an internal
switch, to read data from the physical slot rather than reading data from the
internal switch. The internal switch will always report the same PCI width and
speed, which is not useful compared to knowing the width and speed of the slot
the physical card is plugged into.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Fri, 15 Feb 2013 09:18:15 +0000 (09:18 +0000)]
ixgbe: create conversion functions from link_status to bus/speed
This patch cleans up ixgbe_get_bus_info_generic to call some conversion
functions, which are used also in a follow on patch that needs to convert
between the link_status PCIe config values into ixgbe's internal enum
representations.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Fri, 15 Feb 2013 09:18:10 +0000 (09:18 +0000)]
ixgbe: Enable support for recognizing PCI-e Gen3 link speed
This patch adds support for displaying PCIe Gen3 link speed, which was
previously missing from the driver.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Sat, 9 Feb 2013 01:19:55 +0000 (01:19 +0000)]
ixgbe: Drop check for PAGE_SIZE from ixgbe_xmit_frame_ring
The check for PAGE_SIZE is pointless now that the default configuration is to
allocate 32K for all buffers. Since the Tx descriptor limit is 16K we can
just drop the check and always compare the descriptors to the maximum size
supported.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Emil Tantilov [Tue, 5 Feb 2013 09:43:26 +0000 (09:43 +0000)]
ixgbe: don't do arithmetic operations on bitmasks
Make the calculation of eerd consistent between the read and write functions
by using | instead of + for IXGBE_EEPROM_RW_REG_START
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Fri, 1 Feb 2013 08:56:41 +0000 (08:56 +0000)]
ixgbe: Mask off check of frag_off as we only want fragment offset
We were incorrectly checking the entire frag_off field when we only wanted the
fragment offset. As a result we were not pulling in TCP headers when the DNF
flag was set.
To correct that we will now check for frag off using the IP_OFFSET mask.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
David S. Miller [Wed, 17 Apr 2013 18:18:43 +0000 (14:18 -0400)]
Merge branch 'tipc-ipoib'
Patrick McHardy says:
====================
The following patchset adds support for running TIPC over InfiniBand.
The patchset consists of three parts (+ a minor fix for the ethernet media
type):
- Preparation: removal of an the unused str2addr callback and move of the
bcast_addr from struct tipc_media to struct tipc_bearer. This is necessary
because InfiniBand doesn't have a fixed broadcast address like ethernet,
so it needs to be initialized with the device's broadcast address when
the bearer is enabled
- Introduction of a TIPC InfiniBand media type. A new media type is needed
to deal with the different address sizes
- Support for ETH_P_TIPC in IPoIB
Since the last posting I've addressed all feedback I received and rebased
to the current net-next tree.
I consider these patches ready for merging. Since they mainly affect TIPC
code, I'd propose to have them either go through the TIPC tree or through
Dave directly (not sure how TIPC patches are managed).
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 17 Apr 2013 06:18:29 +0000 (06:18 +0000)]
IPoIB: add support for TIPC protocol
Support TIPC in the IPoIB driver. Since IPoIB now keeps track of its own
neighbour entries and doesn't require the packet to have a dst_entry
anymore, the only necessary changes are to:
- not drop multicast TIPC packets because of the unknown ethernet type
- handle unicast TIPC packets similar to IPv4/IPv6 unicast packets
in ipoib_start_xmit().
An alternative would be to remove all ethertype limitations since they're
not necessary anymore, all TIPC needs to know about is ARP and RARP since
it wants to always perform "path find", even if a path is already known.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 17 Apr 2013 06:18:28 +0000 (06:18 +0000)]
tipc: add InfiniBand media type
Add InfiniBand media type based on the ethernet media type.
The only real difference is that in case of InfiniBand, we need the entire
20 bytes of space reserved for media addresses, so the TIPC media type ID is
not explicitly stored in the packet payload.
Sample output of tipc-config:
# tipc-config -v -addr -netid -nt=all -p -m -b -n -ls
node address: <10.1.4>
current network id: 4711
Type Lower Upper Port Identity Publication Scope
0
167776257 167776257 <10.1.1:
1855512577>
1855512578 cluster
167776260 167776260 <10.1.4:
1216454657>
1216454658 zone
1 1 1 <10.1.4:
1216479235>
1216479236 node
Ports:
1216479235: bound to {1,1}
1216454657: bound to {0,
167776260}
Media:
eth
ib
Bearers:
ib:ib0
Nodes known:
<10.1.1>: up
Link <broadcast-link>
Window:20 packets
RX packets:0 fragments:0/0 bundles:0/0
TX packets:0 fragments:0/0 bundles:0/0
RX naks:0 defs:0 dups:0
TX naks:0 acks:0 dups:0
Congestion bearer:0 link:0 Send queue max:0 avg:0
Link <10.1.4:ib0-10.1.1:ib0>
ACTIVE MTU:2044 Priority:10 Tolerance:1500 ms Window:50 packets
RX packets:80 fragments:0/0 bundles:0/0
TX packets:40 fragments:0/0 bundles:0/0
TX profile sample:22 packets average:54 octets
0-64:100% -256:0% -1024:0% -4096:0% -16384:0% -32768:0% -66000:0%
RX states:410 probes:213 naks:0 defs:0 dups:0
TX states:410 probes:197 naks:0 acks:0 dups:0
Congestion bearer:0 link:0 Send queue max:1 avg:0
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 17 Apr 2013 06:18:27 +0000 (06:18 +0000)]
tipc: set skb->protocol in eth_media packet transmission
The skb->protocol field is used by packet classifiers and for AF_PACKET
cooked format, TIPC needs to set it properly.
Fixes packet classification and ethertype of 0x0000 in cooked captures:
Out 20:c9:d0:43:12:d9 ethertype Unknown (0x0000), length 56:
0x0000: 5b50 0028 0000 30d4 0100 1000 0100 1001 [P.(..0.........
0x0010: 0000 03e8 0000 0001 20c9 d043 12d9 0000 ...........C....
0x0020: 0000 0000 0000 0000 ........
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 17 Apr 2013 06:18:26 +0000 (06:18 +0000)]
tipc: move bcast_addr from struct tipc_media to struct tipc_bearer
Some network protocols, like InfiniBand, don't have a fixed broadcast
address but one that depends on the configuration. Move the bcast_addr
to struct tipc_bearer and initialize it with the broadcast address of
the network device when the bearer is enabled.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 17 Apr 2013 06:18:25 +0000 (06:18 +0000)]
tipc: remove unused str2addr media callback
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bjørn Mork [Tue, 16 Apr 2013 22:12:13 +0000 (22:12 +0000)]
net: cdc_ether: silence sparse __CHECK_ENDIAN__ warning
Remove warning introduced by commit 418fc57 ("usbnet: cdc-ether: apply
usbnet_link_change"):
CHECK .../drivers/net/usb/cdc_ether.c
.../drivers/net/usb/cdc_ether.c:409:46: warning: incorrect type in argument 2 (different base types)
.../drivers/net/usb/cdc_ether.c:409:46: expected bool [unsigned] [usertype] <noident>
.../drivers/net/usb/cdc_ether.c:409:46: got restricted __le16 [usertype] wValue
Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Tue, 16 Apr 2013 11:07:17 +0000 (11:07 +0000)]
net: sctp: sctp_ulpq: remove 'malloced' struct member
The structure sctp_ulpq is embedded into sctp_association and never
separately allocated, also ulpq->malloced is always 0, so that
kfree() is never called. Therefore, remove this code.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Tue, 16 Apr 2013 11:07:16 +0000 (11:07 +0000)]
net: sctp: sctp_bind_addr: remove dead code
The sctp_bind_addr structure has a 'malloced' member that is
always set to 0, thus in sctp_bind_addr_free() the kfree()
part can never be called. This part is embedded into
sctp_ep_common anyway and never alloced.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Tue, 16 Apr 2013 11:07:15 +0000 (11:07 +0000)]
net: sctp: sctp_transport: remove unused variable
sctp_transport's member 'malloced' is set to 1, never evaluated
and the structure is kfreed anyway. So just remove it.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Tue, 16 Apr 2013 11:07:14 +0000 (11:07 +0000)]
net: sctp: outqueue: simplify sctp_outq_uncork function
Just a minor edit to simplify the function. No need for this
error variable here.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Tue, 16 Apr 2013 11:07:12 +0000 (11:07 +0000)]
net: sctp: sctp_outq: remove 'malloced' from its struct
sctp_outq is embedded into sctp_association, and thus never
kmalloced in any way. Also, malloced is always 0, thus kfree()
is never called. Therefore, remove that dead piece of code.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Tue, 16 Apr 2013 11:07:11 +0000 (11:07 +0000)]
net: sctp: sctp_inq: remove dead code
sctp_inq is never kmalloced, since it's integrated into sctp_ep_common
and only initialized from eps and assocs. Therefore, remove the dead
code from there.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Tue, 16 Apr 2013 11:07:10 +0000 (11:07 +0000)]
net: sctp: sctp_ssnmap: remove 'malloced' element from struct
sctp_ssnmap_init() can only be called from sctp_ssnmap_new()
where malloced is always set to 1. Thus, when we call
sctp_ssnmap_free() the test for map->malloced evaluates always
to true.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 17 Apr 2013 17:30:32 +0000 (13:30 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/jesse/openvswitch
Jesse Gross says:
====================
A number of improvements for net-next/3.10.
Highlights include:
* Properly exposing linux/openvswitch.h to userspace after the uapi
changes.
* Simplification of locking. It immediately makes things simpler to
reason about and avoids holding RTNL mutex for longer than
necessary. In the near future it will also enable tunnel
registration and more fine-grained locking.
* Miscellaneous cleanups and simplifications.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam [Tue, 16 Apr 2013 21:35:00 +0000 (18:35 -0300)]
atl1: Protect atl1_suspend with CONFIG_PM_SLEEP
commit
7b7a2bbb690 (atl1: Remove unneeded PM_OPS definitions) removed the
definition of atl1_suspend for the !CONFIG_PM_SLEEP case.
So only call atl1_suspend() when CONFIG_PM_SLEEP is defined and fix the
following build error from randconfig:
drivers/net/ethernet/atheros/atlx/atl1.c: In function 'atl1_shutdown':
drivers/net/ethernet/atheros/atlx/atl1.c:2888:2: error: implicit declaration of function 'atl1_suspend' [-Werror=implicit-function-declaration]
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 16 Apr 2013 20:43:39 +0000 (16:43 -0400)]
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
Marc Kleine-Budde says:
====================
this is a pull-request for net-next/master. It consists of a patch by
Oliver Hartkopp. In this patch he cleans up the sja1000 header file by
using a common prefix for all sja1000 defines.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam [Tue, 16 Apr 2013 08:17:46 +0000 (08:17 +0000)]
fec: Use SIMPLE_DEV_PM_OPS
Using SIMPLE_DEV_PM_OPS can make the code smaller and simpler.
Also change CONFIG_PM to CONFIG_PM_SLEEP.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Veaceslav Falico [Tue, 16 Apr 2013 05:28:12 +0000 (05:28 +0000)]
pch_gbe: minor: report the actual error on MTU change
If we can't _up() after changing the MTU, report the actual error instead
of -ENOMEM. It can be really misleading cause pch_gbe is usually used in
scenarios where the memory amount is really small, and thus hiding the
real cause.
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Atzm Watanabe [Tue, 16 Apr 2013 02:50:52 +0000 (02:50 +0000)]
vxlan: Allow setting destination to unicast address.
This patch allows setting VXLAN destination to unicast address.
It allows that VXLAN can be used as peer-to-peer tunnel without
multicast.
v4: generalize struct vxlan_dev, "gaddr" is replaced with vxlan_rdst.
"GROUP" attribute is replaced with "REMOTE".
they are based by David Stevens's comments.
v3: move a new attribute REMOTE into the last of an enum list
based by Stephen Hemminger's comments.
v2: use a new attribute REMOTE instead of GROUP based by
Cong Wang's comments.
Signed-off-by: Atzm Watanabe <atzm@stratosphere.co.jp>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Tue, 16 Apr 2013 01:57:46 +0000 (01:57 +0000)]
packet: minor: add generic tpacket_uhdr to access packet headers
There is no need to add a dozen unions each time at the start
of the function. So, do this once and use it instead. Thus, we
can remove some duplicate code and make it more readable.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dilip Daya [Tue, 16 Apr 2013 01:39:07 +0000 (01:39 +0000)]
sctp: Add buffer utilization fields to /proc/net/sctp/assocs
sctp: Add buffer utilization fields to /proc/net/sctp/assocs
This patch adds the following fields to /proc/net/sctp/assocs output:
- sk->sk_wmem_alloc as "wmema" (transmit queue bytes committed)
- sk->sk_wmem_queued as "wmemq" (persistent queue size)
- sk->sk_sndbuf as "sndbuf" (size of send buffer in bytes)
- sk->sk_rcvbuf as "rcvbuf" (size of receive buffer in bytes)
When small DATA chunks containing 136 bytes data are sent the TX_QUEUE
(assoc->sndbuf_used) reaches a maximum of 40.9% of sk_sndbuf value when
peer.rwnd = 0. This was diagnosed from sk_wmem_alloc value reaching maximum
value of sk_sndbuf.
TX_QUEUE (assoc->sndbuf_used), sk_wmem_alloc and sk_wmem_queued values are
incremented in sctp_set_owner_w() for outgoing data chunks. Having access to
the above values in /proc/net/sctp/assocs will provide a better understanding
of SCTP buffer management.
With patch applied, example output when peer.rwnd = 0
where:
ASSOC
ffff880132298000 is sender
ffff880125343000 is receiver
ASSOC SOCK STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE \
ffff880132298000 ffff880124a0a0c0 2 1 3 29325 1 214656 0 \
ffff880125343000 ffff8801237d7700 2 1 3 36210 2 0 524520 \
UID INODE LPORT RPORT LADDRS <-> RADDRS HBINT INS OUTS \
0 25108 3455 3456 *10.4.8.3 <-> *10.5.8.3 7500 2 2 \
0 27819 3456 3455 *10.5.8.3 <-> *10.4.8.3 7500 2 2 \
MAXRT T1X T2X RTXC wmema wmemq sndbuf rcvbuf
4 0 0 72 525633 440320 524288 524288
4 0 0 0 1 0 524288 524288
Signed-off-by: Dilip Daya <dilip.daya@hp.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Devendra Naga [Tue, 16 Apr 2013 01:30:38 +0000 (01:30 +0000)]
tlan: cancel work at remove path
the work has been scheduled from interrupt, and not been
cancelled when the driver is unloaded, which doesn't remove
the work item from the global workqueue. call the
cancel_work_sync when the driver is removed (rmmod'ed).
Cc: Sriram <srk@ti.com>
Cc: Cyril Chemparathy <cyril@ti.com>
Cc: Vinay Hegde <vinay.hegde@ti.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Mon, 15 Apr 2013 15:17:19 +0000 (15:17 +0000)]
neighbour: Convert NEIGH_PRINTK to neigh_dbg
Update debugging messages to a more current style.
Emit these debugging messages at KERN_DEBUG instead
of KERN_DEFAULT.
Add and use neigh_dbg(level, fmt, ...) macro
Add dynamic_debug capability via pr_debug
Convert embedded function names to "%s: ", __func__
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sascha Herrmann [Sun, 14 Apr 2013 22:33:29 +0000 (22:33 +0000)]
at86rf230: change irq handling to prevent lockups with edge type irq
Implemented separate irq handling for edge and level type interrupt
configuration. For edge type interrupts calls to disable_irq_nosync()
and enable_irq() are removed. The at86rf230 resets the irq line only
after the irq status register is read. Disabling the irq can lock the
driver in situations where a irq is set by the radio while the driver
is still reading the frame buffer.
With irq_type configuration set to 0 the original behavior is
preserverd.
Additional the irq filter register is set to filter out all unused
interrupts and the irq status register is read in the probe
function to clear the irq line.
Signed-off-by: Sascha Herrmann <sascha@ps.nvbi.de>
Conflicts:
drivers/net/ieee802154/at86rf230.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Sascha Herrmann [Sun, 14 Apr 2013 22:33:28 +0000 (22:33 +0000)]
at86rf230: add irq type configuration option
Add option to at86rf230 platform data to configure the type of the
interrupt used by the driver. The irq polarity of the device will
be configured accordingly.
Signed-off-by: Sascha Herrmann <sascha@ps.nvbi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam [Tue, 16 Apr 2013 09:28:31 +0000 (09:28 +0000)]
ks8851: Remove unneeded PM_OPS definitions
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam [Tue, 16 Apr 2013 09:28:30 +0000 (09:28 +0000)]
xgmac: Remove unneeded PM_OPS definitions
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam [Tue, 16 Apr 2013 09:28:29 +0000 (09:28 +0000)]
tg3: Remove unneeded PM_OPS definitions
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Cc: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam [Tue, 16 Apr 2013 09:28:28 +0000 (09:28 +0000)]
atl1: Remove unneeded PM_OPS definitions
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Cc: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam [Tue, 16 Apr 2013 09:28:27 +0000 (09:28 +0000)]
can: mcp251x: Remove unneeded PM_OPS definitions
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Oliver Hartkopp [Sat, 13 Apr 2013 19:35:49 +0000 (21:35 +0200)]
can: sja1000: use common prefix for all sja1000 defines
This is a follow up patch to:
f901b6b can: sja1000: fix define conflict on SH
That patch fixed a define conflict between the SH architecture and the sja1000
driver, by addind a prefix to one macro only. This patch consistently renames
the prefix of the SJA1000 controller registers from "REG_" to "SJA1000_".
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Pravin B Shelar [Mon, 15 Apr 2013 20:30:37 +0000 (13:30 -0700)]
openvswitch: Use generic struct pcpu_tstats.
Rather than defining ovs specific stats struct (vport_percpu_stats),
we can use existing pcpu_tstats to achieve exactly same functionality.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Pravin B Shelar [Mon, 15 Apr 2013 20:23:03 +0000 (13:23 -0700)]
openvswitch: Simplify datapath locking.
Currently OVS uses combination of genl and rtnl lock to protect
datapath state. This was done due to networking stack locking.
But this has complicated locking and there are few lock ordering
issues with new tunneling protocols.
Following patch simplifies locking by introducing new ovs mutex
and now this lock is used to protect entire ovs state.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
David S. Miller [Mon, 15 Apr 2013 20:10:53 +0000 (16:10 -0400)]
Merge branch 'sync_multiple'
Vlad Yasevich says:
====================
Current dev_[uc|mc]_addr_sync() API currently correctly syncs the
addresses to the first device. Any subsequent calls to sync will
not do anything since the synched variable will be set. This
variable is used as an optimization to skip over addresses that have
been synched.
There are some devices (ex: team) that attempt to do the above. There
is other work in progress that needs to above to work corretly.
The short series introduces dev_[uc|mc]_addr_synch_multiple() that
allows multiple calls to sync to multiple different devices. Original
API is left alone and still has the limitation.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Vlad Yasevich [Mon, 15 Apr 2013 09:54:26 +0000 (09:54 +0000)]
team: Use new sync_multiple api to sync devices adressess.
Team drivers attempts to sync addresses to each of the port
devices; however, the current api doesn't really perform the sync
for any device after the first one. Switch to using the new api
that will actually sync the addresses to all ports.
CC: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vlad Yasevich [Mon, 15 Apr 2013 09:54:25 +0000 (09:54 +0000)]
net: add dev_uc_sync_multiple() and dev_mc_sync_multiple() api
The current implementation of dev_uc_sync/unsync() assumes that there is
a strict 1-to-1 relationship between the source and destination of the sync.
In other words, once an address has been synced to a destination device, it
will not be synced to any other device through the sync API.
However, there are some virtual devices that aggreate a number of lower
devices and need to sync addresses to all of them. The current
API falls short there.
This patch introduces a new dev_uc_sync_multiple() api that can be called
in the above circumstances and allows sync to work for every invocation.
CC: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Mon, 15 Apr 2013 03:27:18 +0000 (03:27 +0000)]
net: sctp: minor: make sctp_ep_common's member 'dead' a bool
Since dead only holds two states (0,1), make it a bool instead
of a 'char', which is more appropriate for its purpose.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Mon, 15 Apr 2013 03:27:17 +0000 (03:27 +0000)]
net: sctp: remove sctp_ep_common struct member 'malloced'
There is actually no need to keep this member in the structure, because
after init it's always 1 anyway, thus always kfree called. This seems to
be an ancient leftover from the very initial implementation from 2.5
times. Only in case the initialization of an association fails, we leave
base.malloced as 0, but we nevertheless kfree it in the error path in
sctp_association_new().
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis Kirjanov [Sun, 14 Apr 2013 21:11:29 +0000 (21:11 +0000)]
sis900: check for DMA map errors
The first backtrace appears on tx path with DMA mapping operations debug
enabled.
[ 345.637919] ------------[ cut here ]------------
[ 345.637971] WARNING: at lib/dma-debug.c:937 check_unmap+0x4df/0x910()
[ 345.637977] Hardware name: System Name
[ 345.637987] sis900 0000:00:01.1: DMA-API: device driver failed to check map error[device address=0x000000000d4aed02] [si
ze=60 bytes] [mapped as single]
[ 345.637993] Modules linked in: bridge stp llc dmfe sundance 3c59x sis900
[ 345.638022] Pid: 0, comm: swapper Not tainted 3.9.0-rc6+ #4
[ 345.638028] Call Trace:
[ 345.638042] [<
c122097f>] ? check_unmap+0x4df/0x910
[ 345.638059] [<
c102b19c>] warn_slowpath_common+0x7c/0xa0
[ 345.638070] [<
c122097f>] ? check_unmap+0x4df/0x910
[ 345.638081] [<
c102b23e>] warn_slowpath_fmt+0x2e/0x30
[ 345.638092] [<
c122097f>] check_unmap+0x4df/0x910
[ 345.638107] [<
c100bfeb>] ? save_stack_trace+0x2b/0x50
[ 345.638120] [<
c107238e>] ? mark_lock+0x31e/0x5d0
[ 345.638132] [<
c1072b2c>] ? __lock_acquire+0x4ec/0x7d0
[ 345.638143] [<
c1220f6d>] debug_dma_unmap_page+0x6d/0x80
[ 345.638166] [<
cf834dec>] sis900_interrupt+0x49c/0x860 [sis900]
[ 345.638195] [<
c1094b73>] handle_irq_event_percpu+0x43/0x1c0
[ 345.638206] [<
c1094d1e>] ? handle_irq_event+0x2e/0x60
[ 345.638217] [<
c1094d27>] handle_irq_event+0x37/0x60
[ 345.638235] [<
c10973f0>] ? irq_set_chip_data+0x40/0x40
[ 345.638246] [<
c1097442>] handle_level_irq+0x52/0xa0
[ 345.638251] <IRQ> [<
c1003629>] ? do_IRQ+0x39/0xa0
[ 345.638293] [<
c1484631>] ? common_interrupt+0x31/0x36
[ 345.638347] [<
d08c2c52>] ? br_flood_forward+0x12/0x20 [bridge]
[ 345.638364] [<
d08c2d40>] ? br_dev_queue_push_xmit+0x60/0x60 [bridge]
[ 345.638381] [<
d08c3b2b>] ? br_handle_frame_finish+0x25b/0x280 [bridge]
[ 345.638399] [<
d08c3ce3>] ? br_handle_frame+0x193/0x290 [bridge]
[ 345.638416] [<
d08c3b50>] ? br_handle_frame_finish+0x280/0x280 [bridge]
[ 345.638431] [<
c13b3c87>] ? __netif_receive_skb_core+0x1d7/0x710
[ 345.638442] [<
c13b3b19>] ? __netif_receive_skb_core+0x69/0x710
[ 345.638454] [<
c13b41e1>] ? __netif_receive_skb+0x21/0x70
[ 345.638464] [<
c13b42b5>] ? process_backlog+0x85/0x130
[ 345.638476] [<
c13b4bbb>] ? net_rx_action+0xfb/0x1d0
[ 345.638497] [<
c1032768>] ? __do_softirq+0xa8/0x1f0
[ 345.638527] [<
c147daad>] ? _raw_spin_unlock+0x1d/0x20
[ 345.638538] [<
c10038c0>] ? handle_irq+0x20/0xd0
[ 345.638550] [<
c1032f27>] ? irq_exit+0x97/0xa0
[ 345.638560] [<
c1003632>] ? do_IRQ+0x42/0xa0
[ 345.638580] [<
c104d003>] ? hrtimer_start+0x23/0x30
[ 345.638580] [<
c1484631>] ? common_interrupt+0x31/0x36
[ 345.638580] [<
c1008703>] ? default_idle+0x33/0xc0
[ 345.638580] [<
c10086ac>] ? cpu_idle+0x4c/0x70
[ 345.638580] [<
c14787e0>] ? rest_init+0xa0/0xb0
[ 345.638580] [<
c1478740>] ? reciprocal_value+0x50/0x50
[ 345.638580] [<
c16b5bcf>] ? start_kernel+0x28f/0x320
[ 345.638580] [<
c16b54e0>] ? repair_env_string+0x60/0x60
[ 345.638580] [<
c16b5269>] ? i386_start_kernel+0x39/0xa0
[ 345.638580] ---[ end trace
a244264b69b8a7ae ]---
[ 345.638580] Mapped at:
[ 345.638580] [<
c1221c65>] debug_dma_map_page+0x65/0x110
[ 345.638580] [<
cf8355a9>] sis900_start_xmit+0x129/0x210 [sis900]
[ 345.638580] [<
c13b2527>] dev_hard_start_xmit+0x1b7/0x530
[ 345.638580] [<
c13cc32e>] sch_direct_xmit+0x8e/0x280
[ 345.638580] [<
c13b4e39>] dev_queue_xmit+0x1a9/0x5b0
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Ferre [Sun, 14 Apr 2013 22:04:33 +0000 (22:04 +0000)]
net/macb: fix error return code in macb_probe()
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Original-idea-by: <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Rapoport [Sat, 13 Apr 2013 23:21:51 +0000 (23:21 +0000)]
vxlan: don't bypass encapsulation for multi- and broadcasts
The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
and therefore will be sent out bypassing encapsulation. This breaks
delivery of packets sent to the vxlan multicast group.
Disabling encapsulation bypass for multicasts and broadcasts fixes the
issue.
Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
Tested-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Tested-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Sun, 14 Apr 2013 08:29:12 +0000 (08:29 +0000)]
net: tcp_memcontrol: minor: remove unused variable
Commit
10b96f7306e5 (``tcp_memcontrol: remove a redundant statement
in tcp_destroy_cgroup()'') says ``We read the value but make no use
of it.'', but forgot to remove the variable declaration as well. This
was a follow-up commit of
3f1346193 (``memcg: decrement static keys
at real destroy time'') that removed the read of variable 'val'.
This fixes therefore:
CC net/ipv4/tcp_memcontrol.o
net/ipv4/tcp_memcontrol.c: In function ‘tcp_destroy_cgroup’:
net/ipv4/tcp_memcontrol.c:67:6: warning: unused variable ‘val’ [-Wunused-variable]
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Sun, 14 Apr 2013 08:08:13 +0000 (08:08 +0000)]
net: sock: make sock_tx_timestamp void
Currently, sock_tx_timestamp() always returns 0. The comment that
describes the sock_tx_timestamp() function wrongly says that it
returns an error when an invalid argument is passed (from commit
20d4947353be, ``net: socket infrastructure for SO_TIMESTAMPING'').
Make the function void, so that we can also remove all the unneeded
if conditions that check for such a _non-existant_ error case in the
output path.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Rapoport [Sat, 13 Apr 2013 23:21:39 +0000 (23:21 +0000)]
vxlan: use htonl when snooping for loopback address
Currently "bridge fdb show dev vxlan0" lists loopback address as
"1.0.0.127". Using htonl(INADDR_LOOPBACK) rather than passing it
directly to vxlan_snoop fixes the problem.
Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Sat, 13 Apr 2013 19:03:19 +0000 (19:03 +0000)]
ucc_geth: Convert ugeth_<level> to pr_<level>
Remove unnecessary macros that duplicate generic
kernel functions.
When a struct net_device is available:
Convert printks to netdev_<level>
Convert netif_msg_<foo> and ugeth_<level> to netif_<level>
Add pr_fmt. Standardize on newlines at end of format.
Remove some duplicated newlines from output.
Coalesce formats.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Sat, 13 Apr 2013 19:03:18 +0000 (19:03 +0000)]
gianfar: Use netdev_<level> when possible
Use a more current logging style.
Convert pr_<level> to netdev_<level> when a struct net_device is
available. Add pr_fmt and neaten other formats too.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Sat, 13 Apr 2013 19:03:17 +0000 (19:03 +0000)]
fec: Convert printks to netdev_<level>
Use a more current logging message style.
Convert the printks where a struct net_device is available to
netdev_<level>. Convert the other printks to pr_<level> and
add pr_fmt where appropriate.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Sat, 13 Apr 2013 03:22:08 +0000 (03:22 +0000)]
tcp: tcp_tso_segment() small optimization
We can move th->check computation out of the loop, as compiler
doesn't know each skb initially share same tcp headers after
skb_segment()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam [Sat, 13 Apr 2013 07:25:36 +0000 (07:25 +0000)]
fec: Fix PHC device log
Currently when booting a mx6 device we get the following on boot:
registered PHC device on eth%d
Fix it by printing the network device name only after it gets registered, so
that the following can be read now:
fec 2188000.ethernet eth0: registered PHC device 0
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jingchang Lu [Thu, 11 Apr 2013 21:12:45 +0000 (21:12 +0000)]
ethernet/fec: Add Vybrid family fec support
Freescale Vybrid platform implentments MAC-ENET core
providing compatibility with half- or full-duplex
10/100 Mbit/s Ethernet LANs.
Signed-off-by: Jingchang Lu <b35083@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Thu, 11 Apr 2013 16:42:40 +0000 (16:42 +0000)]
net/at91_ether: fix error return code in at91ether_probe()
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Benc [Fri, 12 Apr 2013 00:56:15 +0000 (00:56 +0000)]
ptp: dynamic allocation of PHC char devices
As network adapters supporting PTP are becoming more common, machines with
many NICs suddenly have many PHCs, too. The current limit of eight /dev/ptp*
char devices (and thus, 8 network interfaces with PHC) is insufficient. Let
the ptp driver allocate the char devices dynamically.
Tested with 28 PHCs, removing and re-adding some of them.
Thanks to Ben Hutchings for advice leading to simpler and cleaner patch.
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 12 Apr 2013 11:31:52 +0000 (11:31 +0000)]
tcp: GSO should be TSQ friendly
I noticed that TSQ (TCP Small queues) was less effective when TSO is
turned off, and GSO is on. If BQL is not enabled, TSQ has then no
effect.
It turns out the GSO engine frees the original gso_skb at the time the
fragments are generated and queued to the NIC.
We should instead call the tcp_wfree() destructor for the last fragment,
to keep the flow control as intended in TSQ. This effectively limits
the number of queued packets on qdisc + NIC layers.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Nandita Dukkipati <nanditad@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 12 Apr 2013 18:07:47 +0000 (11:07 -0700)]
act_csum: fix possible use after free
tcf_csum_skb_nextlayer() / pskb_may_pull() can change skb->head, so we
must be careful not keeping pointers to previous headers.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Grégoire Baron <baronchon@n7mm.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sebastian Hesselbarth [Thu, 11 Apr 2013 23:20:00 +0000 (23:20 +0000)]
net: mv643xx_eth: remove deprecated inet_lro support
With recent support for GRO, there is no need to keep both LRO and
GRO. This patch therefore removes the deprecated inet_lro support
from mv643xx_eth. This is work is based on an experimental patch
provided by Eric Dumazet and Willy Tarreau.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Based-on-patch-by: Eric Dumazet <eric.dumazet@gmail.com>
Based-on-patch-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Thu, 11 Apr 2013 19:00:35 +0000 (19:00 +0000)]
vxlan: fix some sparse warnings
Fixes following warning:
drivers/net/vxlan.c:406:6: warning: symbol 'vxlan_fdb_free' was not declared. Should it be static?
drivers/net/vxlan.c:1111:37: warning: Using plain integer as NULL pointer
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jason Wang [Wed, 10 Apr 2013 20:35:29 +0000 (20:35 +0000)]
xen-netback: switch to use skb_partial_csum_set()
Switch to use skb_partial_csum_set() to simplify the codes.
Cc: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 12 Apr 2013 07:06:44 +0000 (03:06 -0400)]
Revert "netprio_cgroup: make local table static"
This reverts commit
763eff57de893a27f8f18855f17033c92598c423.
It causes build regressions, as per Stephen Rothwell:
====================
After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:
net/core/netprio_cgroup.c:250:29: error: static declaration of 'net_prio_subsys' follows non-static declaration
include/linux/cgroup_subsys.h:71:1: note: previous declaration of 'net_prio_subsys' was here
====================
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Silviu-Mihai Popescu [Thu, 11 Apr 2013 09:52:13 +0000 (09:52 +0000)]
net: ethernet: stmicro: stmmac: use devm_ioremap_resource()
Convert use of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
This was found with coccinelle.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ivan Vecera [Thu, 11 Apr 2013 04:29:11 +0000 (04:29 +0000)]
be2net: remove unused variable 'sge'
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sebastian Hesselbarth [Thu, 11 Apr 2013 02:40:23 +0000 (02:40 +0000)]
net: mv643xx_eth: Add GRO support
This patch adds GRO support to mv643xx_eth by making it invoke
napi_gro_receive instead of netif_receive_skb.
Signed-off-by: Soeren Moch <smoch@web.de>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jason Wang [Wed, 10 Apr 2013 23:32:22 +0000 (23:32 +0000)]
tuntap: initialize vlan_features
The vlan_features was zero which prevents vlan GSO packets to be transmitted to
userspace. This is suboptimal so enable this by initialize vlan_features for
tuntap.
Netperf shows better performance of guest receiving since vlan TSO works for
tuntap:
before:
netperf -H 192.168.5.4
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.5.4 ()
port 0 AF_INET : demo
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 16384 10.01 2786.67
after:
netperf -H 192.168.5.4
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.5.4 ()
port 0 AF_INET : demo
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 16384 10.00 8085.49
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jason Wang [Wed, 10 Apr 2013 23:32:21 +0000 (23:32 +0000)]
virtio-net: initialize vlan_features
There's nothing that prevent passing the device features of virtio_net to its
vlan device. So this patch simply passes those to vlan device to benefit from
advanced features.
Netperf shows better sending performance for vlan device since TSO can work on
vlan now.
before:
netperf -H 192.168.5.2
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.5.2 ()
port 0 AF_INET : demo
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 16384 10.00 4162.35
after:
netperf -H 192.168.5.2
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.5.2 ()
port 0 AF_INET : demo
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 16384 10.00 9365.42
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sebastian Hesselbarth [Wed, 10 Apr 2013 23:29:34 +0000 (23:29 +0000)]
net: mv643xx_eth: use managed devm_kzalloc
This patch moves shared private data kzalloc to managed devm_kzalloc and
cleans now unneccessary kfree and error handling.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sebastian Hesselbarth [Wed, 10 Apr 2013 23:29:33 +0000 (23:29 +0000)]
net: mv643xx_eth: add shared clk and cleanup existing clk handling
This patch adds an optional shared block clock to avoid lockups on
clock gated controllers. Besides the new clock, clock handling for
existing clocks is cleaned up and moved to devm_clk_get. Device
tree binding documentation is updated for the new clocks property.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sebastian Hesselbarth [Wed, 10 Apr 2013 23:24:48 +0000 (23:24 +0000)]
net: mvmdio: add clocks property to binding documentation
Commit
3d604da1e9547c09c9dcc0ee443c306c9ae1a480
("net: mvmdio: get and enable optional clock")
was missing an update of the corresponding device tree binding
documentation. This patch adds the clocks property to mvmdio
binding documentation.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jason Wang [Wed, 10 Apr 2013 20:50:48 +0000 (20:50 +0000)]
vhost_net: remove tx polling state
After commit
2b8b328b61c799957a456a5a8dab8cc7dea68575 (vhost_net: handle polling
errors when setting backend), we in fact track the polling state through
poll->wqh, so there's no need to duplicate the work with an extra
vhost_net_polling_state. So this patch removes this and make the code simpler.
This patch also removes the all tx starting/stopping code in tx path according
to Michael's suggestion.
Netperf test shows almost the same result in stream test, but gets improvements
on TCP_RR tests (both zerocopy or copy) especially on low load cases.
Tested between multiqueue kvm guest and external host with two direct
connected 82599s.
zerocopy disabled:
sessions|transaction rates|normalize|
before/after/+improvements
1 | 9510.24/11727.29/+23.3% | 693.54/887.68/+28.0% |
25| 192931.50/241729.87/+25.3% | 2376.80/2771.70/+16.6% |
50| 277634.64/291905.76/+5% | 3118.36/3230.11/+3.6% |
zerocopy enabled:
sessions|transaction rates|normalize|
before/after/+improvements
1 | 7318.33/11929.76/+63.0% | 521.86/843.30/+61.6% |
25| 167264.88/242422.15/+44.9% | 2181.60/2788.16/+27.8% |
50| 272181.02/294347.04/+8.1% | 3071.56/3257.85/+6.1% |
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 11 Apr 2013 20:14:37 +0000 (16:14 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/klassert/ipsec-next
Steffen Klassert says:
====================
1) Allow to avoid copying DSCP during encapsulation
by setting a SA flag. From Nicolas Dichtel.
2) Constify the netlink dispatch table, no need to modify it
at runtime. From Mathias Krause.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Thu, 11 Apr 2013 01:56:42 +0000 (01:56 +0000)]
net/mlx4_en: set correct MTU in SRIOV
When setting MTU in SRIOV mode add ETH, VLAN and FCS header length
to the maximum MTU obtained from QUERY_DEV_CAP.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hadar Hen Zion [Thu, 11 Apr 2013 01:56:41 +0000 (01:56 +0000)]
net/mlx4_core: Translate guest B0 steering rules to DMFS
The different steering modes are global to the device, with DMFS
being introduced after SRIOV was merged. Hence, SRIOV guests running
legacy / older Linux kernels or non-Linux drivers may provide
B0 steering directives when the hypervisor is using DMFS and fail.
Under B0 only L2 steering rules are allowed, hence B0 is a subset of DMFS.
Use this fact to enable such legacy guests to run by modifying the SRIOV
B0 steering wrapper to translate guest B0 directives to DMFS ones when
the device uses DMFS. The translated B0 rule has to be kept in the
resource tracker as a B0 object to allow for lookup in case of detach.
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hadar Hen Zion [Thu, 11 Apr 2013 01:56:40 +0000 (01:56 +0000)]
net/mlx4_core: Add helper function to translate B0 steering rules to DMFS
A pre-step for supporting guests that use B0 steering over a hypervisor
that runs in DMFS (device managed flow steering mode). Add helper function
which allows to translate L2 attachments / detachments provided in B0 mode
to DMFS rules.
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:40 +0000 (04:40 +0000)]
usbnet: handle link change
The link change is detected via the interrupt pipe, and bulk
pipes are responsible for transfering packets, so it is reasonable
to stop bulk transfer after link is reported as off.
Two adavantages may be obtained with stopping bulk transfer
after link becomes off:
- USB bus bandwidth is saved(USB bus is shared bus except for
USB3.0), for example, lots of 'IN' token packets and 'NYET'
handshake packets is transfered on 2.0 bus.
- probabaly power might be saved for usb host controller since
cancelling bulk transfer may disable the asynchronous schedule of
host controller.
With this patch, when link becomes off, about ~10% performance
boost can be found on bulk transfer of anther usb device which
is attached to same bus with the usbnet device, see below
test on next-
20130410:
- read from usb mass storage(Sandisk Extreme USB 3.0) on pandaboard
with below command after unplugging ethernet cable:
dd if=/dev/sda iflag=direct of=/dev/null bs=1M count=800
- without the patch
1,
838860800 bytes (839 MB) copied, 36.2216 s, 23.2 MB/s
2,
838860800 bytes (839 MB) copied, 35.8368 s, 23.4 MB/s
3,
838860800 bytes (839 MB) copied, 35.823 s, 23.4 MB/s
4,
838860800 bytes (839 MB) copied, 35.937 s, 23.3 MB/s
5,
838860800 bytes (839 MB) copied, 35.7365 s, 23.5 MB/s
average: 23.6MB/s
- with the patch
1,
838860800 bytes (839 MB) copied, 32.3817 s, 25.9 MB/s
2,
838860800 bytes (839 MB) copied, 31.7389 s, 26.4 MB/s
3,
838860800 bytes (839 MB) copied, 32.438 s, 25.9 MB/s
4,
838860800 bytes (839 MB) copied, 32.5492 s, 25.8 MB/s
5,
838860800 bytes (839 MB) copied, 31.6178 s, 26.5 MB/s
average: 26.1MB/s
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:39 +0000 (04:40 +0000)]
usbnet: apply usbnet_link_change
Use usbnet_link_change to handle link change centrally.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:38 +0000 (04:40 +0000)]
usbnet: sierra: apply usbnet_link_change
Use usbnet_link_change to handle link change centrally.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:37 +0000 (04:40 +0000)]
usbnet: dm9601: apply usbnet_link_change
Use usbnet_link_change to handle link change centrally.
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:36 +0000 (04:40 +0000)]
usbnet: cdc-ether: apply usbnet_link_change
Use usbnet_link_change to handle link change centrally.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:35 +0000 (04:40 +0000)]
usbnet: ax88179_1781: apply usbnet_link_change
Use usbnet_link_change to handle link change centrally.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:34 +0000 (04:40 +0000)]
usbnet: asix: apply usbnet_link_change
Use usbnet_link_change to handle link change centrally.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:33 +0000 (04:40 +0000)]
usbnet: cdc_ncm: apply usbnet_link_change
Use the introduced usbnet_link_change to handle link change.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:32 +0000 (04:40 +0000)]
usbnet: mcs7830: apply usbnet_link_change
This patch uses the introduced usbnet_link_change() to handle
link change.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:31 +0000 (04:40 +0000)]
usbnet: mcs7830: don't reset link
The driver doesn't implement link_reset() callback, so it needn't
to send link reset event.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Thu, 11 Apr 2013 04:40:30 +0000 (04:40 +0000)]
usbnet: introduce usbnet_link_change API
This patch introduces the API of usbnet_link_change, so that
usbnet can handle link change centrally, which may help to
implement killing traffic URBs for saving USB bus bandwidth
and host controller power.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Wed, 10 Apr 2013 10:56:05 +0000 (10:56 +0000)]
netprio_cgroup: make local table static
Minor sparse warning
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Wed, 10 Apr 2013 10:54:46 +0000 (10:54 +0000)]
xen-netback: fix sparse warning
Fix warning about 0 used as NULL.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Wed, 10 Apr 2013 10:53:40 +0000 (10:53 +0000)]
bnx2: make cnic_probe static
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Zhou [Wed, 10 Apr 2013 21:56:45 +0000 (14:56 -0700)]
openvswitch: datapath.h: Fix a stale comment.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
David S. Miller [Wed, 10 Apr 2013 19:50:42 +0000 (15:50 -0400)]
Merge branch 'wireless'
John W. Linville says:
====================
Please accept this pull request for the 3.10 stream...
Regarding the mac80211 bits, Johannes says:
"Here I have a bunch of minstrel fixes from Felix, per-interface
multicast filtering from Alex, set_tim debouncing from Ilan,
per-interface debugfs cleanups from Stanislaw, an error return fix from
Wei and a number of small improvements and fixes that I made myself."
And for the iwlwifi bits, Johannes says:
"Andrei changed an instance of kmalloc+memdup to kmemdup, Stanislaw
removed the now unused 5ghz_disable module parameter. I also have a
number of fixes from Ilan, Emmanuel and myself, Emmanuel also continued
working on Bluetooth coexistence."
For the sizeable batch of Bluetooth bits, Gustavo says:
"This is our first batch of patches for 3.10. The biggest changes of this pull
request are from Johan Hedberg, he implemented a HCI request framework to make
life easier when we have to send many HCI commands and a block and wait for
all of the to finish, we were able to fix a few issues in stack with the
introduction of this framework.
Other than that Dean Jenkins did a good work cleaning the RFCOMM code, the
refcnt infrastructure was removed and now we use NULL pointer checks to know
when a object was freed or not. That code was buggy and now it looks a way
better.
The rest of changes are clean ups, fixes and small improvements all over the
Bluetooth subsystem."
Regarding the wl12xx bits, Luca says:
"Some patches intended for 3.10. Mostly bug fixes and other small
improvements."
On top of that, there are updates to brcmfmac, brcmsmac, b43, ssb and
bcma, as well as mwifiex, rt2x00, and ath9k and a few others. The most
notable bit is the addition of a new driver in the rtlwifi family.
Please let me know if there are problems!
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
John W. Linville [Wed, 10 Apr 2013 14:39:27 +0000 (10:39 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
drivers/net/wireless/rt2x00/rt2x00pci.c
net/mac80211/sta_info.c
net/wireless/core.h
John W. Linville [Wed, 10 Apr 2013 13:31:39 +0000 (09:31 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/rt2x00/rt2x00pci.c
Joe Perches [Tue, 9 Apr 2013 10:18:14 +0000 (10:18 +0000)]
tg3: Use bool not int
Using bool can make code more readable.
Convert uses and tests of int to bool.
This also makes a comparison of tg3->link_up
(itself bool) a bool comparison instead of int.
Reorder stack variable declarations to make
bool fit declaration holes where appropriate.
$ size drivers/net/ethernet/broadcom/tg3.o*
text data bss dec hex filename
169958 27249 58896 256103 3e867 drivers/net/ethernet/broadcom/tg3.o.new
169968 27249 58896 256113 3e871 drivers/net/ethernet/broadcom/tg3.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 9 Apr 2013 19:14:48 +0000 (15:14 -0400)]
Merge branch 'tg3'
Nithin Nayak Sujir says:
====================
This patch and the following two patches add support for link flap avoidance
by maintaining the link on power down. This feature is required for
management capable devices to have the management connection
uninterrupted on driver reload, reboot and interface up/down.
The other pros of this feature are
- It speeds up boot up time by several seconds as DHCP addresses can be
acquired faster.
- It avoids lengthy Spanning Tree delay.
On powerup the hardware brings up the phy with default settings. If the
link is not up, the management software configures the phy to gigabit
and starts autonegotiate. Subsequently, as long as the link is up, the
driver and management refrain from resetting and/or changing any
configuration that the link depends on.
The LNK_FLAP_AVOID setting is an NVRAM user configurable bit and is
disabled by default. If this setting is enabled, we skip powering down
the phy and resetting it.
A second NVRAM setting is 1G_ON_VAUX_OK (off by default). This adds
support for gigabit link speed when device is on auxiliary power.
====================
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nithin Sujir [Tue, 9 Apr 2013 08:48:11 +0000 (08:48 +0000)]
MAINTAINERS: Update tg3 to reflect organizational changes
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nithin Sujir [Tue, 9 Apr 2013 08:48:10 +0000 (08:48 +0000)]
tg3: Update version to 3.131
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>