firefly-linux-kernel-4.4.55.git
18 years ago[PATCH] USB: allow usb drivers to disable dynamic ids
Greg Kroah-Hartman [Wed, 16 Nov 2005 21:41:28 +0000 (13:41 -0800)]
[PATCH] USB: allow usb drivers to disable dynamic ids

This lets drivers, like the usb-serial ones, disable the ability to add
ids from sysfs.

The usb-serial drivers are "odd" in that they are really usb-serial bus
drivers, not usb bus drivers, so the dynamic id logic will have to go
into the usb-serial bus core for those drivers to get that ability.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: add dynamic id functionality to USB core
Greg Kroah-Hartman [Wed, 16 Nov 2005 21:41:28 +0000 (13:41 -0800)]
[PATCH] USB: add dynamic id functionality to USB core

Echo the usb vendor and product id to the "new_id" file in the driver's
sysfs directory, and then that driver will be able to bind to a device
with those ids if it is present.

Example:
echo 0557 2008 > /sys/bus/usb/drivers/foo_driver/new_id
adds the hex values 0557 and 2008 to the device id table for the foo_driver.

Note, usb-serial drivers do not currently work with this capability yet.
usb-storage also might have some oddities.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: reorg some functions out of the main usb.c file
Greg Kroah-Hartman [Wed, 16 Nov 2005 21:41:28 +0000 (13:41 -0800)]
[PATCH] USB: reorg some functions out of the main usb.c file

This will make the dynamic-id stuff easier to do, as it will be
self-contained.

No logic was changed at all.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: make bias writeable in libusual
Pete Zaitcev [Fri, 16 Dec 2005 08:39:36 +0000 (00:39 -0800)]
[PATCH] USB: make bias writeable in libusual

Make the bias parameter writeable. Writing the parameter does not trigger
a rebind of currently attached storage devices.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: drivers/usb/storage/libusual
Pete Zaitcev [Sun, 23 Oct 2005 03:15:09 +0000 (20:15 -0700)]
[PATCH] USB: drivers/usb/storage/libusual

This patch adds a shim driver libusual, which routes devices between
usb-storage and ub according to the common table, based on unusual_devs.h.
The help and example syntax is in Kconfig.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: central handling for host controllers that were reset during suspend...
Alan Stern [Mon, 14 Nov 2005 16:45:38 +0000 (11:45 -0500)]
[PATCH] USB: central handling for host controllers that were reset during suspend/resume

This patch (as515b) adds a routine to usbcore to simplify handling of
host controllers that lost power or were reset during suspend/resume.
The new core routine marks all the child devices of the root hub as
NOTATTACHED and tells khubd to disconnect the device structures as soon
as possible.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: dummy_hcd: rename variables
Alan Stern [Mon, 14 Nov 2005 17:16:30 +0000 (12:16 -0500)]
[PATCH] USB: dummy_hcd: rename variables

The recent platform_device update has reintroduced into dummy_hcd.c the
dreaded dev->dev syndrome.  This harkens back to when an earlier version
of that driver included the unforgettable line:

dev->dev.dev.driver_data = dev;

This patch (as602) renames the platform_device variables to "pdev", in
the hope of reducing confusion.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: usb-net: new device ID passed through module parameter
A.YOSHIYAMA [Tue, 15 Nov 2005 07:55:18 +0000 (09:55 +0200)]
[PATCH] USB: usb-net: new device ID passed through module parameter

adds new module parameter "devid" that points to a string with format
"device_name:vendor_id:device_id:flags".  if provided at module load
time, this string is being parsed and a new entry is created in
usb_dev_id[] and pegasus_ids[] so the new device can later be recognized
by the probe routine.  this might be helpful for someone who don't
know/wish to build new module/kernel, but want to use his new usb-to-eth
device that is not yet listed in pegasus.h

Signed-off-by: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: usb-net: removes redundant return
Petko Manolov [Tue, 15 Nov 2005 07:48:23 +0000 (09:48 +0200)]
[PATCH] USB: usb-net: removes redundant return

removes all redundant collecting of the return value from
get/set_registers() and suchlike.  can't remember who put all of those
some time ago, but they doesn't make any sense to me.  where needed only
a few references remained;

Signed-off-by: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: file-storage gadget: Add reference count for children
Alan Stern [Wed, 9 Nov 2005 21:59:56 +0000 (16:59 -0500)]
[PATCH] USB: file-storage gadget: Add reference count for children

This patch (as601) adds a proper reference count to the file-storage
gadget's main data structure, to keep track of references held by child
devices (LUNs in this case).  Before this, the driver would wait for
each child to be released before unbinding.

While there's nothing really wrong with that (you can't create a hang by
doing "rmmod g_file_storage </sys/.../lun0/ro" since the open file will
prevent rmmod from running), the code might as well follow the standard
procedures.  Besides, this shrinks the size of the structure by a few
words...  :-)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: hcd uses EXTRA_CFLAGS for -DDEBUG
David Brownell [Tue, 8 Nov 2005 04:45:20 +0000 (20:45 -0800)]
[PATCH] USB: hcd uses EXTRA_CFLAGS for -DDEBUG

This modifies the HCD builds to automatically "-DDEBUG" if
CONFIG_USB_DEBUG is selected.  It's just a minor source code cleanup,
guaranteeing consistency.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: wakeup flag updates (3/3) isp116x-hcd
David Brownell [Mon, 7 Nov 2005 23:38:24 +0000 (15:38 -0800)]
[PATCH] USB: wakeup flag updates (3/3) isp116x-hcd

This makes the ISP116x HCD use the driver model wakeup flags for its
controller, not the flags in the HCD glue (which will be removed).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: wakeup flag updates (2/3) uhci-hcd
David Brownell [Mon, 7 Nov 2005 23:34:41 +0000 (15:34 -0800)]
[PATCH] USB: wakeup flag updates (2/3) uhci-hcd

This makes UHCI stop using the HCD glue wakeup flags to report whether
the controller can wake the system.  The existing code was wrong anyway;
having a PCI PM capability doesn't imply it reports PME# is supported.

I skimmed Intel's ICH7 datasheet and that basically says the wakeup
signaling gets routed only through ACPI registers.  (On the other hand,
many VIA chips provide the PCI PM capabilities...)  I think that doing
this correctly with UHCI is going to require the ACPI folk to associate
the /proc/acpi/wakeup identifiers (and wakeup enable/disable flags)
with the relevant /sys/devices/pci*/...  devices.

From: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: wakeup flag updates (1/3) sl811-hcd
David Brownell [Mon, 7 Nov 2005 23:31:25 +0000 (15:31 -0800)]
[PATCH] USB: wakeup flag updates (1/3) sl811-hcd

This makes the SL811 HCD use the driver model wakeup flags for its
controller, not the flags in the HCD glue (which will be removed).

From: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 drivers/usb/host/sl811-hcd.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

18 years ago[PATCH] USB: ehci fix driver model wakeup flags
David Brownell [Fri, 23 Dec 2005 01:05:18 +0000 (17:05 -0800)]
[PATCH] USB: ehci fix driver model wakeup flags

On some systems, EHCI seems to be getting IRQs too early during driver
setup ... before the root hub is allocated, in particular, making trouble
for any code chasing down root hub pointers!  In this case, it seems to
be safe to just ignore the root hub setting.  Thanks to Rafael J. Wysocki
for getting this properly tested.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: EHCI updates (4/4) driver model wakeup flags
David Brownell [Mon, 7 Nov 2005 23:24:46 +0000 (15:24 -0800)]
[PATCH] USB: EHCI updates (4/4) driver model wakeup flags

This teaches the EHCI driver to use the new driver model wakeup flags,
replacing the similar ones in the HCD glue.  It also adds a workaround
for the current glitch whereby PCI init doesn't init the wakeup flags
from the PCI PM capabilities.  (EHCI controllers don't worry about
legacy mode; the PCI PM capability would always do the job.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: Eagle and ADI 930 usb adsl modem driver fix
matthieu castet [Mon, 7 Nov 2005 23:02:30 +0000 (00:02 +0100)]
[PATCH] USB: Eagle and ADI 930 usb adsl modem driver fix

More care on loading firmware, take into account fw->size can't be zero.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: Eagle and ADI 930 usb adsl modem driver
matthieu castet [Mon, 7 Nov 2005 22:27:13 +0000 (23:27 +0100)]
[PATCH] USB: Eagle and ADI 930 usb adsl modem driver

A driver for USB ADSL modems based on the ADI eagle chipset using the
usb_atm infrastructure.

The managing part was taken from bsd ueagle driver, other parts were
written from scratch.

The driver uses the in-kernel firmware loader :
- to load  a first usb firmware when the modem is in pre-firmware state
- to load the dsp firmware that are swapped in host memory.
- to load CMV (configuration and management variables) when the modem
boot. (We can't use options or sysfs for this as there many possible
values. See
https://mail.gna.org/public/eagleusb-dev/2005-04/msg00031.html for a
description of some)
- to load fpga code for 930 chipset.

The device had 4 endpoints :
* 2 for data (use by usbatm). The incoming
endpoint could be iso or bulk. The modem seems buggy and produce lot's
of atm errors when using it in bulk mode for speed > 3Mbps, so iso
endpoint is need for speed > 3Mbps. At the moment iso endpoint need a
patched usbatm library and for this reason is not included in this patch.

* One bulk endpoint for uploading dsp firmware

* One irq endpoint that notices the driver
    - if we need to upload a page of the dsp firmware
    - an ack for read or write CMV and the value (for the read case).

If order to make the driver cleaner, we design synchronous
(read|write)_cmv :
-send a synchronous control message to the modem
-wait for an ack or a timeout
-return the value if needed.

In order to run these synchronous usb messages we need a kernel thread.

The driver has been tested  with sagem fast 800 modems with different
eagle chipset revision and with ADI 930 since April 2005.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: EHCI: fix conflation of buf == 0 with len == 0
Alan Stern [Thu, 3 Nov 2005 16:44:49 +0000 (11:44 -0500)]
[PATCH] USB: EHCI: fix conflation of buf == 0 with len == 0

When the ehci-hcd driver prepares a control URB, it tests for a
zero-length data stage by looking at the transfer_dma value instead of
the transfer_buffer_length.  (In fact it does this even for non-control
URBs, which is an additional aspect of the same bug.)

However, under certain circumstances it's possible for transfer_dma to
be 0 while transfer_buffer_length is non-zero.  This can happen when a
freshly allocated page (mapped to address 0 and marked Copy-On-Write,
but never written to) is used as the source buffer for an OUT transfer.
This patch (as598) fixes the problem.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: isp116x-hcd: cleanup
Olav Kongas [Thu, 3 Nov 2005 15:38:14 +0000 (17:38 +0200)]
[PATCH] USB: isp116x-hcd: cleanup

The attached patch makes a cleanup of isp116x-hcd. Most of the volume of
the patch comes from 2 sources: moving the code around to get rid of a
few function prototypes and reworking register dumping functions/macros.
Among other things, switched over from using procfs to debugfs.

Cleanup. The following changes were made:

- Rework register dumping code so it can be used for dumping
  to both syslog and debugfs.
- Switch from procfs to debugfs..
- Die gracefully on Unrecoverable Error interrupt.
- Fix memory leak in isp116x_urb_enqueue(), if HC happens to
  die in a narrow time window.
- Fix a 'sparce' warning (unnecessary cast).
- Report Devices Removable for root hub ports by default
  (was Devices Permanently Attached).
- Move bus suspend/resume functions down in code to get rid of
  a few function prototypes.
- A number of one-line cleanups.
- Add an entry to MAINTAINERS.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 MAINTAINERS                    |    6
 drivers/usb/host/isp116x-hcd.c |  429 ++++++++++++++++-------------------------
 drivers/usb/host/isp116x.h     |   83 +++++--
 3 files changed, 230 insertions(+), 288 deletions(-)

18 years ago[PATCH] USB: isp116x-hcd: support reiniting HC on resume
Olav Kongas [Fri, 28 Oct 2005 12:04:45 +0000 (15:04 +0300)]
[PATCH] USB: isp116x-hcd: support reiniting HC on resume

Until now the isp116x-hcd had no support to reinitialize the HC on
resume, if the controller lost its state during suspend. This patch,
generated against your Oct 26 git tree, adds that support. The patch is
basically the same as the one tested by Ivan Kalatchev, who reported the
problem, on 2.6.13.

Please apply,

Support reinitializing the isp116x host controller from scratch on
resume, if the controller has lost its state.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: Converting cdc acm to a ring queue
David Kubicek [Tue, 1 Nov 2005 17:51:34 +0000 (18:51 +0100)]
[PATCH] USB: Converting cdc acm to a ring queue

this patch by David converts the sending queue of the CDC ACM driver
to a queue of URBs. This is needed for quicker devices. Please apply.

Signed-Off-By: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 drivers/usb/class/cdc-acm.c |  229 ++++++++++++++++++++++++++++++--------------
 drivers/usb/class/cdc-acm.h |   33 +++++-
 2 files changed, 185 insertions(+), 77 deletions(-)

18 years ago[PATCH] USB: Add pxa27x OHCI PM functions
Richard Purdie [Sat, 12 Nov 2005 14:22:14 +0000 (14:22 +0000)]
[PATCH] USB: Add pxa27x OHCI PM functions

Add power management functions for the pxa27x USB OHCI host controller.
This is a totally rewritten version of the patch by Nicolas Pitre and
Todd Poynor which accounts for recent USB changes.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: pxa27x OHCI - Separate platform code from main driver
Richard Purdie [Sat, 12 Nov 2005 14:22:11 +0000 (14:22 +0000)]
[PATCH] USB: pxa27x OHCI - Separate platform code from main driver

To allow multiple platforms to use the PXA27x OHCI driver, the platform
code needs to be moved into the board specific files in
arch/arm/mach-pxa. This patch does this for mainstone and adds
preliminary hooks to allow other boards to use the driver.

This has been compile tested for mainstone and successfully run on Spitz
(Sharp Zaurus SL-C3000) with the addition of an appropriate board
support file.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[ALSA] ad1889 - remove CVS ID from the driver identification
Jaroslav Kysela [Wed, 4 Jan 2006 09:26:16 +0000 (10:26 +0100)]
[ALSA] ad1889 - remove CVS ID from the driver identification

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
18 years ago[ALSA] opl3 - Fix the unreleased resources
Takashi Iwai [Tue, 3 Jan 2006 18:56:55 +0000 (19:56 +0100)]
[ALSA] opl3 - Fix the unreleased resources

Modules: OPL3

Fix the unreleased resources in the error path of snd_opl3_create().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
18 years ago[ALSA] Revert the nested-device patch
Takashi Iwai [Tue, 3 Jan 2006 18:54:44 +0000 (19:54 +0100)]
[ALSA] Revert the nested-device patch

Modules: ALSA Core

Revert the nested-device patch to keep the compatibility with the
current HAL configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
18 years ago[ALSA] dummy driver - added CA0106 emulation defines
Jaroslav Kysela [Tue, 3 Jan 2006 13:27:21 +0000 (14:27 +0100)]
[ALSA] dummy driver - added CA0106 emulation defines

Modules: Generic drivers

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
18 years ago[ALSA] version 1.0.11rc2
Jaroslav Kysela [Wed, 4 Jan 2006 09:13:22 +0000 (10:13 +0100)]
[ALSA] version 1.0.11rc2

18 years ago[IPVS]: Add missing include <linux/net.h>
Arnaldo Carvalho de Melo [Wed, 4 Jan 2006 04:02:20 +0000 (02:02 -0200)]
[IPVS]: Add missing include <linux/net.h>

  CC [M]  net/ipv4/ipvs/ip_vs_conn.o
  /pub/scm/linux/kernel/git/acme/net-2.6/net/ipv4/ipvs/ip_vs_conn.c: In
  function 'ip_vs_conn_new':
  /pub/scm/linux/kernel/git/acme/net-2.6/net/ipv4/ipvs/ip_vs_conn.c:606:
  warning: implicit declaration of function 'net_ratelimit'
  /pub/scm/linux/kernel/git/acme/net-2.6/net/ipv4/ipvs/ip_vs_conn.c: In
  function 'ip_vs_random_dropentry':
  /pub/scm/linux/kernel/git/acme/net-2.6/net/ipv4/ipvs/ip_vs_conn.c:810:
  warning: implicit declaration of function 'net_random'

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[TCP]: syn_flood_warning is only needed if CONFIG_SYN_COOKIES is selected
Arnaldo Carvalho de Melo [Wed, 4 Jan 2006 03:58:06 +0000 (01:58 -0200)]
[TCP]: syn_flood_warning is only needed if CONFIG_SYN_COOKIES is selected

  CC      net/ipv4/tcp_ipv4.o
  /pub/scm/linux/kernel/git/acme/net-2.6/net/ipv4/tcp_ipv4.c:665: warning:
  'syn_flood_warning' defined but not used

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[DCCP] ackvec: use u8 for the buf offsets
Arnaldo Carvalho de Melo [Wed, 4 Jan 2006 03:46:34 +0000 (01:46 -0200)]
[DCCP] ackvec: use u8 for the buf offsets

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[DCCP] ackvec: Fix spelling of "throw"
Andrea Bittau [Wed, 4 Jan 2006 03:45:17 +0000 (01:45 -0200)]
[DCCP] ackvec: Fix spelling of "throw"

Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
18 years ago[TCP]: less inline's
Stephen Hemminger [Wed, 4 Jan 2006 00:03:49 +0000 (16:03 -0800)]
[TCP]: less inline's

TCP inline usage cleanup:
 * get rid of inline in several places
 * replace __inline__ with inline where possible
 * move functions used in one file out of tcp.h
 * let compiler decide on used once cases

On x86_64:
   text    data     bss     dec     hex filename
3594701  648348  567400 4810449  4966d1 vmlinux.orig
3593133  648580  567400 4809113  496199 vmlinux

On sparc64:
   text    data     bss     dec     hex filename
2538278  406152  530392 3474822  350586 vmlinux.ORIG
2536382  406384  530392 3473158  34ff06 vmlinux

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IEEE80211] ipw2200: Simplify multicast checks.
Stephen Hemminger [Tue, 3 Jan 2006 23:27:38 +0000 (15:27 -0800)]
[IEEE80211] ipw2200: Simplify multicast checks.

From: Stephen Hemminger <shemminger@osdl.org>

is_multicast_ether_addr() accepts broadcast too, so the
is_broadcast_ether_addr() calls are redundant.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Don't exclude broadcast addresses from is_multicast_ether_addr()
Stephen Hemminger [Tue, 3 Jan 2006 23:25:45 +0000 (15:25 -0800)]
[NET]: Don't exclude broadcast addresses from is_multicast_ether_addr()

The check for multicast shouldn't exclude broadcast type addresses.
This reverts the incorrect change done in 2.6.13.

The broadcast address is a multicast address and should be excluded
from being a valid_ether_address for use in bridging or device address.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4] fib_trie: build fix
Stephen Hemminger [Tue, 3 Jan 2006 22:38:34 +0000 (14:38 -0800)]
[IPV4] fib_trie: build fix

Need this to fix build of fib_trie in net-2.6.16 (rebased) tree.
The code needs the new inet_make_mask inline.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: Fix faulty check in br_stp_recalculate_bridge_id()
Stephen Hemminger [Tue, 3 Jan 2006 22:35:54 +0000 (14:35 -0800)]
[BRIDGE]: Fix faulty check in br_stp_recalculate_bridge_id()

One of the conversions from memcmp to compare_ether_addr is incorrect.
We need to do relative comparison to determine min MAC address to
use in bridge id.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Notify CCID only after ACK vectors have been processed.
Andrea Bittau [Tue, 3 Jan 2006 22:26:15 +0000 (14:26 -0800)]
[DCCP]: Notify CCID only after ACK vectors have been processed.

The CCID should be notified of packet reception only when a packet is
valid.  Therefore, the ACK vector needs to be processed before
notifying the CCID.  Also, the CCID might need information provided by
the ACK vector.

Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Send an ACK vector when ACKing a response packet
Andrea Bittau [Tue, 3 Jan 2006 22:25:49 +0000 (14:25 -0800)]
[DCCP]: Send an ACK vector when ACKing a response packet

If ACK vectors are used, each packet with an ACK should contain an ACK
vector.  The only exception currently is response packets.  It
probably is not a good idea to store ACK vector state before the
connection is completed (to help protect from syn floods).

Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Do not process a packet twice when it's not in state DCCP_OPEN.
Andrea Bittau [Tue, 3 Jan 2006 22:25:17 +0000 (14:25 -0800)]
[DCCP]: Do not process a packet twice when it's not in state DCCP_OPEN.

When packets are received, the connection is either in DCCP_OPEN
[fast-path] or it isn't.  If it's not [e.g. DCCP_PARTOPEN] upper
layers will perform sanity checks and parse options.  If it is in
DCCP_OPEN, dccp_rcv_established() will do it.  It is important not to
re-parse options in dccp_rcv_established() when it is not called from
the fast-path.  Else, fore example, the ack vector will be added twice
and the CCID will see the packet twice.

The solution is to always enfore sanity checks from the upper layers.
When packets arrive in the fast-path, sanity checks will be performed
before calling dccp_rcv_established().

Note(acme): I rewrote the patch to achieve the same result but keeping
dccp_rcv_established with the previous semantics and having it split
into __dccp_rcv_established, that doesn't does do any sanity check,
code in state != DCCP_OPEN use this lighter version as they already do
the sanity checks.

Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DECNET]: Only use local routers
Patrick Caulfield [Tue, 3 Jan 2006 22:24:02 +0000 (14:24 -0800)]
[DECNET]: Only use local routers

The attached patch makes DECnet routing only use routers from the same
area - rather than the highest rated router seen.

In theory there should not be an out-of-area router on a local network
but some networks are bridged rather than properly routed. VMS seems
to behave similarly: if I bring up a VMS node with no router then it
can't see anything else on the global network.

Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPVS]: Cleanup IP_VS_DBG statements.
Roberto Nibali [Tue, 3 Jan 2006 22:22:59 +0000 (14:22 -0800)]
[IPVS]: Cleanup IP_VS_DBG statements.

From: Roberto Nibali <ratz@drugphish.ch>

The attached patch (against current -GIT) is a cleanup patch which does
following:

o lookup debug messages shifted back to 9
o added more informational value to flags and refcnt since those
entries can be in multiple referenced structures
o cleanup 80 char violation

It's the prepatch to the session pool implementation and helps very much
to debug and monitor important variables and structures regarding the
threshold limitation and persistency without the thousands of lookup
messages which noone is interested in.

Signed-off-by: Horms <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: fixup tot_len calculation
Alexey Dobriyan [Tue, 3 Jan 2006 22:19:25 +0000 (14:19 -0800)]
[TG3]: fixup tot_len calculation

Turning struct iphdr::tot_len into __be16 added sparse warning.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Add a dev_ioctl() fallback to sock_ioctl()
Christoph Hellwig [Tue, 3 Jan 2006 22:18:33 +0000 (14:18 -0800)]
[NET]: Add a dev_ioctl() fallback to sock_ioctl()

Currently all network protocols need to call dev_ioctl as the default
fallback in their ioctl implementations.  This patch adds a fallback
to dev_ioctl to sock_ioctl if the protocol returned -ENOIOCTLCMD.
This way all the procotol ioctl handlers can be simplified and we don't
need to export dev_ioctl.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETROM]: Remove unessecary lock_sock calls in netrom_ioctl()
Christoph Hellwig [Tue, 3 Jan 2006 22:14:46 +0000 (14:14 -0800)]
[NETROM]: Remove unessecary lock_sock calls in netrom_ioctl()

lock_sock is needed only in very few cases, so do it there instead of
around the switch statement.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETLINK] genetlink: fix cmd type in genl_ops to be consistent to u8
Per Liden [Tue, 3 Jan 2006 22:13:29 +0000 (14:13 -0800)]
[NETLINK] genetlink: fix cmd type in genl_ops to be consistent to u8

Signed-off-by: Per Liden <per.liden@ericsson.com>
ACKed-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AF_UNIX]: Convert to use a spinlock instead of rwlock
Benjamin LaHaise [Tue, 3 Jan 2006 22:10:46 +0000 (14:10 -0800)]
[AF_UNIX]: Convert to use a spinlock instead of rwlock

From: Benjamin LaHaise <bcrl@kvack.org>

In af_unix, a rwlock is used to protect internal state.  At least on my
P4 with HT it is faster to use a spinlock due to the simpler memory
barrier used to unlock.  This patch raises bw_unix to ~690K/s.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Speed up __alloc_skb()
Benjamin LaHaise [Tue, 3 Jan 2006 22:06:50 +0000 (14:06 -0800)]
[NET]: Speed up __alloc_skb()

From: Benjamin LaHaise <bcrl@kvack.org>

In __alloc_skb(), the use of skb_shinfo() which casts a u8 * to the
shared info structure results in gcc being forced to do a reload of the
pointer since it has no information on possible aliasing.  Fix this by
using a pointer to refer to skb_shared_info.

By initializing skb_shared_info sequentially, the write combining buffers
can reduce the number of memory transactions to a single write.  Reorder
the initialization in __alloc_skb() to match the structure definition.
There is also an alignment issue on 64 bit systems with skb_shared_info
by converting nr_frags to a short everything packs up nicely.

Also, pass the slab cache pointer according to the fclone flag instead
of using two almost identical function calls.

This raises bw_unix performance up to a peak of 707KB/s when combined
with the spinlock patch.  It should help other networking protocols, too.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PPPOX]: Fix assignment into const proto_ops.
David S. Miller [Wed, 28 Dec 2005 04:57:40 +0000 (20:57 -0800)]
[PPPOX]: Fix assignment into const proto_ops.

And actually, with this, the whole pppox layer can basically
be removed and subsumed into pppoe.c, no other pppox sub-protocol
implementation exists and we've had this thing for at least 4
years.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP]: Don't use __constant_htonl for a non const arg
Arnaldo Carvalho de Melo [Tue, 27 Dec 2005 17:17:57 +0000 (15:17 -0200)]
[TCP]: Don't use __constant_htonl for a non const arg

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h
Arnaldo Carvalho de Melo [Tue, 27 Dec 2005 04:43:12 +0000 (02:43 -0200)]
[INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h

To help in reducing the number of include dependencies, several files were
touched as they were getting needed headers indirectly for stuff they use.

Thanks also to Alan Menegotto for pointing out that net/dccp/proto.c had
linux/dccp.h include twice.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SOCK]: Introduce sk_receive_skb
Arnaldo Carvalho de Melo [Tue, 27 Dec 2005 04:42:22 +0000 (02:42 -0200)]
[SOCK]: Introduce sk_receive_skb

Its common enough to to justify that, TCP still can't use it as it has the
prequeueing stuff, still to be made generic in the not so distant future :-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: restructure sock_aio_{read,write} / sock_{readv,writev}
Christoph Hellwig [Fri, 23 Dec 2005 05:08:46 +0000 (21:08 -0800)]
[NET]: restructure sock_aio_{read,write} / sock_{readv,writev}

Mid-term I plan to restructure the file_operations so that we don't need
to have all these duplicate aio and vectored versions.  This patch is
a small step in that direction but also a worthwile cleanup on it's own:

(1) introduce a alloc_sock_iocb helper that encapsulates allocating a
    proper sock_iocb
(2) add do_sock_read and do_sock_write helpers for common read/write
    code

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Fix sock_init() return value.
David S. Miller [Thu, 22 Dec 2005 20:58:55 +0000 (12:58 -0800)]
[NET]: Fix sock_init() return value.

It needs to return zero now that it is an initcall.

Also, net/nonet.c no longer needs a dummy sock_init().

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKTGEN]: Deinitialise static variables.
Jaco Kroon [Thu, 22 Dec 2005 20:51:46 +0000 (12:51 -0800)]
[PKTGEN]: Deinitialise static variables.

static variables should not be explicitly initialised to 0.  This causes
them to be placed in .data instead of .bss.  This patch de-initialises 3
static variables in net/core/pktgen.c.

There are approximately 800 more such variables in the source tree
(2.6.15rc5).  If there is more interrest I'd be willing to track down the
rest of these as well and de-initialise them as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: move struct proto_ops to const
Eric Dumazet [Thu, 22 Dec 2005 20:49:22 +0000 (12:49 -0800)]
[NET]: move struct proto_ops to const

I noticed that some of 'struct proto_ops' used in the kernel may share
a cache line used by locks or other heavily modified data. (default
linker alignement is 32 bytes, and L1_CACHE_LINE is 64 or 128 at
least)

This patch makes sure a 'struct proto_ops' can be declared as const,
so that all cpus can share all parts of it without false sharing.

This is not mandatory : a driver can still use a read/write structure
if it needs to (and eventually a __read_mostly)

I made a global stubstitute to change all existing occurences to make
them const.

This should reduce the possibility of false sharing on SMP, and
speedup some socket system calls.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Small cleanup to socket initialization
Andi Kleen [Thu, 22 Dec 2005 20:43:42 +0000 (12:43 -0800)]
[NET]: Small cleanup to socket initialization

sock_init can be done as a core_initcall instead of calling
it directly in init/main.c

Also I removed an out of date #ifdef.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Add support for SCTP_DELAYED_ACK_TIME socket option.
Frank Filz [Thu, 22 Dec 2005 19:37:30 +0000 (11:37 -0800)]
[SCTP]: Add support for SCTP_DELAYED_ACK_TIME socket option.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Update SCTP_PEER_ADDR_PARAMS socket option to the latest api draft.
Frank Filz [Thu, 22 Dec 2005 19:36:46 +0000 (11:36 -0800)]
[SCTP]: Update SCTP_PEER_ADDR_PARAMS socket option to the latest api draft.

This patch adds support to set/get heartbeat interval, maximum number of
retransmissions, pathmtu, sackdelay time for a particular transport/
association/socket as per the latest SCTP sockets api draft11.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4] fib_trie: Add credits.
Robert Olsson [Thu, 22 Dec 2005 19:25:10 +0000 (11:25 -0800)]
[IPV4] fib_trie: Add credits.

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP] cubic: use Newton-Raphson
Stephen Hemminger [Thu, 22 Dec 2005 03:32:36 +0000 (19:32 -0800)]
[TCP] cubic: use Newton-Raphson

Replace cube root algorithim with a faster version using Newton-Raphson.
Surprisingly, doing the scaled div64_64 is faster than a true 64 bit
division on 64 bit CPU's.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP] cubic: precompute constants
Stephen Hemminger [Thu, 22 Dec 2005 03:32:08 +0000 (19:32 -0800)]
[TCP] cubic: precompute constants

Revised version of patch to pre-compute values for TCP cubic.
  * d32,d64 replaced with descriptive names
  * cube_factor replaces
 srtt[scaled by count] / HZ * ((1 << (10+2*BICTCP_HZ)) / bic_scale)
  * beta_scale replaces
8*(BICTCP_BETA_SCALE+beta)/3/(BICTCP_BETA_SCALE-beta);

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[FLS64]: x86_64 version
Stephen Hemminger [Thu, 22 Dec 2005 03:31:36 +0000 (19:31 -0800)]
[FLS64]: x86_64 version

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[FLS64]: generic version
Stephen Hemminger [Thu, 22 Dec 2005 03:30:53 +0000 (19:30 -0800)]
[FLS64]: generic version

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKT_SCHED] netem: packet corruption option
Stephen Hemminger [Thu, 22 Dec 2005 03:03:44 +0000 (19:03 -0800)]
[PKT_SCHED] netem: packet corruption option

Here is a new feature for netem in 2.6.16. It adds the ability to
randomly corrupt packets with netem. A version was done by
Hagen Paul Pfeifer, but I redid it to handle the cases of backwards
compatibility with netlink interface and presence of hardware checksum
offload. It is useful for testing hardware offload in devices.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: add version number
Stephen Hemminger [Thu, 22 Dec 2005 03:01:30 +0000 (19:01 -0800)]
[BRIDGE]: add version number

Add version info to bridge module.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: limited ethtool support
Stephen Hemminger [Thu, 22 Dec 2005 03:00:58 +0000 (19:00 -0800)]
[BRIDGE]: limited ethtool support

Add limited ethtool support to bridge to allow disabling
features.

Note: if underlying device does not support a feature (like checksum
offload), then the bridge device won't inherit it.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: filter packets in learning state
Stephen Hemminger [Thu, 22 Dec 2005 03:00:18 +0000 (19:00 -0800)]
[BRIDGE]: filter packets in learning state

While in the learning state, run filters but drop the result.
This prevents us from acquiring bad fdb entries in learning state.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: handle speed detection after carrier changes
Stephen Hemminger [Tue, 20 Dec 2005 23:19:51 +0000 (15:19 -0800)]
[BRIDGE]: handle speed detection after carrier changes

Speed of a interface may not be available until carrier
is detected in the case of autonegotiation. To get the correct value
we need to recheck speed after carrier event.  But the check needs to
be done in a context that is similar to normal ethtool interface (can sleep).

Also, delay check for 1ms to try avoid any carrier bounce transitions.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: allow setting hardware address of bridge pseudo-dev
Stephen Hemminger [Thu, 22 Dec 2005 02:51:49 +0000 (18:51 -0800)]
[BRIDGE]: allow setting hardware address of bridge pseudo-dev

Some people are using bridging to hide multiple machines from an ISP
that restricts by MAC address. So in that case allow the bridge mac
address to be set to any of the existing interfaces.  I don't want to
allow any arbitrary value and confuse STP.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AF_UNIX]: Use spinlock for unix_table_lock
David S. Miller [Wed, 14 Dec 2005 07:26:29 +0000 (23:26 -0800)]
[AF_UNIX]: Use spinlock for unix_table_lock

This lock is actually taken mostly as a writer,
so using a rwlock actually just makes performance
worse especially on chips like the Intel P4.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IP_SOCKGLUE]: Remove most of the tcp specific calls
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:26:10 +0000 (23:26 -0800)]
[IP_SOCKGLUE]: Remove most of the tcp specific calls

As DCCP needs to be called in the same spots.

Now we have a member in inet_sock (is_icsk), set at sock creation time from
struct inet_protosw->flags (if INET_PROTOSW_ICSK is set, like for TCP and
DCCP) to see if a struct sock instance is a inet_connection_sock for places
like the ones in ip_sockglue.c (v4 and v6) where we previously were looking if
sk_type was SOCK_STREAM, that is insufficient because we now use the same code
for DCCP, that has sk_type SOCK_DCCP.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP]: Move the TCPF_ enum to tcp_states.h
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:25:56 +0000 (23:25 -0800)]
[TCP]: Move the TCPF_ enum to tcp_states.h

Upcoming patches will make, for instance, ip_sockglue.c need just this enum
and not all of tcp.h.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[INET6]: Generalise tcp_v6_hash_connect
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:25:44 +0000 (23:25 -0800)]
[INET6]: Generalise tcp_v6_hash_connect

Renaming it to inet6_hash_connect, making it possible to ditch
dccp_v6_hash_connect and share the same code with TCP instead.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[INET]: Generalise tcp_v4_hash_connect
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:25:31 +0000 (23:25 -0800)]
[INET]: Generalise tcp_v4_hash_connect

Renaming it to inet_hash_connect, making it possible to ditch
dccp_v4_hash_connect and share the same code with TCP instead.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TWSK]: Introduce struct timewait_sock_ops
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:25:19 +0000 (23:25 -0800)]
[TWSK]: Introduce struct timewait_sock_ops

So that we can share several timewait sockets related functions and
make the timewait mini sockets infrastructure closer to the request
mini sockets one.

Next changesets will take advantage of this, moving more code out of
TCP and DCCP v4 and v6 to common infrastructure.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Use reqsk_free in dccp_v4_conn_request
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:25:06 +0000 (23:25 -0800)]
[DCCP]: Use reqsk_free in dccp_v4_conn_request

Now we have the destructor (dccp_v4_reqsk_destructor) in our
request_sock_ops vtable.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Introduce DCCPv6
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:24:53 +0000 (23:24 -0800)]
[DCCP]: Introduce DCCPv6

Still needs mucho polishing, specially in the checksum code, but works
just fine, inet_diag/iproute2 and all 8)

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Export ipv6_opt_accepted
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:24:28 +0000 (23:24 -0800)]
[IPV6]: Export ipv6_opt_accepted

It was already non-TCP specific, will be used by DCCPv6.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Prepare the AF agnostic core for the introduction of DCCPv6
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:24:16 +0000 (23:24 -0800)]
[DCCP]: Prepare the AF agnostic core for the introduction of DCCPv6

Basically exports a similar set of functions as the one exported by
the non-AF specific TCP code.

In the process moved some non-AF specific code from dccp_v4_connect to
dccp_connect_init and moved the checksum verification from
dccp_invalid_packet to dccp_v4_rcv, so as to use it in dccp_v6_rcv
too.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Just rename dccp_v4_prot to dccp_prot
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:23:32 +0000 (23:23 -0800)]
[DCCP]: Just rename dccp_v4_prot to dccp_prot

To match TCP equivalent.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Export some symbols for DCCPv6
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:23:20 +0000 (23:23 -0800)]
[IPV6]: Export some symbols for DCCPv6

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Introduce inet6_timewait_sock
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:23:09 +0000 (23:23 -0800)]
[IPV6]: Introduce inet6_timewait_sock

Out of tcp6_timewait_sock, that now is just an aggregation of
inet_timewait_sock and inet6_timewait_sock, using tw_ipv6_offset in struct
inet_timewait_sock, that is common to the IPv6 transport protocols that use
timewait sockets, like DCCP and TCP.

tw_ipv6_offset plays the struct inet_sock pinfo6 role, i.e. for the generic
code to find the IPv6 area in a timewait sock.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Generalise some functions
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:22:54 +0000 (23:22 -0800)]
[IPV6]: Generalise some functions

Using sk->sk_protocol instead of IPPROTO_TCP.

Will be used by DCCPv6 in the next changesets.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AF_UNIX]: Remove superfluous reference counting in unix_stream_sendmsg
Benjamin LaHaise [Wed, 14 Dec 2005 07:22:32 +0000 (23:22 -0800)]
[AF_UNIX]: Remove superfluous reference counting in unix_stream_sendmsg

AF_UNIX stream socket performance on P4 CPUs tends to suffer due to a
lot of pipeline flushes from atomic operations.  The patch below
removes the sock_hold() and sock_put() in unix_stream_sendmsg().  This
should be safe as the socket still holds a reference to its peer which
is only released after the file descriptor's final user invokes
unix_release_sock().  The only consideration is that we must add a
memory barrier before setting the peer initially.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Avoid atomic xchg() for non-error case
Benjamin LaHaise [Wed, 14 Dec 2005 07:22:19 +0000 (23:22 -0800)]
[NET]: Avoid atomic xchg() for non-error case

It also looks like there were 2 places where the test on sk_err was
missing from the event wait logic (in sk_stream_wait_connect and
sk_stream_wait_memory), while the rest of the sock_error() users look
to be doing the right thing.  This version of the patch fixes those,
and cleans up a few places that were testing ->sk_err directly.

Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPVS]: remove dead code
Roberto Nibali [Wed, 14 Dec 2005 07:17:20 +0000 (23:17 -0800)]
[IPVS]: remove dead code

This patch removes dead code. I don't see the reason to keep this cruft
around, besides cluttering the nice and functionally working code.

Signed-off-by: Roberto Nibali <ratz@drugphish.ch>
Signed-off-by: Horms <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[UDP]: udp_checksum_init return value
Stephen Hemminger [Wed, 14 Dec 2005 07:17:02 +0000 (23:17 -0800)]
[UDP]: udp_checksum_init return value

Since udp_checksum_init always returns 0 there is no point in
having it return a value.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IP]: Simplify and consolidate MSG_PEEK error handling
Herbert Xu [Wed, 14 Dec 2005 07:16:37 +0000 (23:16 -0800)]
[IP]: Simplify and consolidate MSG_PEEK error handling

When a packet is obtained from skb_recv_datagram with MSG_PEEK enabled
it is left on the socket receive queue.  This means that when we detect
a checksum error we have to be careful when trying to free the packet
as someone could have dequeued it in the time being.

Currently this delicate logic is duplicated three times between UDPv4,
UDPv6 and RAWv6.  This patch moves them into a one place and simplifies
the code somewhat.

This is based on a suggestion by Eric Dumazet.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Introduce dccp_ipv4_af_ops
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:16:16 +0000 (23:16 -0800)]
[DCCP]: Introduce dccp_ipv4_af_ops

And make the core DCCP code AF agnostic, just like TCP, now its time
to work on net/dccp/ipv6.c, we are close to the end!

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ICSK]: Move v4_addr2sockaddr from TCP to icsk
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:16:04 +0000 (23:16 -0800)]
[ICSK]: Move v4_addr2sockaddr from TCP to icsk

Renaming it to inet_csk_addr2sockaddr.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ICSK]: Rename struct tcp_func to struct inet_connection_sock_af_ops
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:15:52 +0000 (23:15 -0800)]
[ICSK]: Rename struct tcp_func to struct inet_connection_sock_af_ops

And move it to struct inet_connection_sock. DCCP will use it in the
upcoming changesets.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Introduce inet6_rsk()
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:15:40 +0000 (23:15 -0800)]
[IPV6]: Introduce inet6_rsk()

And inet6_rsk_offset in inet_request_sock, for the same reasons as
inet_sock's pinfo6 member.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Generalise tcp_v6_search_req & tcp_v6_synq_add
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:15:24 +0000 (23:15 -0800)]
[IPV6]: Generalise tcp_v6_search_req & tcp_v6_synq_add

More work is needed tho to introduce inet6_request_sock from
tcp6_request_sock, in the same layout considerations as ipv6_pinfo in
inet_sock, next changeset will do that.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ICSK]: make inet_csk_reqsk_queue_hash_add timeout arg unsigned long
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:15:12 +0000 (23:15 -0800)]
[ICSK]: make inet_csk_reqsk_queue_hash_add timeout arg unsigned long

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Generalise __tcp_v6_hash, renaming it to __inet6_hash
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:15:01 +0000 (23:15 -0800)]
[IPV6]: Generalise __tcp_v6_hash, renaming it to __inet6_hash

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Reuse inet_csk_get_port in tcp_v6_get_port
Arnaldo Carvalho de Melo [Wed, 14 Dec 2005 07:14:47 +0000 (23:14 -0800)]
[IPV6]: Reuse inet_csk_get_port in tcp_v6_get_port

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4]: Safer reassembly
Herbert Xu [Wed, 14 Dec 2005 07:14:27 +0000 (23:14 -0800)]
[IPV4]: Safer reassembly

Another spin of Herbert Xu's "safer ip reassembly" patch
for 2.6.16.

(The original patch is here:
http://marc.theaimsgroup.com/?l=linux-netdev&m=112281936522415&w=2
and my only contribution is to have tested it.)

This patch (optionally) does additional checks before accepting IP
fragments, which can greatly reduce the possibility of reassembling
fragments which originated from different IP datagrams.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Arthur Kepner <akepner@sgi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER] ebtables: Support nf_log API from ebt_log and ebt_ulog
Bart De Schuymer [Wed, 14 Dec 2005 07:14:08 +0000 (23:14 -0800)]
[NETFILTER] ebtables: Support nf_log API from ebt_log and ebt_ulog

This makes ebt_log and ebt_ulog use the new nf_log api.  This enables
the bridging packet filter to log packets e.g. via nfnetlink_log.

Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>