Paul Gortmaker [Thu, 10 Jan 2013 23:09:44 +0000 (18:09 -0500)]
drivers/net: delete intel i825xx based znet notebook driver
This driver supported early to mid 1990's Zenith laptops, of the
2" thick variety. The driver was already dead 10+ years ago, but
we see this in the source:
----------------
/* 10/2002
[...]
Tested on a vintage Zenith Z-Note 433Lnp+. Probably broken on
anything else. Testers (and detailed bug reports) are welcome :-).
----------------
To clarify, a 433 translates into a 486 at 33MHz, and a system with
a default of 4MB RAM. I can't fault the noble effort to keep things
working a decade ago, but at this point in time, there is no valid
justification to continue carrying this driver along.
Note that there is no associated Space.c cleanup here since this
driver was using module_init to hook itself in.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 02:01:40 +0000 (21:01 -0500)]
drivers/net: delete ISA intel eexpress and eepro i825xx drivers
These old drivers should not be confused with the very common PCI
cards that are supported by e100.c -- these older 10Mbit ISA only
drivers were not as commonly used as some of the other ISA drivers,
simply due to hardware availability and pricing.
Given the rarity of the hardware, and the subsequent less extensive
use of the drivers, it makes sense to obsolete them at this point
in time, along with other rare/experimental ISA drivers.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 01:51:58 +0000 (20:51 -0500)]
drivers/net: delete the 3Com 3c505/3c507 intel i825xx support
For those of us who were around in the early to mid 1990's, we
will remember that the i825xx ethernet support was not something
that was considered sufficiently vetted for 24/7 use.
Folks might be inclined to use *functional* ISA hardware on some
near expired P3 ISA machines for dedicated workhorse applications,
but the odds of using (and relying on) one of these old/experimental
drivers is essentially nil. So lets remove them.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 01:30:26 +0000 (20:30 -0500)]
drivers/net: delete old parallel port de600/de620 drivers
The parallel port is largely replaced by USB, and even in the
day where these drivers were current, the documented speed was
less than 100kB/s. Let us not pretend that anyone cares about
these drivers anymore, or worse - pretend that anyone is using
them on a modern kernel.
As a side bonus, this is the end of legacy parallel port ethernet,
so we get to drop the whole chunk relating to that in the legacy
Space.c file containing the non-PCI unified probe dispatch.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 10 Jan 2013 01:25:05 +0000 (20:25 -0500)]
drivers/net: delete old 8bit ISA 3c501 driver.
It was amusing that linux was able to make use of this 1980's
technology on machines long past its intended lifespan, but
it probably should go now.
To set some context, the 3c501 was designed in the 1980's to be
used on 8088 PC-XT 8bit ISA machines. It was built using a large
number of discrete TTL components and truly looks like a relic
of the ancient past before large scale integration was common.
But from a functional point of view, the real issue, as stated
in the (also obsolete) Ethernet-HowTo, is that "...the 3c501 can
only do one thing at a time -- while you are removing one packet
from the single-packet buffer it cannot receive another packet,
nor can it receive a packet while loading a transmit packet."
You know things are not good when the Kconfig help text suggests
you make a cron job doing a ping every minute.
Hardware that old and crippled is simply not going to be used by
anyone in a time where 10 year old 100Mbit PCI cards (that are
still functional) are largely give-away items.
Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Wed, 9 Jan 2013 03:11:54 +0000 (22:11 -0500)]
drivers/net: delete intel 486 panther onboard ethernet support
This driver was specific to a "professional workstation" line
of products from around 1993 that used the i82596 ethernet chip
as an on-board ethernet solution.
With a 486 processor, and the premium top of the line model maxing
out at a clock speed of 50MHz, we can safely retire this support.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Wed, 9 Jan 2013 03:00:39 +0000 (22:00 -0500)]
drivers/net: delete 486 Apricot support
The Apricot was a 486 PC with 4MB RAM, and an on-board ethernet
via an intel i82596 hard-wired to i/o 0x300.
Those who were using linux in the 1990's will recall that the
i82596 driver was not one of the more stable or widely used
drivers of its day. Combine that with the extremely limited
resources of the platform, and it is truly time to expire the
support for this thing.
There are some old m68k targets who were also using this chip,
so rather than poll the m68k user base, we simply cut out the
x86/Apricot support here in this commit.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tilman Schmidt [Mon, 21 Jan 2013 11:57:20 +0000 (11:57 +0000)]
isdn/divert: fix readability damage
Fix up some of the readibility deterioration caused by last year's
ISDN whitespace coding style cleanup.
Note that the checkpatch complaints all apply to the state of the
source before this patch as well, and in many cases even more so.
Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Mon, 21 Jan 2013 03:02:48 +0000 (03:02 +0000)]
drivers/net/ethernet/sfc/ptp.c: adjust duplicate test
Delete successive tests to the same location. rc was previously tested and
not subsequently updated. efx_phc_adjtime can return an error code, so the
call is updated so that is tested instead.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@s exists@
local idexpression y;
expression x,e;
@@
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
ndisc: Do not try to update "updated" time if neighbour has already gone.
Commit 2152caea ("ipv6: Do not depend on rt->n in rt6_probe().")
introduce a bug to try to update "updated" time in neighbour
structure.
Update the "updated" time only if neighbour is available.
Bug was found by Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 20:40:47 +0000 (15:40 -0500)]
Merge branch 'dsa'
Florian Fainelli says:
====================
These two patches are non-critical bugfixes based on net-next which I
stumbled upon while working on Device Tree bindings for DSA (will comme
as a separate patch later).
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Mon, 21 Jan 2013 09:58:51 +0000 (09:58 +0000)]
dsa: make dsa_switch_setup check for valid port names
This patch changes dsa_switch_setup() to ensure that at least one valid
valid port name is specified and will bail out with an error in case we
walked the maximum number of port with a valid port name found.
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Mon, 21 Jan 2013 09:58:50 +0000 (09:58 +0000)]
dsa: use an unique and non conflicting bus name for the slave MII bus
The slave MII bus registered by the DSA code is using the parent MII bus
as part of its name (ds->master_mii_bus_id), in case the parent MII bus
name is already 16 characters long (such as d0072004.mdio-mi) we will
get the following WARN_ON in dsa_switch_setup() when calling
mdiobus_register():
[ 79.088782] ------------[ cut here ]------------
[ 79.093448] WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0x80/0xa0()
[ 79.099831] sysfs: cannot create duplicate filename
'/class/mdio_bus/d0072004.mdio-mi'
This is a genuine warning, because the DSA slave MII bus will also be
named d0072004.mdio-mi, and since MII_BUS_ID_SIZE is 17 characters long
(with null-terminator) the following will truncate the slave MII bus id:
Cong Wang [Mon, 21 Jan 2013 00:39:24 +0000 (00:39 +0000)]
net: move rx and tx hash functions to net/core/flow_dissector.c
__skb_tx_hash() and __skb_get_rxhash() are all for calculating hash
value based by some fields in skb, mostly used for selecting queues
by device drivers.
Meanwhile, net/core/dev.c is bloating.
Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 19:14:09 +0000 (14:14 -0500)]
Merge branch 'virtio_mac'
Amos Kong says:
====================
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.
Third patch introduced a new vq control command to set mac
address, it's atomic.
V2: check return of sending command, delay eth_mac_addr()
V3: restore software address when fail to set hardware address
V4: split eth_mac_addr, fix error handle
V5: rebase patches to net-next tree
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Amos Kong [Mon, 21 Jan 2013 01:17:23 +0000 (01:17 +0000)]
virtio-net: introduce a new control to set macaddr
Currently we write MAC address to pci config space byte by byte,
this means that we have an intermediate step where mac is wrong.
This patch introduced a new control command to set MAC address,
it's atomic.
VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility.
Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Hajnoczi [Mon, 21 Jan 2013 01:17:22 +0000 (01:17 +0000)]
net: split eth_mac_addr for better error handling
When we set mac address, software mac address in system and hardware mac
address all need to be updated. Current eth_mac_addr() doesn't allow
callers to implement error handling nicely.
This patch split eth_mac_addr() to prepare part and real commit part,
then we can prepare first, and try to change hardware address, then do
the real commit if hardware address is set successfully.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 19:06:34 +0000 (14:06 -0500)]
Merge branch 'mcast'
Nicolas Dichtel says:
====================
The goal of this serie is to add the support of proxy multicast, ie being able
to build a static multicast tree. In other words, it adds the support of (*,G)
mf[6]c entries.
v2: use INADDR_ANY instead of 0 for IPv4 addresses
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Dichtel [Mon, 21 Jan 2013 06:00:26 +0000 (06:00 +0000)]
mcast: add multicast proxy support (IPv4 and IPv6)
This patch add the support of proxy multicast, ie being able to build a static
multicast tree. It adds the support of (*,*) and (*,G) entries.
The user should define an (*,*) entry which is not used for real forwarding.
This entry defines the upstream in iif and contains all interfaces from the
static tree in its oifs. It will be used to forward packet upstream when they
come from an interface belonging to the static tree.
Hence, the user should define (*,G) entries to build its static tree. Note that
upstream interface must be part of oifs: packets are sent to all oifs
interfaces except the input interface. This ensures to always join the whole
static tree, even if the packet is not coming from the upstream interface.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Dichtel [Mon, 21 Jan 2013 06:00:25 +0000 (06:00 +0000)]
mcast: define and use MRT[6]_MAX in ip[6]_mroute_opt()
This will ease further addition of new MRT[6]_* values and avoid to update
in6.h each time.
Note that we reduce the maximum value from 210 to 209, but 210 does not match
any known value in ip[6]_mroute_setsockopt().
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
The original intent of this file was to list limitations in
drivers/hardware relating to multicast use, back when some
modest hardware from the early 1990s did not support things
we might take for granted today.
I was intending to delete some now-gone MCA/token ring entries
in this file, but once I opened it, I found it only contained
information on the earliest (pre-2000) linux networking drivers.
Checking the git history shows that the file hasn't been touched
since 2005. Clearly nobody is actively consulting this file
as a meaningful reference.
Rather than add a "YES YES YES" line for all of the drivers we
currently have, lets just take advantage of the fact that nobody
is using the file to delete it.
This has the side benefit of not having to do a line-by-line
deletion of the file content as each older driver is expired.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:23 +0000 (02:30 +0000)]
qeth: Fix HiperSockets performance regression
Commit 46d3ceab "tcp: TCP Small Queues" has severly degraded
performance for single connection RR workloads on HiperSockets with
MTU >=16K due to a conflict of the TCP Small Queues approach with our
buffer scan threshold which releases buffers not frequently enough yet.
This fix restores performance to the same level as before cited commit.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:22 +0000 (02:30 +0000)]
qeth: Make s390dbf card entries persistent
As of now, s390dbf entries for the cards are discarded as soon as the
device is removed. However, this will also bar us of all chances of
getting valuable debug information after a device has been removed.
This patch will keep the s390dbf entries around until the qeth module
is removed.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:21 +0000 (02:30 +0000)]
qeth: Update Kconfig wording
Refer to virtual NICs instead of GuestLANs.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:20 +0000 (02:30 +0000)]
qeth: Support VEPA mode
The existing port isolation mode 'forward' will now verify that the adjacent
switch port supports the required reflective relay (RR) mode. This patch adds
the required error handling for the cases where enabling port isolation mode
'forward' can now fail.
Furthermore, once established, we never fall back from one of the port
isolation modes to a non-isolated mode without further user-interaction.
This includes cases where the isolation mode was enabled successfully, but
ceases to work e.g. due to configuration changes at the switch port.
Finally, configuring an isolation mode with the device being offline
will make onlining the device fail permanently upon errors encountered until
either errors are resolved or the isolation mode is changed by the user to a
different mode.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:19 +0000 (02:30 +0000)]
qeth: Remove unused exports
Remove exports that are not used anywhere else.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Raspl [Mon, 21 Jan 2013 02:30:18 +0000 (02:30 +0000)]
qeth: Fix retry logic in hardsetup
The previous code did never retry any idx setup unless retries were done
for device offline/online at the beginning of the function.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 21 Jan 2013 18:50:10 +0000 (13:50 -0500)]
Merge branch 'ipv6_ndisc'
YOSHIFUJI Hideaki says:
====================
This series of changes basically clean up NDISC logic,
especially on sender side.
We originally do For NS/NA/RS:
1) build temporary ICMPv6 header
2) ndisc_build_skb() with temporary ICMPv6 header and rather
criptic arguments.
- Calculate total length and allocate sk_buff
- Build IPv6 header.
- copy ICMPv6 header, additional data and ND options.
- Fill-in ICMPv6 checksum.
Here, structures defined for message format was not used
at all, it is difficult to understand what is being sent,
and it was not generic.
3) __ndisc_send()
- Allocate temporary dst.
- Send it.
Several issues:
- We could not defer decision if we should/can send some ND
option.
- It is hard to see the packet format at a glance.
- ICMPv6 header was built as temporary variable, and then
copied to the buffer.
- Some code path for Redirect was not shared.
With these patches, we do:
1) Calculate (or estimate) message length and option length.
2) Allocate skb (via new ndisc_skb_alloc()).
3) Fill-in ICMPv6 message directly using compound literals.
4) Fill-in ICMPv6 checksum
5) Build IPv6 header (including length)
6) Send the packet (via ndisc_send_skb()).
- allocate temporary dst and send it.
- We can defer calculating real length of the packet.
For example, we can give up filling some option at when
filling in.
- Message is built directly without temporary buffer.
- Structures defined for message format is easier to understand
what is being built.
- NS/NA/RS/Redirect share same logic.
- Reduced code/data size:
text data bss dec hex filename
265407 14133 3488 283028 45194 old/net/ipv6/ipv6.o
264955 14109 3488 282552 44fb8 new/net/ipv6/ipv6.o
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Build ICMPv6 message first and make buffer management easier;
we can use skb->len when filling checksum in ICMPv6 header,
and then build IP header with length field.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
ipv6: Unshare ip6_nd_hdr() and change return type to void.
- move ip6_nd_hdr() to its users' source files.
In net/ipv6/mcast.c, it will be called ip6_mc_hdr().
- make return type to void since this function never fails.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Ming Lei [Sat, 19 Jan 2013 01:32:01 +0000 (01:32 +0000)]
usbnet: pegasus: set wakeup enable in set_wol
This patch calls device_set_wakeup_enable() inside set_wol
callback, so that turning on WOL from user mode utility
can make the 'wakeup' of pegasus device to be enabled, then
remote wakeup may be enabled before putting into sleep.
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Petko Manolov <petkan@users.sourceforge.net> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 19 Jan 2013 15:47:47 +0000 (10:47 -0500)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
Included changes:
- sysfs removal postponement during interface un-registration
- random32() function renaming
- struct refactoring
- kernel doc improvement
- deleyed_work initialisation clean up work
- copyright year and internal version number update
- kernel doc improvement
Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Wunderlich [Fri, 11 Jan 2013 09:19:51 +0000 (10:19 +0100)]
batman-adv: postpone sysfs removal when unregistering
When processing the unregister notify for a hard interface, removing
the sysfs files may lead to a circular deadlock (rtnl mutex <->
s_active).
To overcome this problem, postpone the sysfs removal in a worker.
Reported-by: Sasha Levin <sasha.levin@oracle.com> Reported-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Akinobu Mita [Mon, 24 Dec 2012 02:14:07 +0000 (11:14 +0900)]
batman-adv: rename random32() to prandom_u32()
Use more preferable function name which implies using a pseudo-random
number generator.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Cc: Antonio Quartulli <ordex@autistici.org> Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Antonio Quartulli <ordex@autistici.org>
batman-adv: a delayed_work has to be initialised once
A delayed_work struct does not need to be initialized each
every time before being enqueued. Therefore the
INIT_DELAYED_WORK() macro should be used during the
initialization process only.
Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Akeem G. Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Tue, 8 Jan 2013 07:01:03 +0000 (07:01 +0000)]
igb: Replace rmb in Tx cleanup with read_barrier_depends
The rmb in the Tx cleanup path is a much stronger barrier than we really need.
All that is really needed is a read_barrier_depends since the location of the
EOP descriptor is dependent on the eop_desc value.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Greg Rose [Fri, 4 Jan 2013 07:37:31 +0000 (07:37 +0000)]
ixgbevf: Fix statistics corruption
When the physical function (PF) is reset for any reason the statistics
collection in ixgbevf_update_stats needs to wait to update until after
the reset synchronization ensures that the PF driver is up and running
and is finished with its own reset. Go ahead and clear the link flag to
indicate this when the control message from the PF is received. The
reset synchronization and recovery in the watchdog task will eventually
set the link flag up when the PF has resumed.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Greg Rose [Fri, 4 Jan 2013 07:37:20 +0000 (07:37 +0000)]
ixgbevf: Synch out of tree and in tree mailbox interrupt handlers
The out of tree driver and the in kernel driver should use the same
interrupt handling logic for mailbox interrupts. The difference in
the handlers was causing dissimilar behavior between the two drivers
complicating debug and trouble shooting.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Tue, 30 Oct 2012 06:01:55 +0000 (06:01 +0000)]
ixgbe: Improve performance and reduce size of ixgbe_tx_map
This change is meant to both improve the performance and reduce the size of
ixgbe_tx_map. To do this I have expanded the work done in the main loop by
pushing first into tx_buffer. This allows us to pull in the dma_mapping_error
check, the tx_buffer value assignment, and the initial DMA value assignment to
the Tx descriptor. The net result is that the function reduces in size by a
little over a 100 bytes and is about 1% or 2% faster.
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>
Alexander Duyck [Wed, 7 Nov 2012 02:34:28 +0000 (02:34 +0000)]
ixgbe: Update ixgbe Tx flags to improve code efficiency
This change is meant to improve the efficiency of the Tx flags in ixgbe by
aligning them with the values that will later be written into either the
cmd_type or olinfo. By doing this we are able to reduce most of these
functions to either just a simple shift followed by an or in the case of
cmd_type, or an and followed by an or in the case of olinfo.
To do this I also needed to change the logic and/or drop some flags. I
dropped the IXGBE_TX_FLAGS_FSO and it was replaced by IXGBE_TX_FLAGS_TSO since
the only place it was ever checked was in conjunction with IXGBE_TX_FLAGS_TSO.
I replaced IXGBE_TX_FLAGS_TXSW with IXGBE_TX_FLAGS_CC, this way we have a
clear point for what the flag is meant to do. Finally the
IXGBE_TX_FLAGS_NO_IFCS was dropped since were are already carrying the data
for that flag in the skb. Instead we can just check the bitflag in the skb.
In order to avoid type conversion errors I also adjusted the locations
where we were switching between CPU and little endian.
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>
Alexander Duyck [Tue, 30 Oct 2012 06:01:45 +0000 (06:01 +0000)]
ixgbe: Always use context 0, even for FCoE and TSO
We were spending cycles separating the FCoE and TSO contexts even though we
always overwriting the context anyway. Instead of doing that we can just
use context 0 for all descriptors.
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>
Alexander Duyck [Tue, 30 Oct 2012 06:01:40 +0000 (06:01 +0000)]
ixgbe: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check
This change is meant to reduce the overhead for workloads that are not
using either TSO or checksum offloads. Most of the time the compiler
should jump ahead after failing this check to the VLAN check since in the
ixgbe_tx_csum call we start with that check as well.
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>
IEEE DCBx has a mechanism to change the default user priority. In
the normal case the OS can handle this via cgroups, iptables, socket,
options etc.
With SR-IOV and direct assigned VF devices the default priority
needs to be set by the PF device so the inserted VLAN tag is
correct.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Dan Carpenter [Thu, 17 Jan 2013 21:46:18 +0000 (21:46 +0000)]
enic: change sprintf() to snprintf()
These are copying data into 16 char arrays. They all specify that the
first string can't be more than 11 characters but once you add on the
"-rx-" and the NUL character there isn't space for the %d.
The first string is probably never going to be 11 characters, but if it
is then let's truncate the string instead of corrupting memory.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Que [Thu, 17 Jan 2013 09:29:49 +0000 (09:29 +0000)]
net: usb: initialize tmp in dm9601.c to avoid warning
In two places, tmp is initialized implicitly by being passed as a
pointer during a function call. However, this is not obvious to the
compiler, which logs a warning.
Signed-off-by: Simon Que <sque@chromium.org> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Mugunthan V N [Thu, 17 Jan 2013 06:31:34 +0000 (06:31 +0000)]
net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptors
When there is heavy transmission traffic in the CPDMA, then Rx descriptors
memory is also utilized as tx desc memory looses all rx descriptors and the
driver stops working then.
This patch adds boundary for tx and rx descriptors in bd ram dividing the
descriptor memory to ensure that during heavy transmission tx doesn't use
rx descriptors.
This patch is already applied to davinci_emac driver, since CPSW and
davici_dmac shares the same CPDMA, moving the boundry seperation from
Davinci EMAC driver to CPDMA driver which was done in the following
commit
net/davinci: do not use all descriptors for tx packets
The driver uses a shared pool for both rx and tx descriptors.
During open it queues fixed number of 128 descriptors for receive
packets. For each received packet it tries to queue another
descriptor. If this fails the descriptor is lost for rx.
The driver has no limitation on tx descriptors to use, so it
can happen during a nmap / ping -f attack that the driver
allocates all descriptors for tx and looses all rx descriptors.
The driver stops working then.
To fix this limit the number of tx descriptors used to half of
the descriptors available, the rx path uses the other half.
Tested on a custom board using nmap / ping -f to the board from
two different hosts.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Lucas Stach [Wed, 16 Jan 2013 04:24:07 +0000 (04:24 +0000)]
net: asix: handle packets crossing URB boundaries
ASIX AX88772B started to pack data even more tightly. Packets and the ASIX packet
header may now cross URB boundaries. To handle this we have to introduce
some state between individual calls to asix_rx_fixup().
Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: David S. Miller <davem@davemloft.net>