summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net: dont update dev->trans_startEric Dumazet2009-05-2921-39/+10Star
| | | | | | | | | | | | | Second round of drivers for Gb cards (and NIU one I forgot in the 10GB round) Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: dont update dev->trans_start in 10GB driversEric Dumazet2009-05-2916-25/+8Star
| | | | | | | | | | | | | | | | | Followup of commits 9d21493b4beb8f918ba248032fefa393074a5e2b and 08baf561083bc27a953aa087dd8a664bb2b88e8e (net: tx scalability works : trans_start) (net: txq_trans_update() helper) Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Multi queue drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers (vxge & tehuti) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'linux-2.6.31.y' of ↵David S. Miller2009-05-2914-69/+222
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
| * wimax: a new API call was added, increment minor protocol version numberInaky Perez-Gonzalez2009-05-291-1/+1
| | | | | | | | | | | | | | | | As the 'state_get' API call was added, we need to increase the minor protocol version number so applications that depend on the can check it's presence. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * wimax/i2400m: usb: fix device reset on autosuspend while not yet idleInaky Perez-Gonzalez2009-05-291-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the i2400m is connected to a network, the host interface (USB) cannot be suspended. For that to happen, the device has to have negotiated with the basestation to put the link on IDLE state. If the host tries to put the device in standby while it is connected but not idle, the device resets, as the driver should not do that. To avoid triggering that, when the USB susbsytem requires the driver to autosuspend the device, the driver checks if the device is not yet idle. If it is not, the request is requested (will be retried again later on after the autosuspend timeout). At some point the device will enter idle and the request will succeed (unless of course, there is network traffic, but at that point, there is no idle neither in the link or the host interface). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * wimax: Add netlink interface to get device statePaulius Zaleckas2009-05-296-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wimax connection manager / daemon has to know what is current state of the device. Previously it was only possible to get notification whet state has changed. Note: By mistake, the new generic netlink's number for WIMAX_GNL_OP_STATE_GET was declared inserting into the existing list of API calls, not appending; thus, it'd break existing API. Fixed by Inaky Perez-Gonzalez <inaky@linux.intel.com> by moving to the tail, where we add to the interface, not modify the interface. Thanks to Stephen Hemminger <shemminger@vyatta.com> for catching this. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
| * wimax/i2400m: sdio: set the block size before enabling the functionInaky Perez-Gonzalez2009-05-291-9/+9
| | | | | | | | | | | | | | | | | | From a fix by Cindy H Kao: Block size has to be set before sending IOE enable because the firmware reads the block size register before it reads IOE register. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * wimax: document why wimax_msg_*() operations can be used in any stateInaky Perez-Gonzalez2009-05-291-3/+14
| | | | | | | | | | | | | | | | Funcion documentation for wimax_msg_alloc() and wimax_msg_send() needs to clarify that they can be used in the very early stages of a wimax_dev lifecycle. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * wimax/i2400m: remove redundant readiness checks from i2400m_report_tlv_*()Inaky Perez-Gonzalez2009-05-292-7/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functions i2400m_report_tlv*() are only called from i2400m_report_hook(), called in a workqueue by i2400m_report_hook_work(). The scheduler checks for device readiness before scheduling. Added an extra check for readiness in i2400m_report_hook_work(), which makes all the checks down the line redundant. Obviously the device state could change in the middle, but error handling would take care of that. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * wimax/i2400m: factor out 'state report's TLV handling to a functionInaky Perez-Gonzalez2009-05-291-39/+50
| | | | | | | | | | | | | | i2400m_report_state_hook() is going to get messier as we add handling code. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * wimax/i2400m: allow kernel commands to device to be logged tooInaky Perez-Gonzalez2009-05-292-10/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By running 'echo 1 > /sys/kernel/debug/wimax:wmxX/i2400m/trace_msg_from_user', the driver will echo to user space all the commands being sent to the device from user space, along with the responses. However, this only helps with the commands being sent from user space; with this patch, the trace hook is moved to i2400m_msg_to_dev(), which is the single access point for running commands to the device (both by user space and the kernel driver). This allows better debugging by having a complete stream of commands/acks and reports. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * wimax/i2400m: trace commands sent from user space on the "echo" pipeInaky Perez-Gonzalez2009-05-292-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | When commands are sent from user space, trace both the command sent and the answer received over the "echo" pipe instead of over the "trace" pipe when command tracing is enabled. As well, when the device sends a reports/indications, send it over the "echo" pipe. The "trace" pipe is used by the device to send firmware traces; gets confusing. Another named pipe makes it easier to split debug information. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * wimax/i2400m: generate fake source MAC address with random_ether_addr()Inaky Perez-Gonzalez2009-05-293-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WiMAX i2400m driver needs to generate a fake source MAC address to fake an ethernet header (for destination, the card's MAC is used). This is the source of the packet, which is the basestation it came from. The basestation's mac address is not usable for this, as it uses its own namespace and it is not always available. Currently the fake source MAC address was being set to all zeros, which was causing trouble with bridging. Use random_ether_addr() to generate a proper one that creates no trouble. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* | llc: Kill outdated and incorrect comment.David S. Miller2009-05-291-4/+0Star
| | | | | | | | | | | | | | | | This comment suggested storing two pieces of state in the LLC skb control block, and in fact we do. Someone did the implementation but never killed this todo comment :-) Signed-off-by: David S. Miller <davem@davemloft.net>
* | irda: Use SKB queue and list helpers instead of doing it by-hand.David S. Miller2009-05-291-16/+2Star
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | tcp: Use SKB queue and list helpers instead of doing it by-hand.David S. Miller2009-05-292-45/+90
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | econet: Use SKB queue and list helpers instead of doing it by-hand.David S. Miller2009-05-291-14/+4Star
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | decnet: Use SKB queue and list helpers instead of doing it by-hand.David S. Miller2009-05-292-20/+7Star
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | atm: Use SKB queue and list helpers instead of doing it by-hand.David S. Miller2009-05-292-36/+17Star
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | rtl8187: Remove pointless check in rtl8187_rx_cb().David S. Miller2009-05-281-6/+1Star
| | | | | | | | | | | | | | | | | | | | | | First of all, it exposes the SKB list implementation. Second of all it's not needed. If we get called here, we successfully enqueued the URB with the linked SKB and such a completion only gets called one time on such an SKB. Signed-off-by: David S. Miller <davem@davemloft.net>
* | p54: Use SKB list handling helpers instead of by-hand code.David S. Miller2009-05-281-27/+19Star
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | wavelan: Remove bogus debugging on skb->next being non-NULL.David S. Miller2009-05-282-9/+0Star
| | | | | | | | | | | | | | This eliminates explicit references to the SKB list handling implementation. Signed-off-by: David S. Miller <davem@davemloft.net>
* | aoe: Remove superfluous clearing of skb fields in new_skb().David S. Miller2009-05-281-7/+0Star
| | | | | | | | | | | | This code uses alloc_skb() which clears them out for us. Signed-off-by: David S. Miller <davem@davemloft.net>
* | appletalk: Add proper locking around IPDDP routing table.David S. Miller2009-05-281-8/+32
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: correct a comment for the final #endifJiri Pirko2009-05-281-1/+1
| | | | | | | | | | Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: net/core/sock.c cleanupEric Dumazet2009-05-281-59/+44Star
| | | | | | | | | | | | | | Pure style cleanup patch. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: use netdev stats in b44, sundance, via-rhine and via-velocityEric Dumazet2009-05-286-66/+73
| | | | | | | | | | | | | | | | Use struct net_device_stats provided in struct net_device instead of private ones. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: ALIGN/PTR_ALIGN cleanup in alloc_netdev_mq()/netdev_priv()Eric Dumazet2009-05-283-15/+7Star
| | | | | | | | | | | | | | | | | | Use ALIGN() and PTR_ALIGN() macros instead of handcoding them. Get rid of NETDEV_ALIGN_CONST ugly define Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | bridge: avoid an extra space in br_fdb_update()Jiri Pirko2009-05-281-1/+1
| | | | | | | | | | Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | r6040: check and update media statusFlorian Fainelli2009-05-281-1/+5
| | | | | | | | | | | | | | | | | | | | This patch removes the not-that-useful message in the r6040_timer which prints the PHY status. Instead replace it with a call to mii_check_media which will update the link status and print it on startup. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tcp: Do not check flush when comparing options for GROHerbert Xu2009-05-271-1/+1
| | | | | | | | | | | | | | | | | | There is no need to repeatedly check flush when comparing TCP options for GRO as it will be false 99% of the time where it matters. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Store shinfo in local variable in skb_gro_receiveHerbert Xu2009-05-271-10/+12
| | | | | | | | | | | | | | | | This patch stores the two shinfo pointers in local variables because they're used over and over again in skb_gro_receive. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Nasty optimisations for page frags in skb_gro_receiveHerbert Xu2009-05-271-10/+15
| | | | | | | | | | | | | | | | | | | | This patch reverses the direction of the frags array copy in skb_gro_receive in order simplify the loop conditional. It also avoids touching the first element of the original frags array. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Open-code final pskb_may_pullHerbert Xu2009-05-271-4/+19
| | | | | | | | | | | | | | | | | | | | As we know the only packets which need the final pskb_may_pull are completely non-linear, and have all the required bits in frag0, we can perform a straight memcpy instead of going through pskb_may_pull and doing skb_copy_bits. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ipv4: Use 32-bit loads for ID and length in GROHerbert Xu2009-05-271-4/+4
| | | | | | | | | | | | | | | | | | This patch optimises the IPv4 GRO code by using 32-bit loads (instead of 16-bit ones) on the ID and length checks in the receive function. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Avoid unnecessary comparison after skb_gro_headerHerbert Xu2009-05-275-26/+62
| | | | | | | | | | | | | | | | | | | | For the overwhelming majority of cases, skb_gro_header's return value cannot be NULL. Yet we must check it because of its current form. This patch splits it up into multiple functions in order to avoid this. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Optimise length comparison in skb_gro_headerHerbert Xu2009-05-272-3/+9
| | | | | | | | | | | | | | | | | | | | By caching frag0_len, we can avoid checking both frag0 and the length separately in skb_gro_header. This helps as skb_gro_header is called four times per packet which amounts to a few million times at 10Gb/s. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tcp: Optimise len/mss comparisonHerbert Xu2009-05-271-1/+1
| | | | | | | | | | | | | | | | | | Instead of checking len > mss || len == 0, we can accomplish both by checking (len - 1) > mss using the unsigned wraparound. At nearly a million times a second, this might just help. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tcp: Remove unnecessary window comparisons for GROHerbert Xu2009-05-271-1/+1
| | | | | | | | | | | | | | | | The window has already been checked as part of the flag word so there is no need to check it explicitly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tcp: Optimise GRO port comparisonsHerbert Xu2009-05-271-1/+1
| | | | | | | | | | | | | | | | Instead of doing two 16-bit operations for the source/destination ports, we can do one 32-bit operation to take care both. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Only use skb_gro_header for completely non-linear packetsHerbert Xu2009-05-272-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently skb_gro_header is used for packets which put the hardware header in skb->data with the rest in frags. Since the drivers that need this optimisation all provide completely non-linear packets, we can gain extra optimisations by only performing the frag0 optimisation for completely non-linear packets. In particular, we can simply test frag0 (instead of skb_headlen) to see whether the optimisation is in force. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Localise offset/headlen in skb_gro_offsetHerbert Xu2009-05-271-13/+10Star
| | | | | | | | | | | | | | | | This patch stores the offset/headlen in local variables as they're used repeatedly in skb_gro_offset. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Inline skb_gro_header and cache frag0 virtual addressHerbert Xu2009-05-272-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | The function skb_gro_header is called four times per packet which quickly adds up at 10Gb/s. This patch inlines it to allow better optimisations. Some architectures perform multiplication for page_address, which is done by each skb_gro_header invocation. This patch caches that value in skb->cb to avoid the unnecessary multiplications. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: Open-code frags copy in skb_gro_receiveHerbert Xu2009-05-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | gcc does a poor job at generating code for the memcpy of the frags array in skb_gro_receive, which is the primary purpose of that function when merging frags. In particular, it can't utilise the alignment information of the source and destination. This patch open-codes the copy so we process words instead of bytes. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ixgbe: Fix build warningPeter P Waskiewicz Jr2009-05-271-1/+0Star
| | | | | | | | | | | | | | This patch fixes a build warning due to an unused label. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | phy: Eliminate references to BUS_ID_SIZE.David S. Miller2009-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | Just use the constant 20 to keep things working. If someone is so motivated, this can be converted over to dynamic strings. I tried and it's a lot of work. But for now this is good enough. Signed-off-by: David S. Miller <davem@davemloft.net>
* | nl80211: Eliminate reference to BUS_ID_SIZE.David S. Miller2009-05-271-1/+1
| | | | | | | | | | | | | | It's going away. Just leave the constant "20" here so that behavior doesn't change. Signed-off-by: David S. Miller <davem@davemloft.net>
* | sh_eth: Remove references to BUS_ID_SIZE, use MII_BUS_ID_SIZE instead.David S. Miller2009-05-271-1/+1
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | cpmac: Remove references to BUS_ID_SIZE, use MII_BUS_ID_SIZE.David S. Miller2009-05-271-1/+1
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | ixp4xx_eth: Remove references to BUS_ID_SIZE.David S. Miller2009-05-271-2/+2
| | | | | | | | | | | | Use MII_BUS_ID_SIZE instead. Signed-off-by: David S. Miller <davem@davemloft.net>