Thomas Graf [Mon, 3 Jun 2013 11:49:23 +0000 (11:49 +0000)]
pktgen: Fix position of ip and udp header
skb_set_network_header() expects an offset based on the data pointer
whereas skb_tail_offset() also includes the headroom. This resulted
in the ip header being written in a wrong location.
Use return values of skb_put() directly and rely on skb->len to
set mac, network, and transport header.
Cc: Simon Horman <horms@verge.net.au> Cc: Daniel Borkmann <dborkmann@redhat.com> Assisted-by: Daniel Borkmann <dborkmann@redhat.com> Signed-off-by: Thomas Graf <tgraf@suug.ch> Acked-by: Daniel Borkmann <dborkmann@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Arnd Bergmann [Mon, 3 Jun 2013 11:36:50 +0000 (11:36 +0000)]
net: sun4i-emac: remove erroneous assignment
The newly added sun4i-emac driver causes a build error when
CONFIG_NET_POLL_CONTROLLER is set, because it attempts to
assign a pointer to netdev->poll_controller, which has
been replaced with ops->ndo_poll_controller in 2.6.31!
The correct assignment is present as well, so we just need
to remove the wrong one.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Stefan Roese <sr@denx.de> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Richard Genoud <richard.genoud@gmail.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Maxime Ripard <maxime.ripard@anandra.org> Signed-off-by: David S. Miller <davem@davemloft.net>
govindarajulu.v [Mon, 3 Jun 2013 08:07:42 +0000 (08:07 +0000)]
mlx4: use __netdev_pick_tx instead of __skb_tx_hash in mlx4_en_select_queue
mlx4_en_select_queue() uses __skb_tx_hash to select the transmit queue.
XPS settings are ignored by this. Instead, we can use __netdev_pick_tx
to select the transmit queue.
Compile test only.
Signed-off-by: govindarajulu.v <govindarajulu90@gmail.com> Acked-By: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Amir Vadai <amirv@mellanox.com> Acked-By: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: mvneta: read MAC address from hardware when available
This patch improves the logic used by the mvneta driver to find a MAC
address for a particular interface. Until now, it was only looking at
the Device Tree, and if no address was found, was falling back to
generating a random MAC address.
This patch adds the intermediate solution of reading the MAC address
from the hardware registers, in case it has been set by the
bootloader. So the order is now:
1) MAC address from the Device Tree
2) MAC address from the hardware registers
3) Random MAC address
This requires moving the MAC address initialization a little bit later
in the ->probe() code, because it now requires the hardware registers
to be remapped.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Mon, 3 Jun 2013 03:36:52 +0000 (03:36 +0000)]
net: sun4i-emac: fix a typo in emac_probe()
Just fixed a typo in emac_probe().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Arnd Bergmann [Mon, 3 Jun 2013 03:11:24 +0000 (03:11 +0000)]
net: mv643xx_eth: add missing semicolon
76723bca28 "net: mv643xx_eth: add DT parsing support" added a
dummy mv643xx_eth_shared_of_probe() fallback function with a
typo.
This adds the missing semicolon so we can build without CONFIG_OF
again, and changes both dummy functions to the more conventional
"static inline" syntax, which can avoid potential problems with
the empty macro.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 5 Jun 2013 00:15:19 +0000 (17:15 -0700)]
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 two patches
by Fabio Estevam, cleaning up the flexcan driver (remove default
pinctrl and switch to SIMPLE_DEV_PM_OPS). A patch by me to simplify the
Kconfig [1] handling for flexcan. And a patch by Jingoo Han that
converts the can drivers to use platform_{get,set}_drvdata().
[1] My patch touches arch/{arm,powerpc}, so I collected Acked-bys from
Arnd Bergmann, Shawn Guo and Benjamin Herrenschmidt.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Sun, 2 Jun 2013 22:43:52 +0000 (22:43 +0000)]
ping: always initialize ->sin6_scope_id and ->sin6_flowinfo
If we don't need scope id, we should initialize it to zero.
Same for ->sin6_flowinfo.
Cc: Lorenzo Colitti <lorenzo@google.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Acked-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jean Sacren [Sat, 1 Jun 2013 16:23:17 +0000 (16:23 +0000)]
Kconfig: remove dangling references to the deleted file
Commit 202dc3fc599c1dded235d3b448d9ca924252e354 (Documentation: remove
obsolete networking/multicast.txt file) deleted the obsolete file. After
the file has been removed, clean up a couple of places where references
to the deleted file were made so that users wouldn't be confused when
they consult the Help menu.
Signed-off-by: Jean Sacren <sakiwit@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mugunthan V N [Mon, 3 Jun 2013 20:10:06 +0000 (20:10 +0000)]
drivers: net: phy: at803x: add interface mode support
This patch adds support for RGMII TX delay configuration on Atheros 803X,
this can be enabled in debug registers. With this patch,
PHY_INTERFACE_MODE_RGMII_TXID modes are now supported.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mugunthan V N [Mon, 3 Jun 2013 20:10:05 +0000 (20:10 +0000)]
drivers: net: phy: at803x: seperate wol specific code to wol standard apis
WOL is initilized in phy config_init, but there are standard apis
(set_wol/get_wol) for WOL in phy frame work. So this patch moves
WOL specific code from config_init to wol standard apis.
Cc: Matus Ujhelyi <ujhelyi.m@gmail.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Lorenzo Colitti [Fri, 31 May 2013 15:05:49 +0000 (15:05 +0000)]
net: ipv4: make the ping /proc code AF-independent
Introduce a ping_seq_afinfo structure (similar to its UDP
equivalent) and use it to make some of the ping /proc functions
address-family independent. Rename the remaining ping /proc
functions from ping_* to ping_v4_*.
Compiles and displays reasonable results with CONFIG_IPV6={n,m,y}
Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Lorenzo Colitti [Fri, 31 May 2013 15:05:48 +0000 (15:05 +0000)]
net: ipv6: Unify {raw,udp}6_sock_seq_show.
udp6_sock_seq_show and raw6_sock_seq_show are identical, except
the UDP version displays ports and the raw version displays the
protocol. Refactor most of the code in these two functions into
a new common ip6_dgram_sock_seq_show function, in preparation
for using it to display ICMPv6 sockets as well.
Also reduce the indentation in parts of include/net/transp_v6.h
to improve readability.
Compiles and displays reasonable results with CONFIG_IPV6={n,m,y}
Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Lorenzo Colitti [Fri, 31 May 2013 15:05:47 +0000 (15:05 +0000)]
Clean up indentation in net/ipv6/transp_v6.h
Reduce the indentation of most of the functions and make it a
bit more consistent. This allows longer function and arg names
to be consistently indented without wrapping.
Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jingoo Han [Thu, 23 May 2013 10:47:58 +0000 (19:47 +0900)]
net: can: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.
Also, unnecessary dev_set_drvdata() is removed, because the driver core
clears the driver data to NULL after device_release or on probe failure.
Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
can: flexcan: remove HAVE_CAN_FLEXCAN Kconfig symbol
This patch removes the Kconfig symbol HAVE_CAN_FLEXCAN from arch/{arm,powerpc}
and allowing compilation unconditionally on all arm and powerpc platforms.
This brings a bigger compile time coverage and removes the following dependency
warning found by Arnd Bergmann:
warning: (SOC_IMX28 && SOC_IMX25 && SOC_IMX35 && IMX_HAVE_PLATFORM_FLEXCAN &&
SOC_IMX53 && SOC_IMX6Q) selects HAVE_CAN_FLEXCAN
which has unmet direct dependencies (NET && CAN && CAN_DEV)
Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Fabio Estevam [Mon, 20 May 2013 13:06:18 +0000 (10:06 -0300)]
can: flexcan: Let device core handle pinctrl
Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
we can rely on device core for handling pinctrl, so remove
devm_pinctrl_get_select_default() from the driver.
Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: <linux-can@vger.kernel.org> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cong Wang [Sun, 2 Jun 2013 15:00:52 +0000 (15:00 +0000)]
icmp: avoid allocating large struct on stack
struct icmp_bxm is a large struct, reduce stack usage
by allocating it on heap.
Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Gortmaker [Wed, 29 May 2013 04:13:54 +0000 (04:13 +0000)]
ibm-ethernet: delete stale MCA and duplicate PSERIES dependency
MCA support has been removed but this dependency escaped removal.
Also, there is a duplicate PPC_PSERIES dependency that appeared
when the ethernet drivers were separated into vendor/model
specific directories, so we remove that here as well.
Reported-by: Robert de Rooy <robert.de.rooy@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Timo Teräs [Mon, 27 May 2013 20:46:33 +0000 (20:46 +0000)]
ipv4: use separate genid for next hop exceptions
commit 13d82bf5 (ipv4: Fix flushing of cached routing informations)
added the support to flush learned pmtu information.
However, using rt_genid is quite heavy as it is bumped on route
add/change and multicast events amongst other places. These can
happen quite often, especially if using dynamic routing protocols.
While this is ok with routes (as they are just recreated locally),
the pmtu information is learned from remote systems and the icmp
notification can come with long delays. It is worthy to have separate
genid to avoid excessive pmtu resets.
Cc: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Timo Teräs [Mon, 27 May 2013 20:46:32 +0000 (20:46 +0000)]
ipv4: rate limit updating of next hop exceptions with same pmtu
The tunnel devices call update_pmtu for each packet sent, this causes
contention on the fnhe_lock. Ignore the pmtu update if pmtu is not
actually changed, and there is still plenty of time before the entry
expires.
Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Timo Teräs [Mon, 27 May 2013 20:46:31 +0000 (20:46 +0000)]
ipv4: properly refresh rtable entries on pmtu/redirect events
This reverts commit 05ab86c5 (xfrm4: Invalidate all ipv4 routes on
IPsec pmtu events). Flushing all cached entries is not needed.
Instead, invalidate only the related next hop dsts to recheck for
the added next hop exception where needed. This also fixes a subtle
race due to bumping generation id's before updating the pmtu.
Cc: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Sun, 2 Jun 2013 00:06:21 +0000 (00:06 +0000)]
bnx2x: semi-Semantic changes
This patch includes a few changes that change the driver's flow without truly
changing anything in its functionality - use usleep_range for short sleeps
instead of msleep and initialize Tx consumer during initialization for better
information during errors.
Signed-off-by: Yuval Mintz <yuvalmin@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>
Yuval Mintz [Sun, 2 Jun 2013 00:06:19 +0000 (00:06 +0000)]
bnx2x: Semantic removal and beautification
This patch introduces several small changes to the driver, none which actually
change any flow:
1. Removes prototypes of unexisting functions and unused defines.
2. Fixes alignment and spacing issues.
3. Changes numeric usage into constants.
4. Remove unnecessary parenthesis.
Signed-off-by: Yuval Mintz <yuvalmin@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>
Eric Dumazet [Fri, 31 May 2013 14:32:55 +0000 (14:32 +0000)]
bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash
The bnx2x_select_queue() was using __skb_tx_hash() to select the
transmit queue, totally ignoring XPS settings, while XPS can help
performance quite significantly, so change the bnx2x_select_queue()
to use __dev_pick_tx() instead which will use XPS if configured.
Based on patches from Ying Cai and Havard Skinnemoen
Reported-by: govindarajulu.v <govindarajulu90@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Havard Skinnemoen <hskinnemoen@google.com> Cc: Ying Cai <ycai@google.com> Cc: Eilon Greenstein <eilong@broadcom.com> Acked-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jay Hernandez [Thu, 30 May 2013 03:24:14 +0000 (03:24 +0000)]
cxgb4: Force uninitialized state if FW_ON_ADAPTER is < FW_VERSION and we're the MASTER_PF
Forcing uninitialized state allows us to upgrade and reinitialize the adapter.
FW_VERSION_T4 = 1.4.0.0
FW_VERSION_T5 = 0.0.0.0
At this point driver supports above and greater than above version of firmware.
If it doesn't find the required firmware version than it forces the adapter to
be reinitialized as shown below.
1) If FW_ON_ADAPTER < FW_VERSION and we're the MASTER_PF force uninitialized
state and a FW upgrade if available.
- If FW_ON_ADAPTER < /lib/firmware/cxgb4/t*fw.bin we will update the
adapters FW.
- If FW_ON_ADAPTER >= /lib/firmware/cxgb4/t*fw.bin don't upgrade FW.
- If upgrade_fw() fails force reinitialization of the adapter anyways,
it might still work.
Either way forcing the uninitialized state allows cxgb4 reinitialize FW.
2) If FW_ON_ADAPTER >= FW_VERSION driver follows normal path.
Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Somnath Kotur [Thu, 30 May 2013 02:52:23 +0000 (02:52 +0000)]
be2net: Implement initiate FW dump feature for Lancer
Added code to initiate FW dump via ethtool. Driver checks if the previous dump
has been cleared before initiating the dump. It doesn't initiate the dump
if it is not cleared.
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mugunthan V N [Wed, 29 May 2013 20:22:01 +0000 (20:22 +0000)]
drivers: net: davinci_cpdma: remove CRC bytes from skb added by CPDMA
Additional 4 bytes found in the skb is the CRC calculated by the
CPDMA hardware, check the CRC bit in CPDMA status field of
Descriptor and remove the CRC length from the skb. This extra
4 byte can be seen when capturing packets using tcpdump.
This has been tested in TI816x platform.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Maxime Ripard [Thu, 30 May 2013 03:49:25 +0000 (03:49 +0000)]
ARM: sunxi: Add EMAC Controller to Hackberry dt
The Hackberry has a PHY that needs to be powered up through a GPIO, so
we need to use a fixed regulator here.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Roese [Thu, 30 May 2013 03:49:24 +0000 (03:49 +0000)]
ARM: cubieboard: Enable ethernet (EMAC) support in dts
Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Maxime Ripard [Thu, 30 May 2013 03:49:23 +0000 (03:49 +0000)]
ARM: sunxi: Add EMAC controller node to sun4i DTSI
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Maxime Ripard [Thu, 30 May 2013 03:49:22 +0000 (03:49 +0000)]
ARM: sun4i: Add muxing options for the ethernet controller
The EMAC only has one pinset available for muxing, so hopefully, we
cover all cases.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Maxime Ripard [Thu, 30 May 2013 03:49:21 +0000 (03:49 +0000)]
net: Add MDIO bus driver for the Allwinner EMAC
This patch adds a separate driver for the MDIO interface of the
Allwinner ethernet controllers.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Roese [Thu, 30 May 2013 03:49:20 +0000 (03:49 +0000)]
net: Add EMAC ethernet driver found on Allwinner A10 SoC's
The Allwinner A10 has an ethernet controller that seem to be developped
internally by them.
The exact feature set of this controller is unknown, since there is no
public documentation for this IP, and this driver is mostly the one
published by Allwinner that has been heavily cleaned up.
Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Tue, 28 May 2013 04:07:21 +0000 (04:07 +0000)]
phy: add reverse MII PHY connection type
The PHY library currently does not know about the the reverse MII
connection type. Add it to the list of supported PHY modes and update
of_get_phy_mode() to support it and look for the string "rev-mii".
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Dichtel [Mon, 27 May 2013 23:48:16 +0000 (23:48 +0000)]
sit: add IPv4 over IPv4 support
This patch adds the support of IPv4 over Ipv4 for the module sit. The gain of
this feature is to be able to have 4in4 and 6in4 over the same interface
instead of having one interface for 6in4 and another for 4in4 even if
encapsulation addresses are the same.
To avoid conflicting with ipip module, sit IPv4 over IPv4 protocol is
registered with a smaller priority.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Dichtel [Mon, 27 May 2013 23:48:15 +0000 (23:48 +0000)]
iptunnel: specify protocol outside IP header
Before this patch, ip_tunnel_xmit() was using the field protocol from the IP
header passed into argument.
There is no functional change, this patch prepares the support of IPv4 over
IPv4 for module sit.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Wed, 29 May 2013 07:16:05 +0000 (15:16 +0800)]
net: clean up skb headers code
commit 1a37e412a0225fcba5587 (net: Use 16bits for *_headers
fields of struct skbuff) converts skb->*_header to u16,
some #if NET_SKBUFF_DATA_USES_OFFSET are now useless,
and to be safe, we could just use "X = (typeof(X)) ~0U;"
as suggested by David.
Cc: David S. Miller <davem@davemloft.net> Cc: Simon Horman <horms@verge.net.au> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Horman [Thu, 30 May 2013 16:39:29 +0000 (16:39 +0000)]
netfilter: Correct calculation using skb->tail and skb-network_header
This corrects an regression introduced by "net: Use 16bits for *_headers
fields of struct skbuff" when NET_SKBUFF_DATA_USES_OFFSET is not set. In
that case skb->tail will be a pointer whereas skb->network_header
will be an offset from head. This is corrected by using wrappers that
ensure that calculations are always made using pointers.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 31 May 2013 11:18:10 +0000 (11:18 +0000)]
gro: should aggregate frames without DF
GRO on IPv4 doesn't aggregate frames if they don't have DF bit set.
Some servers use IP_MTU_DISCOVER/IP_PMTUDISC_PROBE, so linux receivers
are unable to aggregate this kind of traffic.
The right thing to do is to allow aggregation as long as the DF bit has
same value on all segments.
bnx2x LRO does this correctly.
Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Jerry Chu <hkchu@google.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David Majnemer [Fri, 31 May 2013 13:15:38 +0000 (13:15 +0000)]
net: Update RFS target at poll for tcp/udp
The current state of affairs is that read()/write() will setup
RFS (Receive Flow Steering) for internet protocol sockets while
poll()/epoll() does not.
When poll() gets called with a TCP or UDP socket, we should update
the flow target.
This permits to RFS (if enabled) to select the appropriate CPU for
following incoming packets.
Note: Only connected UDP sockets can benefit from RFS.
Signed-off-by: David Majnemer <majnemer@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Paul Turner <pjt@google.com> Cc: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Horman [Thu, 30 May 2013 20:36:11 +0000 (20:36 +0000)]
sctp: Correct byte order of access to skb->{network, transport}_header
Corrects an byte order conflict introduced by "sctp: Correct access to
skb->{network, transport}_header". All the values in question are host
byte order.
Reported-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rick Hoover <RHoover@digilentinc.com> Signed-off-by: Steven Wang <steven.wang@digilentinc.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michal Simek [Thu, 30 May 2013 20:08:26 +0000 (20:08 +0000)]
phy: Add Marvell 88E1116R phy ID
This phy is on Xilinx ZC702 zynq development board.
Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Wed, 29 May 2013 14:20:14 +0000 (14:20 +0000)]
tcp: undo on DSACK during recovery
If the receiver supports DSACK, sender can detect false recoveries and
revert cwnd reductions triggered by either severe network reordering or
concurrent reordering and loss event.
Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Wed, 29 May 2013 14:20:13 +0000 (14:20 +0000)]
tcp: fix undo on partial ack in recovery
Upon detecting spurious fast retransmit via timestamps during recovery,
use PRR to clock out new data packet instead of retransmission. Once
all retransmission are proven spurious, the sender then reverts the
cwnd reduction and congestion state to open or disorder.
The current code does the opposite: it undoes cwnd as soon as any
retransmission is spurious and continues to retransmit until all
data are acked. This nullifies the point to undo the cwnd because
the sender is still retransmistting spuriously. This patch fixes
it. The undo_ssthresh argument of tcp_undo_cwnd_reductiuon() is no
longer needed and is removed.
Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Wed, 29 May 2013 14:20:12 +0000 (14:20 +0000)]
tcp: refactor undo functions
Refactor and relocate various functions or variables to prepare the
undo fix. Remove some unused function arguments. Rename tcp_undo_cwr
to tcp_undo_cwnd_reduction to be consistent with the rest of
CWR related function names.
Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Wed, 29 May 2013 14:20:11 +0000 (14:20 +0000)]
tcp: consolidate PRR packet accounting
This patch series fixes an undo bug in fast recovery: the sender
mistakenly undos the cwnd too early but continues fast retransmits
until all pending data are acked. This also multiplies the SNMP
stat PARTIALUNDO events by the degree of the network reordering.
The first patch prepares the fix by consolidating the accounting
of newly_acked_sacked in tcp_cwnd_reduction(), instead of updating
newly_acked_sacked everytime sacked_out is adjusted. Also pass
acked and prior_unsacked as const type because they are readonly
in the rest of recovery processing.
Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This adds device tree parsing support for the shared driver of mv643xx_eth.
As the bindings are slightly different from current PPC bindings new binding
documentation is also added. Following PPC-style device setup, the shared
driver now also adds port platform_devices and sets up port platform_data.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: mv643xx_eth: proper initialization for Kirkwood SoCs
Ethernet controllers found on Kirkwood SoCs not only suffer from loosing
MAC address register contents on clock gating but also some important
registers are reset to values that would break ethernet. This patch
clears the CLK125_BYPASS_EN bit for DT enabled Kirkwood only by using
of_device_is_compatible() instead of #ifdefs. Non-DT Kirkwood is not
affected as it installs a clock gating workaround because of the MAC
address issue above. Other Orion SoCs do not suffer from register reset,
do not have the bit in question, or do not have the register at all.
Moreover, system controllers on PPC using this driver should also be
protected from clearing that bit.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: mv643xx_eth: use phy_disconnect instead of phy_detach
Using a separated mdio bus driver with mvmdio, phy_detach on network device
removal will not stop the phy and finally lead to NULL pointer dereference
in mvmdio due to non-existent network device. Use phy_disconnect instead
to properly stop phy device from accessing network device prior removal of
the network device.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michal Simek [Thu, 30 May 2013 00:28:05 +0000 (00:28 +0000)]
net: emaclite: Let's make xemaclite_adjust_link static
xemaclite_adjust_link is used locally.
It removes sparse warning:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:916:6: warning:
symbol 'xemaclite_adjust_link' was not declared. Should it be static?
Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 30 May 2013 23:52:47 +0000 (16:52 -0700)]
Merge branch 'netxen_nic'
Manish Chopra says:
====================
This patch series includes following changes:
* Log driver version information with firmware version information.
* Log "Unknown" adapter name and serial number in case of
mismatched adapter type.
* netxen_setup_intr() function code cleanup and changes to avoid attaching
of multiple pci functions on an adapter with mixed interrupts mode
[MSI-X/MSI + INTx].
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Manish Chopra [Thu, 30 May 2013 09:51:37 +0000 (09:51 +0000)]
netxen_nic: Avoid mixed mode interrupts
o Adapters do not support co-existence of INTx Interrupt with
MSI-X or MSI among multiple functions. Prevent attaching
of a function during normal load, if adapter gets into mixed
mode of interrupts
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Manish Chopra [Thu, 30 May 2013 09:51:35 +0000 (09:51 +0000)]
netxen_nic: Log proper error message in case of mismatched adapter type
o log "Unknown" board name and "Unknown" serial number in case
of mismatched adapter type found. This will avoid weird characters
logs when an adapter is in bad state or corrupted.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 30 May 2013 22:53:18 +0000 (15:53 -0700)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
Included changes:
- reduce broadcast overhead on non-lossy wired links
- fix typos in kernel doc
- use eth_hdr() when possible
- use netdev_allock_skb_ip_align() and don't deal with NET_IP_ALIGN
- change VID semantic in the BLA component
- other minor cleanups and code refactoring
Signed-off-by: David S. Miller <davem@davemloft.net>