* Re: [RFC] net: napi fix
From: David Miller @ 2007-12-13 13:50 UTC (permalink / raw)
To: jarkao2
Cc: auke-jan.h.kok, gallatin, joonwpark81, netdev, linux-kernel,
jgarzik, shemminger, jesse.brandeburg
In-Reply-To: <20071213134953.GA3806@ff.dom.local>
From: Jarek Poplawski <jarkao2@gmail.com>
Date: Thu, 13 Dec 2007 14:49:53 +0100
> As a matter of fact, since it's "unlikely()" in net_rx_action() anyway,
> I wonder what is the main reason or gain of leaving such a tricky
> exception, instead of letting drivers to always decide which is the
> best moment for napi_complete()? (Or maybe even, in such a case, they
> should call some function with this list_move_tail() if it's so
> useful?)
It is the only sane way to synchronize the list manipulations.
There has to be a way for ->poll() to tell net_rx_action() two things:
1) How much work was completed, so we can adjust 'budget'
2) Was the NAPI quota exhausted? So that we know that
net_rx_action() still "owns" the polling context and
thus can do the list manipulation safely.
And these both need to be encoded into one single return value, thus
the adopted convention that "work == weight" means that the device has
not done a NAPI complete.
^ permalink raw reply
* [PATCH 2.6.25] [IPV6] Always pass a valid nl_info to inet6_rt_notify.
From: Denis V. Lunev @ 2007-12-13 13:58 UTC (permalink / raw)
To: davem; +Cc: containers, devel, netdev, dlezcano
[IPV6] Always pass a valid nl_info to inet6_rt_notify.
This makes the code in the inet6_rt_notify more straightforward and provides
groud for namespace passing.
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
net/ipv6/ip6_fib.c | 3 ++-
net/ipv6/route.c | 27 +++++++++++++--------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 5fae045..df05c6f 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1315,6 +1315,7 @@ static int fib6_walk(struct fib6_walker_t *w)
static int fib6_clean_node(struct fib6_walker_t *w)
{
+ struct nl_info info = {};
int res;
struct rt6_info *rt;
struct fib6_cleaner_t *c = container_of(w, struct fib6_cleaner_t, w);
@@ -1323,7 +1324,7 @@ static int fib6_clean_node(struct fib6_walker_t *w)
res = c->func(rt, c->arg);
if (res < 0) {
w->leaf = rt;
- res = fib6_del(rt, NULL);
+ res = fib6_del(rt, &info);
if (res) {
#if RT6_DEBUG >= 2
printk(KERN_DEBUG "fib6_clean_node: del failed: rt=%p@%p err=%d\n", rt, rt->rt6i_node, res);
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1530934..02354a7 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -604,7 +604,8 @@ static int __ip6_ins_rt(struct rt6_info *rt, struct nl_info *info)
int ip6_ins_rt(struct rt6_info *rt)
{
- return __ip6_ins_rt(rt, NULL);
+ struct nl_info info = {};
+ return __ip6_ins_rt(rt, &info);
}
static struct rt6_info *rt6_alloc_cow(struct rt6_info *ort, struct in6_addr *daddr,
@@ -1261,7 +1262,8 @@ static int __ip6_del_rt(struct rt6_info *rt, struct nl_info *info)
int ip6_del_rt(struct rt6_info *rt)
{
- return __ip6_del_rt(rt, NULL);
+ struct nl_info info = {};
+ return __ip6_del_rt(rt, &info);
}
static int ip6_route_del(struct fib6_config *cfg)
@@ -2238,29 +2240,26 @@ errout:
void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info)
{
struct sk_buff *skb;
- u32 pid = 0, seq = 0;
- struct nlmsghdr *nlh = NULL;
- int err = -ENOBUFS;
-
- if (info) {
- pid = info->pid;
- nlh = info->nlh;
- if (nlh)
- seq = nlh->nlmsg_seq;
- }
+ u32 seq;
+ int err;
+
+ err = -ENOBUFS;
+ seq = info->nlh != NULL ? info->nlh->nlmsg_seq : 0;
skb = nlmsg_new(rt6_nlmsg_size(), gfp_any());
if (skb == NULL)
goto errout;
- err = rt6_fill_node(skb, rt, NULL, NULL, 0, event, pid, seq, 0, 0);
+ err = rt6_fill_node(skb, rt, NULL, NULL, 0,
+ event, info->pid, seq, 0, 0);
if (err < 0) {
/* -EMSGSIZE implies BUG in rt6_nlmsg_size() */
WARN_ON(err == -EMSGSIZE);
kfree_skb(skb);
goto errout;
}
- err = rtnl_notify(skb, &init_net, pid, RTNLGRP_IPV6_ROUTE, nlh, gfp_any());
+ err = rtnl_notify(skb, &init_net, info->pid,
+ RTNLGRP_IPV6_ROUTE, info->nlh, gfp_any());
errout:
if (err < 0)
rtnl_set_sk_err(&init_net, RTNLGRP_IPV6_ROUTE, err);
--
1.5.3.rc5
^ permalink raw reply related
* Re: [RFC] net: napi fix
From: Jarek Poplawski @ 2007-12-13 14:14 UTC (permalink / raw)
To: David Miller
Cc: auke-jan.h.kok, gallatin, joonwpark81, netdev, linux-kernel,
jgarzik, shemminger, jesse.brandeburg
In-Reply-To: <20071213.055013.83963139.davem@davemloft.net>
On Thu, Dec 13, 2007 at 05:50:13AM -0800, David Miller wrote:
> From: Jarek Poplawski <jarkao2@gmail.com>
> Date: Thu, 13 Dec 2007 14:49:53 +0100
>
> > As a matter of fact, since it's "unlikely()" in net_rx_action() anyway,
> > I wonder what is the main reason or gain of leaving such a tricky
> > exception, instead of letting drivers to always decide which is the
> > best moment for napi_complete()? (Or maybe even, in such a case, they
> > should call some function with this list_move_tail() if it's so
> > useful?)
>
> It is the only sane way to synchronize the list manipulations.
>
> There has to be a way for ->poll() to tell net_rx_action() two things:
>
> 1) How much work was completed, so we can adjust 'budget'
> 2) Was the NAPI quota exhausted? So that we know that
> net_rx_action() still "owns" the polling context and
> thus can do the list manipulation safely.
>
> And these both need to be encoded into one single return value, thus
> the adopted convention that "work == weight" means that the device has
> not done a NAPI complete.
Thanks! So, I've to rethink this all...
Jarek P.
^ permalink raw reply
* [PATCH 2.6.25] [IPV4] Reduce whitespaces in fib_rules.h.
From: Denis V. Lunev @ 2007-12-13 14:18 UTC (permalink / raw)
To: davem; +Cc: containers, devel, netdev
There are to many spaces between type and function name in the declaration
of fib rules manipulation routines. Eat them and save a couple of lines.
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
include/net/fib_rules.h | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index 2364db1..d20db25 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -101,14 +101,12 @@ static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla)
return frh->table;
}
-extern int fib_rules_register(struct fib_rules_ops *);
-extern int fib_rules_unregister(struct fib_rules_ops *);
-extern void fib_rules_cleanup_ops(struct fib_rules_ops *);
+extern int fib_rules_register(struct fib_rules_ops *);
+extern int fib_rules_unregister(struct fib_rules_ops *);
+extern void fib_rules_cleanup_ops(struct fib_rules_ops *);
-extern int fib_rules_lookup(struct fib_rules_ops *,
- struct flowi *, int flags,
- struct fib_lookup_arg *);
-extern int fib_default_rule_add(struct fib_rules_ops *,
- u32 pref, u32 table,
- u32 flags);
+extern int fib_rules_lookup(struct fib_rules_ops *, struct flowi *, int flags,
+ struct fib_lookup_arg *);
+extern int fib_default_rule_add(struct fib_rules_ops *, u32 pref, u32 table,
+ u32 flags);
#endif
--
1.5.3.rc5
^ permalink raw reply related
* Re: 2.6.24-rc5-mm1
From: Pierre Peiffer @ 2007-12-13 14:18 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, netdev
In-Reply-To: <20071213024050.7d6e5f3e.akpm@linux-foundation.org>
Hi,
My config does not link any more:
...
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
net/built-in.o: In function `xs_udp_data_ready':
/home/peifferp/containers/kernel/linux-2.6.24-rc5-mm1/net/sunrpc/xprtsock.c:842:
undefined reference to `udp_stats_in6'
/home/peifferp/containers/kernel/linux-2.6.24-rc5-mm1/net/sunrpc/xprtsock.c:846:
undefined reference to `udp_stats_in6'
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2
After a first look, udp_stats_in6 seems to be defined in ipv6 (file
net/ipv6/udp.c) but I have
CONFIG_IPV6=m
and
CONFIG_SUNRPC=y
So, SUNRPC uses something defined in a module in my case ?
... looking more, this dependency seems to have been introduced by the patch
[UDP]: Restore missing inDatagrams increments
( http://thread.gmane.org/gmane.linux.network/79716/focus=79831 )
(I cc netdev)
I don't know what is the right way to fix this ... ?
P.
Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc5/2.6.24-rc5-mm1/
>
> - If something goes wrong with a PCI device's probing or initialisation, try
> reverting pci-disable-decoding-during-sizing-of-bars.patch.
>
> - git-sched was dropped due to breaking suspend-to-RAM.
>
> - git-block has been restored after having had a few problems
>
> - git-newsetup.patch was dropped due to conflicts with git-x86
>
> - git-perfmon.patch is still dropped for the same reason
>
> - git-kgdb.patch is still dropped for the same reason
>
> - Please do try to cc the correct developer and mailing list when
> reporting problems - I'm just buried in bugs over here.
>
>
>
> Boilerplate:
>
> - See the `hot-fixes' directory for any important updates to this patchset.
>
> - To fetch an -mm tree using git, use (for example)
>
> git-fetch git://git.kernel.org/pub/scm/linux/kernel/git/smurf/linux-trees.git tag v2.6.16-rc2-mm1
> git-checkout -b local-v2.6.16-rc2-mm1 v2.6.16-rc2-mm1
>
> - -mm kernel commit activity can be reviewed by subscribing to the
> mm-commits mailing list.
>
> echo "subscribe mm-commits" | mail majordomo@vger.kernel.org
>
> - If you hit a bug in -mm and it is not obvious which patch caused it, it is
> most valuable if you can perform a bisection search to identify which patch
> introduced the bug. Instructions for this process are at
>
> http://www.zip.com.au/~akpm/linux/patches/stuff/bisecting-mm-trees.txt
>
> But beware that this process takes some time (around ten rebuilds and
> reboots), so consider reporting the bug first and if we cannot immediately
> identify the faulty patch, then perform the bisection search.
>
> - When reporting bugs, please try to Cc: the relevant maintainer and mailing
> list on any email.
>
> - When reporting bugs in this kernel via email, please also rewrite the
> email Subject: in some manner to reflect the nature of the bug. Some
> developers filter by Subject: when looking for messages to read.
>
> - Occasional snapshots of the -mm lineup are uploaded to
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/mm/ and are announced on
> the mm-commits list. These probably are at least compilable.
>
> - More-than-daily -mm snapshots may be found at
> http://userweb.kernel.org/~akpm/mmotm/. These are almost certainly not
> compileable.
>
>
>
> Changes since 2.6.24-rc4-mm1:
>
>
> origin.patch
> git-acpi.patch
> git-alsa.patch
> git-agpgart.patch
> git-arm.patch
> git-arm-master.patch
> git-avr32.patch
> git-cpufreq.patch
> git-powerpc.patch
> git-drm.patch
> git-dvb.patch
> git-hwmon.patch
> git-gfs2-nmw.patch
> git-hid.patch
> git-hrt.patch
> git-ieee1394.patch
> git-infiniband.patch
> git-input.patch
> git-jfs.patch
> git-kbuild.patch
> git-kvm.patch
> git-lblnet.patch
> git-leds.patch
> git-libata-all.patch
> git-md-accel.patch
> git-mips.patch
> git-mmc.patch
> git-mtd.patch
> git-ubi.patch
> git-net.patch
> git-netdev-all.patch
> git-battery.patch
> git-nfs.patch
> git-nfsd.patch
> git-ocfs2.patch
> git-s390.patch
> git-sh.patch
> git-scsi-misc.patch
> git-scsi-rc-fixes.patch
> git-block.patch
> git-unionfs.patch
> git-v9fs.patch
> git-watchdog.patch
> git-wireless.patch
> git-ipwireless_cs.patch
> git-x86.patch
> git-xfs.patch
> git-cryptodev.patch
> git-xtensa.patch
>
> git trees
>
> -aio-only-account-i-o-wait-time-in-read_events-if-there-are-active-requests.patch
> -fix-cloneclone_newpid.patch
> -rtc-assure-proper-memory-ordering-with-respect-to-rtc_dev_busy-flag.patch
> -ufs-fix-nexstep-dir-block-size.patch
> -ufs-fix-nexstep-dir-block-size-checkpatch-fixes.patch
> -aoe-properly-initialise-the-request_queues-backing_dev_info.patch
> -mm-backing-devc-fix-percpu_counter_destroy-call-bug-in-bdi_init.patch
> -add-export_symbolksize.patch
> -spi-use-mutex-not-semaphore.patch
> -spi-at25-driver-is-for-eeprom-not-flash.patch
> -spi-simplify-spi_sync-calling-convention.patch
> -spi-use-simplified-spi_sync-calling-convention.patch
> -spi-initial-bf54x-spi-support.patch
> -spi-bfin-spi-uses-portmux-calls.patch
> -spi-spi_bfin-cleanups-error-handling.patch
> -spi-spi_bfin-handles-spi_transfercs_change.patch
> -spi-spi_bfin-dont-bypass-spi-framework.patch
> -spi-spi_bfin-uses-platform-device-resources.patch
> -spi-spi_bfin-uses-portmux-for-additional-busses.patch
> -spi-spi_bfin-rearrange-portmux-calls.patch
> -spi-spi_bfin-change-handling-of-communication-parameters.patch
> -spi-spi_bfin-relocate-spin-waits.patch
> -spi-spi_bfin-handle-multiple-spi_masters.patch
> -spi-spi_bfin-bugfix-for-816-bit-word-sizes.patch
> -spi-spi_bfin-update-handling-of-delay-after-deselect.patch
> -spi-spi_bfin-resequence-dma-start-stop.patch
> -blackfin-spi-driver-use-cpu_relax-to-replace-continue-in-while-busywait.patch
> -blackfin-spi-driver-use-void-__iomem-for-regs_base.patch
> -blackfin-spi-driver-move-hard-coded-pin_req-to-board-file.patch
> -blackfin-spi-driver-reconfigure-speed_hz-and-bits_per_word-in-each-spi-transfer.patch
> -avoid-potential-null-dereference-in-unregister_sysctl_table.patch
> -gpio_cs5535-disable-aux-on-output.patch
> -mm-fix-xip-file-writes.patch
> -revert-dpt_i2o-convert-to-scsi-hotplug-model.patch
> -jbd-fix-assertion-failure-in-fs-jbd-checkpointc.patch
> -proc-fix-pde-refcounting.patch
> -powerpc-invalid-size-for-swapper_pg_dir-with-config_pte_64bit=y.patch
> -gregkh-driver-kset-add-kset_create_and_register-function.patch
> -gregkh-driver-kobject-add-kobject_create_and_register-function.patch
> -gregkh-driver-kset-convert-pci-hotplug-to-use-kset_create_and_register.patch
> -gregkh-driver-kset-convert-drivers-base-busc-kset_create_and_register.patch
> -gregkh-driver-kset-convert-drivers-base-classc-kset_create_and_register.patch
> -gregkh-driver-kset-convert-drivers-base-firmwarec-kset_create_and_register.patch
> -gregkh-driver-driver-core-remove-owner-field-from-struct-bus_type.patch
> -gregkh-driver-driver-core-add-way-to-get-to-bus-kset.patch
> -gregkh-driver-driver-core-add-way-to-get-to-bus-device-klist.patch
> -gregkh-driver-driver-core-remove-fields-from-struct-bus_type.patch
> -gregkh-driver-kobject-convert-hvc_console-to-use-kref-not-kobject.patch
> -gregkh-driver-kobject-convert-hvcs-to-use-kref-not-kobject.patch
> -gregkh-driver-kobject-fix-up-kobject_set_name-to-use-kvasprintf.patch
> -gregkh-driver-kobject-add-kobject_init_ng-kobject_add_ng-and-kobject_init_and_add-functions.patch
> -gregkh-driver-driver-core-move-the-driver-specific-module-code-into-the-driver-core-fix.patch
> -remove-saa7134-oss.patch
> -jdelvare-i2c-i2c-delete-old-documentation.patch
> -jdelvare-i2c-i2c-gpio-set-hwmon-class.patch
> -jdelvare-i2c-i2c-add-missing-space.patch
> -rename-_bss-to-__bss_start.patch
> -ia64-efi-make-full-use-of-macro-efi_md_size.patch
> -ads7846-stop-updating-dev-powerpower_state.patch
> -remove-trailing-nuls-from-network-bonding-sysfs-interface.patch
> -net-bonding-return-nothing-for-not-applicable-values.patch
> -net-bonding-purely-cosmetic-rename-a-local-variable.patch
> -git-watchdog-hpwdt-build-fix.patch
> -iwlwifi-3945-fix-race-conditional-panic.patch
> -iwlwifi-4965-fix-race-conditional-panic.patch
> -bcm43xx_debugfs-sscanf-fix.patch
> -arch-xtensa-remove-duplicate-includes.patch
> -xtensa-kernel-setupc-remove-dead-code.patch
> -ia64-increase-datapatch-offset.patch
> -ia64-dont-assume-that-unwcheckpy-is-executable.patch
> -ia64-export-copy_page-to-modules.patch
> -add-mike-christie-to-maintainers.patch
> -scsi-early-detection-of-medium-not-present-updated.patch
> -slubs-ksize-fails-for-size-2048.patch
> -vm-security-add-security-hook-to-do_brk.patch
> -mm-sparsec-check-the-return-value-of-sparse_index_alloc.patch
> -mm-sparsec-improve-the-error-handling-for-sparse_add_one_section.patch
> -pie-executable-randomization.patch
> -pie-executable-randomization-uninlining.patch
> -pie-executable-randomization-checkpatch-fixes.patch
>
> Merged into mainline or a subsystem tree
>
> +revert-hibernation-use-temporary-page-tables-for-kernel-text-mapping-on-x86_64.patch
> +uml-stop-gdb-from-deleting-breakpoints-when-running-uml.patch
> +alpha-strncpy-strncat-fixes.patch
> +rtc-at32ap700x-fix-irq-init-oops.patch
> +parport-dev-timeslice-is-an-unsigned-long-not-an-int.patch
> +ecryptfs-initialize-new-auth_tokens-before-teardown.patch
> +knfsd-change-mailing-list-for-nfsd-in-maintainers.patch
> +fix-lguest-documentation.patch
> +sparsemem-make-sparsemem_vmemmap-selectable.patch
> +fs-kconfig-grammar-fix.patch
> +ext3-ext4-avoid-divide-by-zero.patch
> +alpha-build-fixes.patch
>
> 2.6.24 queue
>
> +timerfd-v3-new-timerfd-api-s390-fix.patch
> +timerfd-v3-new-timerfd-api-sparc64-fix.patch
>
> Fix timerfd-v3-new-timerfd-api.patch a ridiculous number of times.
>
> +git-acpi-build-fix.patch
>
> Fix git-acpi.patch more.
>
> +acpi-remove-duplicated-warning-message.patch
> +acpi_pci_irq_find_prt_entry-use-list_for_each_entry-instead-of-list_for_each.patch
>
> ACPI things
>
> +alsa-nopage.patch
> +alsa-usx2y-nopage.patch
>
> ALSA things
>
> -git-avr32-fixup.patch
>
> Unneeded
>
> +agk-dm-dm-crypt-use-bio_add_page.patch
> +agk-dm-dm-convert-suspend_lock-semaphore-to-mutex.patch
> +agk-dm-dm-snapshot-combine-consecutive-exceptions-in-memory.patch
>
> DM updates
>
> +powerpc-dont-cast-a-pointer-to-pointer-of-list_head.patch
> +arch-powerpc-add-missing-of_node_put.patch
> +arch-powerpc-platforms-cell-cbe_regsc-add-missing-of_node_put.patch
>
> powerpc stuff
>
> +gregkh-driver-kobject-fix-the-documentation-of-how-kobject_set_name-works.patch
> +gregkh-driver-kobject-convert-ibmasm-to-use-kref-not-kobject.patch
> +gregkh-driver-kobject-convert-hvc_console-to-use-kref-not-kobject.patch
> +gregkh-driver-kobject-convert-hvcs-to-use-kref-not-kobject.patch
> +gregkh-driver-kobject-convert-icom-to-use-kref-not-kobject.patch
> +gregkh-driver-kobject-fix-up-kobject_set_name-to-use-kvasprintf.patch
> +gregkh-driver-kobject-make-kobject_cleanup-be-static.patch
> +gregkh-driver-kobject-add-kobject_init_ng-function.patch
> +gregkh-driver-kobject-add-kobject_add_ng-function.patch
> +gregkh-driver-kobject-add-kobject_init_and_add-function.patch
> +gregkh-driver-kset-add-kset_create_and_add-function.patch
> +gregkh-driver-kobject-add-kobject_create_and_add-function.patch
> +gregkh-driver-kset-convert-pci-hotplug-to-use-kset_create_and_add.patch
> +gregkh-driver-kset-convert-drivers-base-busc-to-use-kset_create.patch
> +gregkh-driver-kset-convert-drivers-base-classc-to-use-kset_create.patch
> +gregkh-driver-kset-convert-drivers-base-firmwarec-to-use-kset_create.patch
> +gregkh-driver-uio-fix-kobject-usage.patch
> +gregkh-driver-driver-core-remove-owner-field-from-struct-bus_type.patch
> +gregkh-driver-driver-core-add-way-to-get-to-bus-kset.patch
> +gregkh-driver-driver-core-add-way-to-get-to-bus-device-klist.patch
> +gregkh-driver-driver-core-remove-fields-from-struct-bus_type.patch
> +gregkh-driver-driver-core-introduce-default-attribute-groups.patch
> +gregkh-driver-netiucv-use-device_driver-default-attribute-groups.patch
> +gregkh-driver-zfcp-use-device_driver-default-attribute-groups.patch
> +gregkh-driver-infiniband-make-ipath-driver-use-default-driver-groups.patch
>
> Driver tree updates
>
> +revert-gregkh-driver-pm-acquire-device-locks-prior-to-suspending.patch
>
> Fix it.
>
> -driver-tree-broke-infiniband.patch
>
> Unneeded
>
> +drm-dont-cast-a-pointer-to-pointer-of-list_head.patch
>
> DRM cleanup
>
> +git-dvb-fix-build-in-drivers-media-dvb-frontends-tda18271h.patch
> +git-dvb-one-videobuf_read_start-is-enough.patch
> +git-dvb-drivers-media-dvb-frontends-zl10353c-avoid-64-bit-divide.patch
> +git-dvb-drivers-media-video-et61x251-et61x251_corec-fix-warnings.patch
>
> Fix git-dvb
>
> +media-video-usbvision-add-mutex_unlock-to-error-paths.patch
> +media-video-usbvision-add-mutex_unlock-to-error-paths-fix.patch
> +media-video-usbvision-remove-ctrlurblock.patch
>
> DVB things
>
> +jdelvare-i2c-i2c-deprecate-video-bus-drivers.patch
> +jdelvare-i2c-i2c-drop-redundant-client-usage-count.patch
> +jdelvare-i2c-i2c-change-refcounting-prototypes.patch
> +jdelvare-i2c-i2c-remove-redundant-i2c_adapter-list.patch
> +jdelvare-i2c-i2c-remove-redundant-i2c_driver-list.patch
> +jdelvare-i2c-i2c-core-rename-lock.patch
>
> I2C tree updates
>
> +i2c-fix-drivers-media-video-bt866c.patch
>
> Fix it.
>
> +applesmc-sensors-set-for-macbook2-try-2.patch
>
> Update applesmc-sensors-set-for-macbook2.patch
>
> +gfs2-avoid-64-bit-divide.patch
>
> Fix git-gfs2-nmw.patch
>
> +ia64-ia32-nopage.patch
>
> ia64 cleanup
>
> +ieee1394-nopage.patch
>
> firewire cleanup
>
> +ib-nopage.patch
>
> Infiniband cleanup
>
> +fujitsu-application-panel-led-value.patch
>
> apanel update
>
> +ads7846-stop-updating-dev-powerpower_state.patch
> +wistron_btns-add-support-for-x86_64-systems.patch
> +wistron_btns-add-support-for-fujitsu-siemens-amilo-pro-edition-v3505.patch
> +hp6xx-hp7xx-clean-up-drivers-input-keyboardtouchscreen-kconfigs.patch
>
> input things
>
> +pata_legacy-restructure-and-revamp.patch
>
> pata upate
>
> +ide-mm-ide-dma-reporting-and-validity-checking-fixes-take-3.patch
> +ide-mm-ide-cd-remove-dead-post_transform_command.patch
> +ide-mm-pdc202xx_new-fix-promise-tx4-support.patch
> +ide-mm-hpt366-fix-hpt37x-pio-mode-timings-take-2.patch
> +ide-mm-hpt366-change-timing-register-masks.patch
> +ide-mm-hpt366-kill-set_dma_mode-method-wrapper.patch
> +ide-mm-ide-remove-dead-code-from-__ide_dma_test_irq.patch
> +ide-mm-ide-remove-stale-changelog-from-ide-disk-c.patch
> +ide-mm-ide-remove-stale-changelog-from-ide-probe-c.patch
> +ide-mm-ide-add-ide_busy_sleep-helper.patch
> +ide-mm-ide-remove-broken-disk-byte-swapping-support.patch
> +ide-mm-cmd64x-remove-proc-ide-cmd64x.patch
>
> IDE tree updates
>
> +md-balance-braces-in-raid5-debug-code.patch
>
> Fix git-md-accel.patch
>
> +mips-fix-makefile-borkage.patch
>
> MIPS fix
>
> +ipsec-fix-reversed-icmp6-policy-check.patch
> +ipsec-do-not-let-packets-pass-when-icmp-flag-is-off.patch
> +git-net-vs-git-lblnet.patch
> +git-net-fix-drivers-net-ns83820c-build.patch
> +updates-to-nfsroot-documentation-take-3.patch
> +net-use-mutex_is_locked-for-assert_rtnl.patch
> +tipc-fix-semaphore-handling.patch
> +ppp-synchronous-tty-convert-dead_sem-to-completion.patch
>
> net things
>
> +e1000e-make-e1000e-default-to-the-same-kconfig-setting-as-e1000.patch
>
> Make e1000e config sane
>
> +plip-driver-convert-killed_timer_sem-to-completion.patch
>
> plip cleanup
>
> +backlight-omap1-backlight-driver.patch
> +backlight-omap1-backlight-driver-fix.patch
>
> backlight driver
>
> +pcmcia-include-bad-cis-filename-in-error-message.patch
>
> pcmcia niceness
>
> +pci-disable-decoding-during-sizing-of-bars.patch
>
> PCI fix
>
> +pcie-aer-dont-check-_osc-when-acpi-is-disabled.patch
> +pci-dont-load-acpi_php-when-acpi-is-disabled.patch
> +pci-dont-load-acpi_php-when-acpi-is-disabled-fix.patch
>
> PCIE and PCI fixes
>
> +kernel-time-make-tick_do_broadcast-static.patch
>
> cleanup
>
> -git-scsi-misc-fixup.patch
>
> Unneeded
>
> +git-scsi-misc-fix-build-in-drivers-scsi-scsi_tgt_libc.patch
>
> Fix git-scsi-misc
>
> +sg-nopage.patch
> +3w-raid-drivers-memset-not-needed-in-probe.patch
> +hptiop-add-more-adapter-models-and-other-fixes.patch
> +hptiop-add-more-adapter-models-and-other-fixes-update.patch
> +hptiop-add-more-adapter-models-and-other-fixes-fix-2.patch
> +drivers-scsi-iprc-use-list_head-instead-of-list_head_init.patch
>
> scsi things
>
> -bidi-support-sr-sd-remove-dead-code.patch
> -bidi-support-tgt-use-scsi_init_io-instead-of-scsi_alloc_sgtable.patch
> -bidi-support-scsi_data_buffer.patch
> -scsi-pending-arm-convert-to-accessors.patch
> -scsi-bidi-support.patch
>
> scsi changes killed this
>
> +usb-mon-nopage.patch
>
> USB cleanup
>
> +9p-util-fix-semaphore-handling.patch
>
> 9p fix
>
> +watchdog-use-sgi_has_indydog-for-indydog-depends.patch
>
> watchdog cleanup
>
> +wireless-libertas-dont-cast-a-pointer-to-pointer-of-list_head.patch
>
> wireless cleanup
>
> -revert-git-kvm-changes-in-arch-x86-kconfig.patch
> -revert-revert-git-kvm-changes-in-arch-x86-kconfig.patch
>
> Unneeded
>
> +git-x86-fix-allnoconfig-build.patch
>
> x86 fix
>
> +mcheck-mce_64-mce_read_sem-to-mutex.patch
>
> x86 cleanup
>
> +x86_64-efi-runtime-service-support-efi-basic-runtime-service-support-calling-convention-fix.patch
>
> Fix x86_64-efi-runtime-service-support-efi-basic-runtime-service-support-fixes.patch
>
> +x86-boot-use-e820-memory-map-on-efi-32-platform.patch
>
> x86 fix
>
> +iommu-sg-add-iommu-helper-functions-for-the-free-area-management.patch
> +iommu-sg-powerpc-convert-iommu-to-use-the-iommu-helper.patch
> +iommu-sg-powerpc-remove-dma-4gb-boundary-protection.patch
> +iommu-sg-x86-convert-calgary-iommu-to-use-the-iommu-helper.patch
> +iommu-sg-x86-convert-gart-iommu-to-use-the-iommu-helper.patch
> +iommu-sg-kill-__clear_bit_string-and-find_next_zero_string.patch
>
> More iommu work
>
> +drivers-cpufreq-cpufreq_statsc-section-fix.patch
> +bonding-locking-fix.patch
> +bridge-assign-random-address.patch
> +nfs-fix-an-oops-in-nfs-unmount.patch
> +acpi-sbs-reset-alarm-bit.patch
> +acpi-sbs-ignore-alarms-coming-from-unknown-devices.patch
> +acpi-sbs-return-rate-in-mw-if-capacity-in-mwh.patch
> +usb-use-irqf_disabled-for-hcd-interrupt-handlers.patch
> +usb-at91_udc-correct-hanging-while-disconnecting-usb-cable.patch
> +iwlwifi3945-4965-fix-rate-control-algo-reference-leak.patch
> +iwlwifi3945-4965-fix-rate-control-algo-reference-leak-fix.patch
> +mm-sparsec-check-the-return-value-of-sparse_index_alloc.patch
> +mm-sparsec-improve-the-error-handling-for-sparse_add_one_section.patch
> +mm-sparsec-improve-the-error-handling-for-sparse_add_one_section-fix.patch
> +pktcdvd-add-kobject_put-when-kobject-register-fails.patch
> +libertas-select-wireless_ext.patch
> +bcm43xx_debugfs-sscanf-fix.patch
> +apm_eventinfo_t-are-userspace-types.patch
> +drivers-macintosh-via-pmuc-added-a-missing-iounmap.patch
>
> More 2.6.24 queue
>
> +slub-optimise-the-clearing-of-__gfp_zero.patch
>
> Slub speedup
>
> +mm-special-mapping-nopage.patch
> +remove-unused-arguments-in-zone_init_free_lists.patch
>
> MM things
>
> +smack-getpeercred_stream-fix-for-so_peersec-and-tcp.patch
>
> smack update
>
> +agp-alpha-nopage.patch
> +alpha-fix-warning-by-fixing-flush_tlb_kernel_range.patch
>
> alpha stuff
>
> +arch-cris-added-a-missing-iounmap.patch
>
> cris fix
>
> +uml-remove-duplicate-config-symbol-and-unused-file-and-variables.patch
> +uml-fix-mconsole-stop.patch
> +uml-miscellaneous-code-cleanups.patch
> +uml-style-fixes-in-filec.patch
> +uml-64-bit-tlb-fixes.patch
> +uml-customize-tlbh.patch
> +uml-runtime-detection-of-host-vmsplit-on-i386.patch
> +uml-eliminate-setjmp_wrapper.patch
> +uml-install-panic-notifier-earlier.patch
> +uml-use-barrier-instead-of-mb.patch
> +uml-tidy-helper-code.patch
> +uml-dont-kill-pid-0.patch
> +uml-get-rid-of-syscall-counters.patch
> +uml-dont-allow-processes-to-call-into-stub.patch
> +uml-move-sig_handler_common_skas.patch
> +uml-clean-up-sig_handler_common_skas.patch
>
> UML updates
>
> +get-rid-of-nr_open-and-introduce-a-sysctl_nr_open-fix.patch
>
> Fix get-rid-of-nr_open-and-introduce-a-sysctl_nr_open.patch
>
> +dio-fix-kernel-doc-notation.patch
> +relay-nopage.patch
> +uio-nopage.patch
> +deprecate-smbfs-in-favour-of-cifs.patch
> +drivers-char-use-list_head-instead-of-list_head_init.patch
> +remove-one-useless-extern-declaration.patch
> +quota-improve-inode-list-scanning-in-add_dquot_ref.patch
> +quota-improve-inode-list-scanning-in-add_dquot_ref-fix.patch
> +rcu-move-three-variables-to-__read_mostly-to-save-space.patch
> +add-arch_ptrace_stop.patch
> +tty-enable-the-echoing-of-c-in-the-n_tty-discipline.patch
> +tty-enable-the-echoing-of-c-in-the-n_tty-discipline-checkpatch-fixes.patch
> +docs-kernel-locking-convert-semaphore-references.patch
> +virtio_net-remove-double-ether_setup.patch
> +drivers-char-ipmi-ipmi_msghandlerc-use-list_head-instead-of-list_head_init.patch
> +fs-reiserfs-xattrc-use-list_head-instead-of-list_head_init.patch
> +stopmachine-semaphore-to-mutex.patch
> +stopmachine-semaphore-to-mutex-fix.patch
> +amiga-serial-driver-port_write_mutex-fixup.patch
> +ext2-xip-check-fix.patch
> +parport-add-support-for-the-quatech-sppxp-100-parallel-port-pci-expresscard.patch
> +parport-add-support-for-the-quatech-sppxp-100-parallel-port-pci-expresscard-fix.patch
> +parport_serial-netmos-9855-fix.patch
> +partition-use-default_sgi_partition-for-sgi_partion-default.patch
>
> Misc
>
> +atmel_spi-chain-dma-transfers-update.patch
>
> Fix atmel_spi-chain-dma-transfers.patch
>
> +create-arch-kconfig.patch
> +add-have_oprofile.patch
> +add-have_kprobes.patch
> +move-kconfiginstrumentation-to-arch-kconfig-and-init-kconfig.patch
>
> Fiddle with Kconfig
>
> -move-kprobes-examples-to-samples-resend.patch
> -move-kprobes-examples-to-samples-resend-checkpatch-fixes.patch
> -move-kprobes-examples-to-samples-resend-vs-git-x86.patch
>
> These need updating
>
> +ecryptfs-make-show_options-reflect-actual-mount-options.patch
> +ecryptfs-make-show_options-reflect-actual-mount-options-fix.patch
>
> ecryptfs cleanups/fixes
>
> +rtc-add-support-for-the-s-35390a-rtc-chip.patch
> +rtc-add-support-for-the-s-35390a-rtc-chip-fix.patch
>
> RTC update
>
> +fb-defio-nopage.patch
> +atmel_lcdfb-validate-display-timings.patch
> +vgacon-fix-sparse-warning-about-shadowing-i-symbol.patch
> +fbcon-fix-sparse-warning-about-shadowing-p-symbol.patch
> +fbcon-fix-sparse-warning-about-shadowing-rotate-symbol.patch
> +logo-move-declarations-of-logos-to-linux_logoh.patch
> +logo-move-declarations-of-logos-to-linux_logoh-fix.patch
>
> fbdev things
>
> +md-raid6-fix-mktablec.patch
> +md-raid6-clean-up-the-style-of-raid6test-testc.patch
> +md-update-md-bitmap-during-resync.patch
> +md-update-md-bitmap-during-resync-fix.patch
>
> RAID updates
>
> +pnp-do-not-stop-start-devices-in-suspend-resume-path.patch
>
> PNP fix
>
> -pnp-request-ioport-and-iomem-resources-used-by-active-devices.patch
>
> Dropped for now.
>
> +ext-fix-comment-for-nonexistent-variable.patch
> +ext-use-ext_get_group_desc.patch
> +ext-remove-unused-argument-for-ext_find_goal.patch
> +ext-cleanup-ext_bg_num_gdb.patch
>
> ext2/3/4 cleanups
>
> +per-zone-and-reclaim-enhancements-for-memory-controller-take-3-modifies-vmscanc-for-isolate-globa-cgroup-lru-activity-fix-accounting-in-vmscanc-for-memory-controller.patch
> +update-documentation-controller-memorytxt.patch
>
> memory controller updates
>
> +drivers-dma-iop-admac-use-list_head-instead-of-list_head_init.patch
>
> DMS driver cleanup
>
> +proc-seqfile-convert-proc_pid_status-to-properly-handle-pid-namespaces-fix-2.patch
> +proc-seqfile-convert-proc_pid_status-to-properly-handle-pid-namespaces-fix-3.patch
>
> Fix
> proc-seqfile-convert-proc_pid_status-to-properly-handle-pid-namespaces.patch
> even more
>
> +fix-group-stop-with-exit-race.patch
> +sys_setsid-remove-now-unneeded-session-=-1-check.patch
> +move-the-related-code-from-exit_notify-to-exit_signals.patch
> +pid-sys_wait-fixes-v2.patch
> +pid-sys_wait-fixes-v2-checkpatch-fixes.patch
> +pid-extend-fix-pid_vnr.patch
> +sys_getsid-dont-use-nsproxy-directly.patch
> +pid-fix-mips-irix-emulation-pid-usage.patch
> +pid-fix-solaris_procids.patch
> +uglify-kill_pid_info-to-fix-kill-vs-exec-race.patch
> +uglify-while_each_pid_task-to-make-sure-we-dont-count-the-execing-pricess-twice.patch
> +itimer_real-convert-to-use-struct-pid.patch
>
> Core kernel updates
>
> +rd-support-xip.patch
>
> SUpport XIP in rd.c
>
> -cramfs-make-cramfs-little-endian-only.patch
> -cramfs-make-cramfs-little-endian-only-update.patch
> -cramfs-make-cramfs-little-endian-only-fix.patch
>
> Dropped
>
>
> 5041 commits in 1616 patch files
>
> All patches:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc5/2.6.24-rc5-mm1/patch-list
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Pierre Peiffer
^ permalink raw reply
* Re: [RFC] net: napi fix
From: David Miller @ 2007-12-13 14:19 UTC (permalink / raw)
To: gallatin
Cc: joonwpark81, auke-jan.h.kok, netdev, linux-kernel, jgarzik,
shemminger, jesse.brandeburg
In-Reply-To: <47613E22.6060705@myri.com>
From: Andrew Gallatin <gallatin@myri.com>
Date: Thu, 13 Dec 2007 09:13:54 -0500
> If the netif_running() check is indeed required to make a device break
> out of napi polling and respond to an ifconfig down, then I think the
> netif_running() check should be moved up into net_rx_action() to avoid
> potential for driver complexity and bugs like the ones you found.
That, or something like it, definitely sounds reasonable and much
better than putting the check into every driver :-)
^ permalink raw reply
* Re: [RFC] net: napi fix
From: Andrew Gallatin @ 2007-12-13 14:13 UTC (permalink / raw)
To: Joonwoo Park
Cc: Kok, Auke, David Miller, netdev, linux-kernel, jgarzik,
shemminger, Jesse Brandeburg
In-Reply-To: <b25c3fa70712122341q3ba282cdqda3fa56901b14484@mail.gmail.com>
Joonwoo Park wrote:
> 2007/12/13, Kok, Auke <auke-jan.h.kok@intel.com>:
>> David Miller wrote:
>>> From: Andrew Gallatin <gallatin@myri.com>
>>> Date: Wed, 12 Dec 2007 12:29:23 -0500
>>>
>>>> Is the netif_running() check even required?
>>> No, it is not.
>>>
>>> When a device is brought down, one of the first things
>>> that happens is that we wait for all pending NAPI polls
>>> to complete, then block any new polls from starting.
>> I think this was previously (pre-2.6.24) not the case, which is why
e1000 et al
>> has this check as well and that's exactly what is causing most of the
>> net_rx_action oopses in the first place. Without the netif_running()
check
>> previously the drivers were just unusable with NAPI and prone to
many races with
>> down (i.e. touching some ethtool ioctl which wants to do a reset
while routing
>> small packets at high numbers). that's why we added the
netif_running() check in
>> the first place :)
>>
>> There might be more drivers lurking that need this change...
>>
>> Auke
>>
>
> Also in my case, without netif_running() check, I cannot do ifconfig
down.
> It stucked if packet generator was sending packets.
If the netif_running() check is indeed required to make a device break
out of napi polling and respond to an ifconfig down, then I think the
netif_running() check should be moved up into net_rx_action() to avoid
potential for driver complexity and bugs like the ones you found.
Drew
^ permalink raw reply
* Re: [Devel] [PATCH 2.6.25] [IPV4] Reduce whitespaces in fib_rules.h.
From: Alexey Dobriyan @ 2007-12-13 14:47 UTC (permalink / raw)
To: Denis V. Lunev
Cc: containers-qjLDD68F18O7TbgM5vRIOg, netdev-u79uwXL29TY76Z2rM5mHXA,
davem-fT/PcQaiUtIeIZ0/mPfg9Q
In-Reply-To: <20071213141842.GA9939-aPCOdVxUTlgvJsYlp49lxw@public.gmane.org>
On Thu, Dec 13, 2007 at 05:18:42PM +0300, Denis V. Lunev wrote:
> There are to many spaces between type and function name in the declaration
> of fib rules manipulation routines. Eat them and save a couple of lines.
If this patch is going in, it would be nice to get rid of "extern" as
well.
Alexey, who once removed all externs from prototypes
and got 4 seconds compilation speedup.
> --- a/include/net/fib_rules.h
> +++ b/include/net/fib_rules.h
> @@ -101,14 +101,12 @@ static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla)
> return frh->table;
> }
>
> -extern int fib_rules_register(struct fib_rules_ops *);
> -extern int fib_rules_unregister(struct fib_rules_ops *);
> -extern void fib_rules_cleanup_ops(struct fib_rules_ops *);
> +extern int fib_rules_register(struct fib_rules_ops *);
> +extern int fib_rules_unregister(struct fib_rules_ops *);
> +extern void fib_rules_cleanup_ops(struct fib_rules_ops *);
>
> -extern int fib_rules_lookup(struct fib_rules_ops *,
> - struct flowi *, int flags,
> - struct fib_lookup_arg *);
> -extern int fib_default_rule_add(struct fib_rules_ops *,
> - u32 pref, u32 table,
> - u32 flags);
> +extern int fib_rules_lookup(struct fib_rules_ops *, struct flowi *, int flags,
> + struct fib_lookup_arg *);
> +extern int fib_default_rule_add(struct fib_rules_ops *, u32 pref, u32 table,
> + u32 flags);
> #endif
^ permalink raw reply
* Re: [Devel] [PATCH 2.6.25] [IPV4] Reduce whitespaces in fib_rules.h.
From: David Miller @ 2007-12-13 14:49 UTC (permalink / raw)
To: adobriyan; +Cc: den, containers, netdev, devel
In-Reply-To: <20071213144707.GB6209@localhost.sw.ru>
From: Alexey Dobriyan <adobriyan@sw.ru>
Date: Thu, 13 Dec 2007 17:47:07 +0300
> On Thu, Dec 13, 2007 at 05:18:42PM +0300, Denis V. Lunev wrote:
> > There are to many spaces between type and function name in the declaration
> > of fib rules manipulation routines. Eat them and save a couple of lines.
>
> If this patch is going in, it would be nice to get rid of "extern" as
> well.
The convention in the networking headers is to use extern, and
this is pretty consistently done across the board.
If we are going to do this, which I personally see no reason
for, we should do it across the whole networking.
Consistency is much more important than whatever reason you
could come up with to get rid of the 'extern'.
^ permalink raw reply
* Re: [PATCH 2.6.25] [IPV4] Reduce whitespaces in fib_rules.h.
From: David Miller @ 2007-12-13 14:50 UTC (permalink / raw)
To: den; +Cc: containers, devel, netdev
In-Reply-To: <20071213141842.GA9939@iris.sw.ru>
From: "Denis V. Lunev" <den@openvz.org>
Date: Thu, 13 Dec 2007 17:18:42 +0300
> There are to many spaces between type and function name in the declaration
> of fib rules manipulation routines. Eat them and save a couple of lines.
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
This is just noise and serves nothing other than to invite potential
patch conflicts which makes development harder.
If you happened to be changing these for other reasons, I'd say OK,
but not like this.
^ permalink raw reply
* [DCCP] [Announce]: Ack Vector Implementation Notes
From: Gerrit Renker @ 2007-12-13 14:57 UTC (permalink / raw)
To: Arnaldo, dccp; +Cc: netdev
I've been working on making DCCP Ack Vectors more robust, dealing more gracefully
with buffer overflow, and fixing two cases which will lead to corrupted buffer state.
The encountered problems and implementation strategy are documented on
http://www.erg.abdn.ac.uk/users/gerrit/dccp/notes/ack_vectors/
I'd be glad for feedback, in particular if there are any errors or points which may have been
overlooked.
^ permalink raw reply
* Re: [PATCH 2.6.25] [IPV4] Reduce whitespaces in fib_rules.h.
From: Denis V. Lunev @ 2007-12-13 15:01 UTC (permalink / raw)
To: David Miller; +Cc: den, containers, devel, netdev
In-Reply-To: <20071213.065045.189743239.davem@davemloft.net>
David Miller wrote:
> From: "Denis V. Lunev" <den@openvz.org>
> Date: Thu, 13 Dec 2007 17:18:42 +0300
>
>> There are to many spaces between type and function name in the declaration
>> of fib rules manipulation routines. Eat them and save a couple of lines.
>>
>> Signed-off-by: Denis V. Lunev <den@openvz.org>
>
> This is just noise and serves nothing other than to invite potential
> patch conflicts which makes development harder.
>
> If you happened to be changing these for other reasons, I'd say OK,
> but not like this.
>
I will add parameter to these calls. The line will be too long after
that. I'd like to separate sense changes from, you perfectly correct,
useless changes :(
Could you still apply it, or I will need to send fully functional set to
you including this?
^ permalink raw reply
* Re: [PATCH 2.6.25] [IPV4] Reduce whitespaces in fib_rules.h.
From: David Miller @ 2007-12-13 15:00 UTC (permalink / raw)
To: den; +Cc: den, containers, devel, netdev
In-Reply-To: <4761494C.4000202@sw.ru>
From: "Denis V. Lunev" <den@sw.ru>
Date: Thu, 13 Dec 2007 18:01:32 +0300
> Could you still apply it, or I will need to send fully functional set to
> you including this?
Please combine the changes so that when you change the args
you fixup the whitespace as well.
^ permalink raw reply
* Re: 2.6.24-rc5-mm1
From: Benjamin Thery @ 2007-12-13 15:01 UTC (permalink / raw)
To: Pierre Peiffer; +Cc: Andrew Morton, linux-kernel, netdev, Herbert Xu
In-Reply-To: <47613F18.6080601@bull.net>
The problem comes from the new macro UDPX_INC_STATS_BH introduced
by Herbert, which was a nice addition to increment the correct
UDP MIB depending on the socket family, but unfortunately
the use of this macro from kernel code (I mean code not compiled
as module) requires that IPv6 is also compiled in kernel
(CONFIG_IPv6=y) in order to have udp_stats_in6 defined at link
time.
Benjamin
Pierre Peiffer wrote:
> Hi,
>
> My config does not link any more:
>
> ...
> CHK include/linux/compile.h
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
> net/built-in.o: In function `xs_udp_data_ready':
> /home/peifferp/containers/kernel/linux-2.6.24-rc5-mm1/net/sunrpc/xprtsock.c:842:
> undefined reference to `udp_stats_in6'
> /home/peifferp/containers/kernel/linux-2.6.24-rc5-mm1/net/sunrpc/xprtsock.c:846:
> undefined reference to `udp_stats_in6'
> make[1]: *** [.tmp_vmlinux1] Error 1
> make: *** [sub-make] Error 2
>
> After a first look, udp_stats_in6 seems to be defined in ipv6 (file
> net/ipv6/udp.c) but I have
>
> CONFIG_IPV6=m
> and
> CONFIG_SUNRPC=y
>
> So, SUNRPC uses something defined in a module in my case ?
>
> ... looking more, this dependency seems to have been introduced by the patch
> [UDP]: Restore missing inDatagrams increments
> ( http://thread.gmane.org/gmane.linux.network/79716/focus=79831 )
>
> (I cc netdev)
>
> I don't know what is the right way to fix this ... ?
>
> P.
> Andrew Morton wrote:
>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc5/2.6.24-rc5-mm1/
>>
>> - If something goes wrong with a PCI device's probing or initialisation, try
>> reverting pci-disable-decoding-during-sizing-of-bars.patch.
>>
>> - git-sched was dropped due to breaking suspend-to-RAM.
>>
>> - git-block has been restored after having had a few problems
>>
>> - git-newsetup.patch was dropped due to conflicts with git-x86
>>
>> - git-perfmon.patch is still dropped for the same reason
>>
>> - git-kgdb.patch is still dropped for the same reason
>>
>> - Please do try to cc the correct developer and mailing list when
>> reporting problems - I'm just buried in bugs over here.
>>
>>
>>
>> Boilerplate:
>>
>> - See the `hot-fixes' directory for any important updates to this patchset.
>>
>> - To fetch an -mm tree using git, use (for example)
>>
>> git-fetch git://git.kernel.org/pub/scm/linux/kernel/git/smurf/linux-trees.git tag v2.6.16-rc2-mm1
>> git-checkout -b local-v2.6.16-rc2-mm1 v2.6.16-rc2-mm1
>>
>> - -mm kernel commit activity can be reviewed by subscribing to the
>> mm-commits mailing list.
>>
>> echo "subscribe mm-commits" | mail majordomo@vger.kernel.org
>>
>> - If you hit a bug in -mm and it is not obvious which patch caused it, it is
>> most valuable if you can perform a bisection search to identify which patch
>> introduced the bug. Instructions for this process are at
>>
>> http://www.zip.com.au/~akpm/linux/patches/stuff/bisecting-mm-trees.txt
>>
>> But beware that this process takes some time (around ten rebuilds and
>> reboots), so consider reporting the bug first and if we cannot immediately
>> identify the faulty patch, then perform the bisection search.
>>
>> - When reporting bugs, please try to Cc: the relevant maintainer and mailing
>> list on any email.
>>
>> - When reporting bugs in this kernel via email, please also rewrite the
>> email Subject: in some manner to reflect the nature of the bug. Some
>> developers filter by Subject: when looking for messages to read.
>>
>> - Occasional snapshots of the -mm lineup are uploaded to
>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/mm/ and are announced on
>> the mm-commits list. These probably are at least compilable.
>>
>> - More-than-daily -mm snapshots may be found at
>> http://userweb.kernel.org/~akpm/mmotm/. These are almost certainly not
>> compileable.
>>
>>
>>
>> Changes since 2.6.24-rc4-mm1:
>>
>>
>> origin.patch
>> git-acpi.patch
>> git-alsa.patch
>> git-agpgart.patch
>> git-arm.patch
>> git-arm-master.patch
>> git-avr32.patch
>> git-cpufreq.patch
>> git-powerpc.patch
>> git-drm.patch
>> git-dvb.patch
>> git-hwmon.patch
>> git-gfs2-nmw.patch
>> git-hid.patch
>> git-hrt.patch
>> git-ieee1394.patch
>> git-infiniband.patch
>> git-input.patch
>> git-jfs.patch
>> git-kbuild.patch
>> git-kvm.patch
>> git-lblnet.patch
>> git-leds.patch
>> git-libata-all.patch
>> git-md-accel.patch
>> git-mips.patch
>> git-mmc.patch
>> git-mtd.patch
>> git-ubi.patch
>> git-net.patch
>> git-netdev-all.patch
>> git-battery.patch
>> git-nfs.patch
>> git-nfsd.patch
>> git-ocfs2.patch
>> git-s390.patch
>> git-sh.patch
>> git-scsi-misc.patch
>> git-scsi-rc-fixes.patch
>> git-block.patch
>> git-unionfs.patch
>> git-v9fs.patch
>> git-watchdog.patch
>> git-wireless.patch
>> git-ipwireless_cs.patch
>> git-x86.patch
>> git-xfs.patch
>> git-cryptodev.patch
>> git-xtensa.patch
>>
>> git trees
>>
>> -aio-only-account-i-o-wait-time-in-read_events-if-there-are-active-requests.patch
>> -fix-cloneclone_newpid.patch
>> -rtc-assure-proper-memory-ordering-with-respect-to-rtc_dev_busy-flag.patch
>> -ufs-fix-nexstep-dir-block-size.patch
>> -ufs-fix-nexstep-dir-block-size-checkpatch-fixes.patch
>> -aoe-properly-initialise-the-request_queues-backing_dev_info.patch
>> -mm-backing-devc-fix-percpu_counter_destroy-call-bug-in-bdi_init.patch
>> -add-export_symbolksize.patch
>> -spi-use-mutex-not-semaphore.patch
>> -spi-at25-driver-is-for-eeprom-not-flash.patch
>> -spi-simplify-spi_sync-calling-convention.patch
>> -spi-use-simplified-spi_sync-calling-convention.patch
>> -spi-initial-bf54x-spi-support.patch
>> -spi-bfin-spi-uses-portmux-calls.patch
>> -spi-spi_bfin-cleanups-error-handling.patch
>> -spi-spi_bfin-handles-spi_transfercs_change.patch
>> -spi-spi_bfin-dont-bypass-spi-framework.patch
>> -spi-spi_bfin-uses-platform-device-resources.patch
>> -spi-spi_bfin-uses-portmux-for-additional-busses.patch
>> -spi-spi_bfin-rearrange-portmux-calls.patch
>> -spi-spi_bfin-change-handling-of-communication-parameters.patch
>> -spi-spi_bfin-relocate-spin-waits.patch
>> -spi-spi_bfin-handle-multiple-spi_masters.patch
>> -spi-spi_bfin-bugfix-for-816-bit-word-sizes.patch
>> -spi-spi_bfin-update-handling-of-delay-after-deselect.patch
>> -spi-spi_bfin-resequence-dma-start-stop.patch
>> -blackfin-spi-driver-use-cpu_relax-to-replace-continue-in-while-busywait.patch
>> -blackfin-spi-driver-use-void-__iomem-for-regs_base.patch
>> -blackfin-spi-driver-move-hard-coded-pin_req-to-board-file.patch
>> -blackfin-spi-driver-reconfigure-speed_hz-and-bits_per_word-in-each-spi-transfer.patch
>> -avoid-potential-null-dereference-in-unregister_sysctl_table.patch
>> -gpio_cs5535-disable-aux-on-output.patch
>> -mm-fix-xip-file-writes.patch
>> -revert-dpt_i2o-convert-to-scsi-hotplug-model.patch
>> -jbd-fix-assertion-failure-in-fs-jbd-checkpointc.patch
>> -proc-fix-pde-refcounting.patch
>> -powerpc-invalid-size-for-swapper_pg_dir-with-config_pte_64bit=y.patch
>> -gregkh-driver-kset-add-kset_create_and_register-function.patch
>> -gregkh-driver-kobject-add-kobject_create_and_register-function.patch
>> -gregkh-driver-kset-convert-pci-hotplug-to-use-kset_create_and_register.patch
>> -gregkh-driver-kset-convert-drivers-base-busc-kset_create_and_register.patch
>> -gregkh-driver-kset-convert-drivers-base-classc-kset_create_and_register.patch
>> -gregkh-driver-kset-convert-drivers-base-firmwarec-kset_create_and_register.patch
>> -gregkh-driver-driver-core-remove-owner-field-from-struct-bus_type.patch
>> -gregkh-driver-driver-core-add-way-to-get-to-bus-kset.patch
>> -gregkh-driver-driver-core-add-way-to-get-to-bus-device-klist.patch
>> -gregkh-driver-driver-core-remove-fields-from-struct-bus_type.patch
>> -gregkh-driver-kobject-convert-hvc_console-to-use-kref-not-kobject.patch
>> -gregkh-driver-kobject-convert-hvcs-to-use-kref-not-kobject.patch
>> -gregkh-driver-kobject-fix-up-kobject_set_name-to-use-kvasprintf.patch
>> -gregkh-driver-kobject-add-kobject_init_ng-kobject_add_ng-and-kobject_init_and_add-functions.patch
>> -gregkh-driver-driver-core-move-the-driver-specific-module-code-into-the-driver-core-fix.patch
>> -remove-saa7134-oss.patch
>> -jdelvare-i2c-i2c-delete-old-documentation.patch
>> -jdelvare-i2c-i2c-gpio-set-hwmon-class.patch
>> -jdelvare-i2c-i2c-add-missing-space.patch
>> -rename-_bss-to-__bss_start.patch
>> -ia64-efi-make-full-use-of-macro-efi_md_size.patch
>> -ads7846-stop-updating-dev-powerpower_state.patch
>> -remove-trailing-nuls-from-network-bonding-sysfs-interface.patch
>> -net-bonding-return-nothing-for-not-applicable-values.patch
>> -net-bonding-purely-cosmetic-rename-a-local-variable.patch
>> -git-watchdog-hpwdt-build-fix.patch
>> -iwlwifi-3945-fix-race-conditional-panic.patch
>> -iwlwifi-4965-fix-race-conditional-panic.patch
>> -bcm43xx_debugfs-sscanf-fix.patch
>> -arch-xtensa-remove-duplicate-includes.patch
>> -xtensa-kernel-setupc-remove-dead-code.patch
>> -ia64-increase-datapatch-offset.patch
>> -ia64-dont-assume-that-unwcheckpy-is-executable.patch
>> -ia64-export-copy_page-to-modules.patch
>> -add-mike-christie-to-maintainers.patch
>> -scsi-early-detection-of-medium-not-present-updated.patch
>> -slubs-ksize-fails-for-size-2048.patch
>> -vm-security-add-security-hook-to-do_brk.patch
>> -mm-sparsec-check-the-return-value-of-sparse_index_alloc.patch
>> -mm-sparsec-improve-the-error-handling-for-sparse_add_one_section.patch
>> -pie-executable-randomization.patch
>> -pie-executable-randomization-uninlining.patch
>> -pie-executable-randomization-checkpatch-fixes.patch
>>
>> Merged into mainline or a subsystem tree
>>
>> +revert-hibernation-use-temporary-page-tables-for-kernel-text-mapping-on-x86_64.patch
>> +uml-stop-gdb-from-deleting-breakpoints-when-running-uml.patch
>> +alpha-strncpy-strncat-fixes.patch
>> +rtc-at32ap700x-fix-irq-init-oops.patch
>> +parport-dev-timeslice-is-an-unsigned-long-not-an-int.patch
>> +ecryptfs-initialize-new-auth_tokens-before-teardown.patch
>> +knfsd-change-mailing-list-for-nfsd-in-maintainers.patch
>> +fix-lguest-documentation.patch
>> +sparsemem-make-sparsemem_vmemmap-selectable.patch
>> +fs-kconfig-grammar-fix.patch
>> +ext3-ext4-avoid-divide-by-zero.patch
>> +alpha-build-fixes.patch
>>
>> 2.6.24 queue
>>
>> +timerfd-v3-new-timerfd-api-s390-fix.patch
>> +timerfd-v3-new-timerfd-api-sparc64-fix.patch
>>
>> Fix timerfd-v3-new-timerfd-api.patch a ridiculous number of times.
>>
>> +git-acpi-build-fix.patch
>>
>> Fix git-acpi.patch more.
>>
>> +acpi-remove-duplicated-warning-message.patch
>> +acpi_pci_irq_find_prt_entry-use-list_for_each_entry-instead-of-list_for_each.patch
>>
>> ACPI things
>>
>> +alsa-nopage.patch
>> +alsa-usx2y-nopage.patch
>>
>> ALSA things
>>
>> -git-avr32-fixup.patch
>>
>> Unneeded
>>
>> +agk-dm-dm-crypt-use-bio_add_page.patch
>> +agk-dm-dm-convert-suspend_lock-semaphore-to-mutex.patch
>> +agk-dm-dm-snapshot-combine-consecutive-exceptions-in-memory.patch
>>
>> DM updates
>>
>> +powerpc-dont-cast-a-pointer-to-pointer-of-list_head.patch
>> +arch-powerpc-add-missing-of_node_put.patch
>> +arch-powerpc-platforms-cell-cbe_regsc-add-missing-of_node_put.patch
>>
>> powerpc stuff
>>
>> +gregkh-driver-kobject-fix-the-documentation-of-how-kobject_set_name-works.patch
>> +gregkh-driver-kobject-convert-ibmasm-to-use-kref-not-kobject.patch
>> +gregkh-driver-kobject-convert-hvc_console-to-use-kref-not-kobject.patch
>> +gregkh-driver-kobject-convert-hvcs-to-use-kref-not-kobject.patch
>> +gregkh-driver-kobject-convert-icom-to-use-kref-not-kobject.patch
>> +gregkh-driver-kobject-fix-up-kobject_set_name-to-use-kvasprintf.patch
>> +gregkh-driver-kobject-make-kobject_cleanup-be-static.patch
>> +gregkh-driver-kobject-add-kobject_init_ng-function.patch
>> +gregkh-driver-kobject-add-kobject_add_ng-function.patch
>> +gregkh-driver-kobject-add-kobject_init_and_add-function.patch
>> +gregkh-driver-kset-add-kset_create_and_add-function.patch
>> +gregkh-driver-kobject-add-kobject_create_and_add-function.patch
>> +gregkh-driver-kset-convert-pci-hotplug-to-use-kset_create_and_add.patch
>> +gregkh-driver-kset-convert-drivers-base-busc-to-use-kset_create.patch
>> +gregkh-driver-kset-convert-drivers-base-classc-to-use-kset_create.patch
>> +gregkh-driver-kset-convert-drivers-base-firmwarec-to-use-kset_create.patch
>> +gregkh-driver-uio-fix-kobject-usage.patch
>> +gregkh-driver-driver-core-remove-owner-field-from-struct-bus_type.patch
>> +gregkh-driver-driver-core-add-way-to-get-to-bus-kset.patch
>> +gregkh-driver-driver-core-add-way-to-get-to-bus-device-klist.patch
>> +gregkh-driver-driver-core-remove-fields-from-struct-bus_type.patch
>> +gregkh-driver-driver-core-introduce-default-attribute-groups.patch
>> +gregkh-driver-netiucv-use-device_driver-default-attribute-groups.patch
>> +gregkh-driver-zfcp-use-device_driver-default-attribute-groups.patch
>> +gregkh-driver-infiniband-make-ipath-driver-use-default-driver-groups.patch
>>
>> Driver tree updates
>>
>> +revert-gregkh-driver-pm-acquire-device-locks-prior-to-suspending.patch
>>
>> Fix it.
>>
>> -driver-tree-broke-infiniband.patch
>>
>> Unneeded
>>
>> +drm-dont-cast-a-pointer-to-pointer-of-list_head.patch
>>
>> DRM cleanup
>>
>> +git-dvb-fix-build-in-drivers-media-dvb-frontends-tda18271h.patch
>> +git-dvb-one-videobuf_read_start-is-enough.patch
>> +git-dvb-drivers-media-dvb-frontends-zl10353c-avoid-64-bit-divide.patch
>> +git-dvb-drivers-media-video-et61x251-et61x251_corec-fix-warnings.patch
>>
>> Fix git-dvb
>>
>> +media-video-usbvision-add-mutex_unlock-to-error-paths.patch
>> +media-video-usbvision-add-mutex_unlock-to-error-paths-fix.patch
>> +media-video-usbvision-remove-ctrlurblock.patch
>>
>> DVB things
>>
>> +jdelvare-i2c-i2c-deprecate-video-bus-drivers.patch
>> +jdelvare-i2c-i2c-drop-redundant-client-usage-count.patch
>> +jdelvare-i2c-i2c-change-refcounting-prototypes.patch
>> +jdelvare-i2c-i2c-remove-redundant-i2c_adapter-list.patch
>> +jdelvare-i2c-i2c-remove-redundant-i2c_driver-list.patch
>> +jdelvare-i2c-i2c-core-rename-lock.patch
>>
>> I2C tree updates
>>
>> +i2c-fix-drivers-media-video-bt866c.patch
>>
>> Fix it.
>>
>> +applesmc-sensors-set-for-macbook2-try-2.patch
>>
>> Update applesmc-sensors-set-for-macbook2.patch
>>
>> +gfs2-avoid-64-bit-divide.patch
>>
>> Fix git-gfs2-nmw.patch
>>
>> +ia64-ia32-nopage.patch
>>
>> ia64 cleanup
>>
>> +ieee1394-nopage.patch
>>
>> firewire cleanup
>>
>> +ib-nopage.patch
>>
>> Infiniband cleanup
>>
>> +fujitsu-application-panel-led-value.patch
>>
>> apanel update
>>
>> +ads7846-stop-updating-dev-powerpower_state.patch
>> +wistron_btns-add-support-for-x86_64-systems.patch
>> +wistron_btns-add-support-for-fujitsu-siemens-amilo-pro-edition-v3505.patch
>> +hp6xx-hp7xx-clean-up-drivers-input-keyboardtouchscreen-kconfigs.patch
>>
>> input things
>>
>> +pata_legacy-restructure-and-revamp.patch
>>
>> pata upate
>>
>> +ide-mm-ide-dma-reporting-and-validity-checking-fixes-take-3.patch
>> +ide-mm-ide-cd-remove-dead-post_transform_command.patch
>> +ide-mm-pdc202xx_new-fix-promise-tx4-support.patch
>> +ide-mm-hpt366-fix-hpt37x-pio-mode-timings-take-2.patch
>> +ide-mm-hpt366-change-timing-register-masks.patch
>> +ide-mm-hpt366-kill-set_dma_mode-method-wrapper.patch
>> +ide-mm-ide-remove-dead-code-from-__ide_dma_test_irq.patch
>> +ide-mm-ide-remove-stale-changelog-from-ide-disk-c.patch
>> +ide-mm-ide-remove-stale-changelog-from-ide-probe-c.patch
>> +ide-mm-ide-add-ide_busy_sleep-helper.patch
>> +ide-mm-ide-remove-broken-disk-byte-swapping-support.patch
>> +ide-mm-cmd64x-remove-proc-ide-cmd64x.patch
>>
>> IDE tree updates
>>
>> +md-balance-braces-in-raid5-debug-code.patch
>>
>> Fix git-md-accel.patch
>>
>> +mips-fix-makefile-borkage.patch
>>
>> MIPS fix
>>
>> +ipsec-fix-reversed-icmp6-policy-check.patch
>> +ipsec-do-not-let-packets-pass-when-icmp-flag-is-off.patch
>> +git-net-vs-git-lblnet.patch
>> +git-net-fix-drivers-net-ns83820c-build.patch
>> +updates-to-nfsroot-documentation-take-3.patch
>> +net-use-mutex_is_locked-for-assert_rtnl.patch
>> +tipc-fix-semaphore-handling.patch
>> +ppp-synchronous-tty-convert-dead_sem-to-completion.patch
>>
>> net things
>>
>> +e1000e-make-e1000e-default-to-the-same-kconfig-setting-as-e1000.patch
>>
>> Make e1000e config sane
>>
>> +plip-driver-convert-killed_timer_sem-to-completion.patch
>>
>> plip cleanup
>>
>> +backlight-omap1-backlight-driver.patch
>> +backlight-omap1-backlight-driver-fix.patch
>>
>> backlight driver
>>
>> +pcmcia-include-bad-cis-filename-in-error-message.patch
>>
>> pcmcia niceness
>>
>> +pci-disable-decoding-during-sizing-of-bars.patch
>>
>> PCI fix
>>
>> +pcie-aer-dont-check-_osc-when-acpi-is-disabled.patch
>> +pci-dont-load-acpi_php-when-acpi-is-disabled.patch
>> +pci-dont-load-acpi_php-when-acpi-is-disabled-fix.patch
>>
>> PCIE and PCI fixes
>>
>> +kernel-time-make-tick_do_broadcast-static.patch
>>
>> cleanup
>>
>> -git-scsi-misc-fixup.patch
>>
>> Unneeded
>>
>> +git-scsi-misc-fix-build-in-drivers-scsi-scsi_tgt_libc.patch
>>
>> Fix git-scsi-misc
>>
>> +sg-nopage.patch
>> +3w-raid-drivers-memset-not-needed-in-probe.patch
>> +hptiop-add-more-adapter-models-and-other-fixes.patch
>> +hptiop-add-more-adapter-models-and-other-fixes-update.patch
>> +hptiop-add-more-adapter-models-and-other-fixes-fix-2.patch
>> +drivers-scsi-iprc-use-list_head-instead-of-list_head_init.patch
>>
>> scsi things
>>
>> -bidi-support-sr-sd-remove-dead-code.patch
>> -bidi-support-tgt-use-scsi_init_io-instead-of-scsi_alloc_sgtable.patch
>> -bidi-support-scsi_data_buffer.patch
>> -scsi-pending-arm-convert-to-accessors.patch
>> -scsi-bidi-support.patch
>>
>> scsi changes killed this
>>
>> +usb-mon-nopage.patch
>>
>> USB cleanup
>>
>> +9p-util-fix-semaphore-handling.patch
>>
>> 9p fix
>>
>> +watchdog-use-sgi_has_indydog-for-indydog-depends.patch
>>
>> watchdog cleanup
>>
>> +wireless-libertas-dont-cast-a-pointer-to-pointer-of-list_head.patch
>>
>> wireless cleanup
>>
>> -revert-git-kvm-changes-in-arch-x86-kconfig.patch
>> -revert-revert-git-kvm-changes-in-arch-x86-kconfig.patch
>>
>> Unneeded
>>
>> +git-x86-fix-allnoconfig-build.patch
>>
>> x86 fix
>>
>> +mcheck-mce_64-mce_read_sem-to-mutex.patch
>>
>> x86 cleanup
>>
>> +x86_64-efi-runtime-service-support-efi-basic-runtime-service-support-calling-convention-fix.patch
>>
>> Fix x86_64-efi-runtime-service-support-efi-basic-runtime-service-support-fixes.patch
>>
>> +x86-boot-use-e820-memory-map-on-efi-32-platform.patch
>>
>> x86 fix
>>
>> +iommu-sg-add-iommu-helper-functions-for-the-free-area-management.patch
>> +iommu-sg-powerpc-convert-iommu-to-use-the-iommu-helper.patch
>> +iommu-sg-powerpc-remove-dma-4gb-boundary-protection.patch
>> +iommu-sg-x86-convert-calgary-iommu-to-use-the-iommu-helper.patch
>> +iommu-sg-x86-convert-gart-iommu-to-use-the-iommu-helper.patch
>> +iommu-sg-kill-__clear_bit_string-and-find_next_zero_string.patch
>>
>> More iommu work
>>
>> +drivers-cpufreq-cpufreq_statsc-section-fix.patch
>> +bonding-locking-fix.patch
>> +bridge-assign-random-address.patch
>> +nfs-fix-an-oops-in-nfs-unmount.patch
>> +acpi-sbs-reset-alarm-bit.patch
>> +acpi-sbs-ignore-alarms-coming-from-unknown-devices.patch
>> +acpi-sbs-return-rate-in-mw-if-capacity-in-mwh.patch
>> +usb-use-irqf_disabled-for-hcd-interrupt-handlers.patch
>> +usb-at91_udc-correct-hanging-while-disconnecting-usb-cable.patch
>> +iwlwifi3945-4965-fix-rate-control-algo-reference-leak.patch
>> +iwlwifi3945-4965-fix-rate-control-algo-reference-leak-fix.patch
>> +mm-sparsec-check-the-return-value-of-sparse_index_alloc.patch
>> +mm-sparsec-improve-the-error-handling-for-sparse_add_one_section.patch
>> +mm-sparsec-improve-the-error-handling-for-sparse_add_one_section-fix.patch
>> +pktcdvd-add-kobject_put-when-kobject-register-fails.patch
>> +libertas-select-wireless_ext.patch
>> +bcm43xx_debugfs-sscanf-fix.patch
>> +apm_eventinfo_t-are-userspace-types.patch
>> +drivers-macintosh-via-pmuc-added-a-missing-iounmap.patch
>>
>> More 2.6.24 queue
>>
>> +slub-optimise-the-clearing-of-__gfp_zero.patch
>>
>> Slub speedup
>>
>> +mm-special-mapping-nopage.patch
>> +remove-unused-arguments-in-zone_init_free_lists.patch
>>
>> MM things
>>
>> +smack-getpeercred_stream-fix-for-so_peersec-and-tcp.patch
>>
>> smack update
>>
>> +agp-alpha-nopage.patch
>> +alpha-fix-warning-by-fixing-flush_tlb_kernel_range.patch
>>
>> alpha stuff
>>
>> +arch-cris-added-a-missing-iounmap.patch
>>
>> cris fix
>>
>> +uml-remove-duplicate-config-symbol-and-unused-file-and-variables.patch
>> +uml-fix-mconsole-stop.patch
>> +uml-miscellaneous-code-cleanups.patch
>> +uml-style-fixes-in-filec.patch
>> +uml-64-bit-tlb-fixes.patch
>> +uml-customize-tlbh.patch
>> +uml-runtime-detection-of-host-vmsplit-on-i386.patch
>> +uml-eliminate-setjmp_wrapper.patch
>> +uml-install-panic-notifier-earlier.patch
>> +uml-use-barrier-instead-of-mb.patch
>> +uml-tidy-helper-code.patch
>> +uml-dont-kill-pid-0.patch
>> +uml-get-rid-of-syscall-counters.patch
>> +uml-dont-allow-processes-to-call-into-stub.patch
>> +uml-move-sig_handler_common_skas.patch
>> +uml-clean-up-sig_handler_common_skas.patch
>>
>> UML updates
>>
>> +get-rid-of-nr_open-and-introduce-a-sysctl_nr_open-fix.patch
>>
>> Fix get-rid-of-nr_open-and-introduce-a-sysctl_nr_open.patch
>>
>> +dio-fix-kernel-doc-notation.patch
>> +relay-nopage.patch
>> +uio-nopage.patch
>> +deprecate-smbfs-in-favour-of-cifs.patch
>> +drivers-char-use-list_head-instead-of-list_head_init.patch
>> +remove-one-useless-extern-declaration.patch
>> +quota-improve-inode-list-scanning-in-add_dquot_ref.patch
>> +quota-improve-inode-list-scanning-in-add_dquot_ref-fix.patch
>> +rcu-move-three-variables-to-__read_mostly-to-save-space.patch
>> +add-arch_ptrace_stop.patch
>> +tty-enable-the-echoing-of-c-in-the-n_tty-discipline.patch
>> +tty-enable-the-echoing-of-c-in-the-n_tty-discipline-checkpatch-fixes.patch
>> +docs-kernel-locking-convert-semaphore-references.patch
>> +virtio_net-remove-double-ether_setup.patch
>> +drivers-char-ipmi-ipmi_msghandlerc-use-list_head-instead-of-list_head_init.patch
>> +fs-reiserfs-xattrc-use-list_head-instead-of-list_head_init.patch
>> +stopmachine-semaphore-to-mutex.patch
>> +stopmachine-semaphore-to-mutex-fix.patch
>> +amiga-serial-driver-port_write_mutex-fixup.patch
>> +ext2-xip-check-fix.patch
>> +parport-add-support-for-the-quatech-sppxp-100-parallel-port-pci-expresscard.patch
>> +parport-add-support-for-the-quatech-sppxp-100-parallel-port-pci-expresscard-fix.patch
>> +parport_serial-netmos-9855-fix.patch
>> +partition-use-default_sgi_partition-for-sgi_partion-default.patch
>>
>> Misc
>>
>> +atmel_spi-chain-dma-transfers-update.patch
>>
>> Fix atmel_spi-chain-dma-transfers.patch
>>
>> +create-arch-kconfig.patch
>> +add-have_oprofile.patch
>> +add-have_kprobes.patch
>> +move-kconfiginstrumentation-to-arch-kconfig-and-init-kconfig.patch
>>
>> Fiddle with Kconfig
>>
>> -move-kprobes-examples-to-samples-resend.patch
>> -move-kprobes-examples-to-samples-resend-checkpatch-fixes.patch
>> -move-kprobes-examples-to-samples-resend-vs-git-x86.patch
>>
>> These need updating
>>
>> +ecryptfs-make-show_options-reflect-actual-mount-options.patch
>> +ecryptfs-make-show_options-reflect-actual-mount-options-fix.patch
>>
>> ecryptfs cleanups/fixes
>>
>> +rtc-add-support-for-the-s-35390a-rtc-chip.patch
>> +rtc-add-support-for-the-s-35390a-rtc-chip-fix.patch
>>
>> RTC update
>>
>> +fb-defio-nopage.patch
>> +atmel_lcdfb-validate-display-timings.patch
>> +vgacon-fix-sparse-warning-about-shadowing-i-symbol.patch
>> +fbcon-fix-sparse-warning-about-shadowing-p-symbol.patch
>> +fbcon-fix-sparse-warning-about-shadowing-rotate-symbol.patch
>> +logo-move-declarations-of-logos-to-linux_logoh.patch
>> +logo-move-declarations-of-logos-to-linux_logoh-fix.patch
>>
>> fbdev things
>>
>> +md-raid6-fix-mktablec.patch
>> +md-raid6-clean-up-the-style-of-raid6test-testc.patch
>> +md-update-md-bitmap-during-resync.patch
>> +md-update-md-bitmap-during-resync-fix.patch
>>
>> RAID updates
>>
>> +pnp-do-not-stop-start-devices-in-suspend-resume-path.patch
>>
>> PNP fix
>>
>> -pnp-request-ioport-and-iomem-resources-used-by-active-devices.patch
>>
>> Dropped for now.
>>
>> +ext-fix-comment-for-nonexistent-variable.patch
>> +ext-use-ext_get_group_desc.patch
>> +ext-remove-unused-argument-for-ext_find_goal.patch
>> +ext-cleanup-ext_bg_num_gdb.patch
>>
>> ext2/3/4 cleanups
>>
>> +per-zone-and-reclaim-enhancements-for-memory-controller-take-3-modifies-vmscanc-for-isolate-globa-cgroup-lru-activity-fix-accounting-in-vmscanc-for-memory-controller.patch
>> +update-documentation-controller-memorytxt.patch
>>
>> memory controller updates
>>
>> +drivers-dma-iop-admac-use-list_head-instead-of-list_head_init.patch
>>
>> DMS driver cleanup
>>
>> +proc-seqfile-convert-proc_pid_status-to-properly-handle-pid-namespaces-fix-2.patch
>> +proc-seqfile-convert-proc_pid_status-to-properly-handle-pid-namespaces-fix-3.patch
>>
>> Fix
>> proc-seqfile-convert-proc_pid_status-to-properly-handle-pid-namespaces.patch
>> even more
>>
>> +fix-group-stop-with-exit-race.patch
>> +sys_setsid-remove-now-unneeded-session-=-1-check.patch
>> +move-the-related-code-from-exit_notify-to-exit_signals.patch
>> +pid-sys_wait-fixes-v2.patch
>> +pid-sys_wait-fixes-v2-checkpatch-fixes.patch
>> +pid-extend-fix-pid_vnr.patch
>> +sys_getsid-dont-use-nsproxy-directly.patch
>> +pid-fix-mips-irix-emulation-pid-usage.patch
>> +pid-fix-solaris_procids.patch
>> +uglify-kill_pid_info-to-fix-kill-vs-exec-race.patch
>> +uglify-while_each_pid_task-to-make-sure-we-dont-count-the-execing-pricess-twice.patch
>> +itimer_real-convert-to-use-struct-pid.patch
>>
>> Core kernel updates
>>
>> +rd-support-xip.patch
>>
>> SUpport XIP in rd.c
>>
>> -cramfs-make-cramfs-little-endian-only.patch
>> -cramfs-make-cramfs-little-endian-only-update.patch
>> -cramfs-make-cramfs-little-endian-only-fix.patch
>>
>> Dropped
>>
>>
>> 5041 commits in 1616 patch files
>>
>> All patches:
>>
>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc5/2.6.24-rc5-mm1/patch-list
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>>
>
--
B e n j a m i n T h e r y - BULL/DT/Open Software R&D
http://www.bull.com
^ permalink raw reply
* [PATCH 03/12] [DCCP]: Use maximum-RTO backoff from DCCP spec
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:05 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-3-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
This removes another Fixme, using the TCP maximum RTO rather than the value
specified by the DCCP specification. Across the sections in RFC 4340, 64
seconds is consistently suggested as maximum RTO backoff value; and this is
the value which is now used.
I have checked both termination cases for retransmissions of Close/CloseReq:
with the default value 15 of `retries2', and an initial icsk_retransmit = 0,
it takes about 614 seconds to declare a non-responding peer as dead, after
which the final terminating Reset is sent. With the TCP maximum RTO value of
120 seconds it takes (as might be expected) almost twice as long, about 23
minutes.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
net/dccp/dccp.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 07dcbe7..3af3320 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -72,7 +72,14 @@ extern void dccp_time_wait(struct sock *sk, int state, int timeo);
/* RFC 1122, 4.2.3.1 initial RTO value */
#define DCCP_TIMEOUT_INIT ((unsigned)(3 * HZ))
-#define DCCP_RTO_MAX ((unsigned)(120 * HZ)) /* FIXME: using TCP value */
+/*
+ * The maximum back-off value for retransmissions. This is needed for
+ * - retransmitting client-Requests (sec. 8.1.1),
+ * - retransmitting Close/CloseReq when closing (sec. 8.3),
+ * - feature-negotiation retransmission (sec. 6.6.3),
+ * - Acks in client-PARTOPEN state (sec. 8.1.5).
+ */
+#define DCCP_RTO_MAX ((unsigned)(64 * HZ))
/*
* RTT sampling: sanity bounds and fallback RTT value from RFC 4340, section 3.4
--
1.5.3.4
^ permalink raw reply related
* [PATCH 01/12] [DCCP]: Perform SHUT_RD and SHUT_WR on receiving close
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:05 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-1-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
This patch performs two changes:
1) Close the write-end in addition to the read-end when a fin-like segment
(Close or CloseReq) is received by DCCP. This accounts for the fact that DCCP,
in contrast to TCP, does not have a half-close. RFC 4340 says in this respect
that when a fin-like segment has been sent there is no guarantee at all that
any further data will be processed.
Thus this patch performs SHUT_WR in addition to the SHUT_RD when a fin-like
segment is encountered.
2) Minor change: I noted that code appears twice in different places and think it
makes sense to put this into a self-contained function (dccp_enqueue()).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
net/dccp/input.c | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/net/dccp/input.c b/net/dccp/input.c
index decf2f2..dacd4fd 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -22,16 +22,27 @@
/* rate-limit for syncs in reply to sequence-invalid packets; RFC 4340, 7.5.4 */
int sysctl_dccp_sync_ratelimit __read_mostly = HZ / 8;
-static void dccp_fin(struct sock *sk, struct sk_buff *skb)
+static void dccp_enqueue_skb(struct sock *sk, struct sk_buff *skb)
{
- sk->sk_shutdown |= RCV_SHUTDOWN;
- sock_set_flag(sk, SOCK_DONE);
__skb_pull(skb, dccp_hdr(skb)->dccph_doff * 4);
__skb_queue_tail(&sk->sk_receive_queue, skb);
skb_set_owner_r(skb, sk);
sk->sk_data_ready(sk, 0);
}
+static void dccp_fin(struct sock *sk, struct sk_buff *skb)
+{
+ /*
+ * On receiving Close/CloseReq, both RD/WR shutdown are performed.
+ * RFC 4340, 8.3 says that we MAY send further Data/DataAcks after
+ * receiving the closing segment, but there is no guarantee that such
+ * data will be processed at all.
+ */
+ sk->sk_shutdown = SHUTDOWN_MASK;
+ sock_set_flag(sk, SOCK_DONE);
+ dccp_enqueue_skb(sk, skb);
+}
+
static int dccp_rcv_close(struct sock *sk, struct sk_buff *skb)
{
int queued = 0;
@@ -282,10 +293,7 @@ static int __dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
* - sk_shutdown == RCV_SHUTDOWN, use Code 1, "Not Listening"
* - sk_receive_queue is full, use Code 2, "Receive Buffer"
*/
- __skb_pull(skb, dh->dccph_doff * 4);
- __skb_queue_tail(&sk->sk_receive_queue, skb);
- skb_set_owner_r(skb, sk);
- sk->sk_data_ready(sk, 0);
+ dccp_enqueue_skb(sk, skb);
return 0;
case DCCP_PKT_ACK:
goto discard;
--
1.5.3.4
^ permalink raw reply related
* [PATCH 04/12] [DCCP]: Support for server holding timewait state
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:05 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-4-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
This adds a socket option and signalling support for the case where the server
holds timewait state on closing the connection, as described in RFC 4340, 8.3.
Since holding timewait state at the server is the non-usual case, it is enabled
via a socket option. Documentation for this socket option has been added.
The setsockopt statement has been made resilient against different possible cases
of expressing boolean `true' values using a suggestion by Ian McDonald.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
Documentation/networking/dccp.txt | 6 ++++++
include/linux/dccp.h | 3 +++
net/dccp/output.c | 6 ++++--
net/dccp/proto.c | 13 ++++++++++++-
4 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt
index d76905a..39131a3 100644
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -57,6 +57,12 @@ can be set before calling bind().
DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet
size (application payload size) in bytes, see RFC 4340, section 14.
+DCCP_SOCKOPT_SERVER_TIMEWAIT enables the server (listening socket) to hold
+timewait state when closing the connection (RFC 4340, 8.3). The usual case is
+that the closing server sends a CloseReq, whereupon the client holds timewait
+state. When this boolean socket option is on, the server sends a Close instead
+and will enter TIMEWAIT. This option must be set after accept() returns.
+
DCCP_SOCKOPT_SEND_CSCOV and DCCP_SOCKOPT_RECV_CSCOV are used for setting the
partial checksum coverage (RFC 4340, sec. 9.2). The default is that checksums
always cover the entire packet and that only fully covered application data is
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 312b989..c676021 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -205,6 +205,7 @@ struct dccp_so_feat {
#define DCCP_SOCKOPT_CHANGE_L 3
#define DCCP_SOCKOPT_CHANGE_R 4
#define DCCP_SOCKOPT_GET_CUR_MPS 5
+#define DCCP_SOCKOPT_SERVER_TIMEWAIT 6
#define DCCP_SOCKOPT_SEND_CSCOV 10
#define DCCP_SOCKOPT_RECV_CSCOV 11
#define DCCP_SOCKOPT_CCID_RX_INFO 128
@@ -492,6 +493,7 @@ struct dccp_ackvec;
* @dccps_role - role of this sock, one of %dccp_role
* @dccps_hc_rx_insert_options - receiver wants to add options when acking
* @dccps_hc_tx_insert_options - sender wants to add options when sending
+ * @dccps_server_timewait - server holds timewait state on close (RFC 4340, 8.3)
* @dccps_xmit_timer - timer for when CCID is not ready to send
* @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs)
*/
@@ -528,6 +530,7 @@ struct dccp_sock {
enum dccp_role dccps_role:2;
__u8 dccps_hc_rx_insert_options:1;
__u8 dccps_hc_tx_insert_options:1;
+ __u8 dccps_server_timewait:1;
struct timer_list dccps_xmit_timer;
};
diff --git a/net/dccp/output.c b/net/dccp/output.c
index e97584a..b2e1791 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -567,8 +567,10 @@ void dccp_send_close(struct sock *sk, const int active)
/* Reserve space for headers and prepare control bits. */
skb_reserve(skb, sk->sk_prot->max_header);
- DCCP_SKB_CB(skb)->dccpd_type = dp->dccps_role == DCCP_ROLE_CLIENT ?
- DCCP_PKT_CLOSE : DCCP_PKT_CLOSEREQ;
+ if (dp->dccps_role == DCCP_ROLE_SERVER && !dp->dccps_server_timewait)
+ DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_CLOSEREQ;
+ else
+ DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_CLOSE;
if (active) {
dccp_write_xmit(sk, 1);
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 8a73c8f..cc87c50 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -551,6 +551,12 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname,
(struct dccp_so_feat __user *)
optval);
break;
+ case DCCP_SOCKOPT_SERVER_TIMEWAIT:
+ if (dp->dccps_role != DCCP_ROLE_SERVER)
+ err = -EOPNOTSUPP;
+ else
+ dp->dccps_server_timewait = (val != 0);
+ break;
case DCCP_SOCKOPT_SEND_CSCOV: /* sender side, RFC 4340, sec. 9.2 */
if (val < 0 || val > 15)
err = -EINVAL;
@@ -653,6 +659,10 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
val = dp->dccps_mss_cache;
len = sizeof(val);
break;
+ case DCCP_SOCKOPT_SERVER_TIMEWAIT:
+ val = dp->dccps_server_timewait;
+ len = sizeof(val);
+ break;
case DCCP_SOCKOPT_SEND_CSCOV:
val = dp->dccps_pcslen;
len = sizeof(val);
@@ -918,7 +928,8 @@ static void dccp_terminate_connection(struct sock *sk)
case DCCP_OPEN:
dccp_send_close(sk, 1);
- if (dccp_sk(sk)->dccps_role == DCCP_ROLE_SERVER)
+ if (dccp_sk(sk)->dccps_role == DCCP_ROLE_SERVER &&
+ !dccp_sk(sk)->dccps_server_timewait)
next_state = DCCP_ACTIVE_CLOSEREQ;
else
next_state = DCCP_CLOSING;
--
1.5.3.4
^ permalink raw reply related
* [PATCH 02/12] [DCCP]: Shift the retransmit timer for active-close into output.c
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:05 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-2-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
When performing active close, RFC 4340, 8.3. requires to retransmit the
Close/CloseReq with a backoff-retransmit timer starting at intially 2 RTTs.
This patch shifts the existing code for active-close retransmit timer
into output.c, so that the retransmit timer is started when the first
Close/CloseReq is sent. Previously, the timer was started when, after
releasing the socket in dccp_close(), the actively-closing side had not yet
reached the CLOSED/TIMEWAIT state.
The patch further reduces the initial timeout from 3 seconds to the required
2 RTTs, where - in absence of a known RTT - the fallback value specified in
RFC 4340, 3.4 is used.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
net/dccp/output.c | 13 ++++++++++++-
net/dccp/proto.c | 18 ------------------
2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 7caa7f5..e97584a 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -574,7 +574,18 @@ void dccp_send_close(struct sock *sk, const int active)
dccp_write_xmit(sk, 1);
dccp_skb_entail(sk, skb);
dccp_transmit_skb(sk, skb_clone(skb, prio));
- /* FIXME do we need a retransmit timer here? */
+ /*
+ * Retransmission timer for active-close: RFC 4340, 8.3 requires
+ * to retransmit the Close/CloseReq until the CLOSING/CLOSEREQ
+ * state can be left. The initial timeout is 2 RTTs.
+ * Since RTT measurement is done by the CCIDs, there is no easy
+ * way to get an RTT sample. The fallback RTT from RFC 4340, 3.4
+ * is too low (200ms); we use a high value to avoid unnecessary
+ * retransmissions when the link RTT is > 0.2 seconds.
+ * FIXME: Let main module sample RTTs and use that instead.
+ */
+ inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
+ DCCP_TIMEOUT_INIT, DCCP_RTO_MAX);
} else
dccp_transmit_skb(sk, skb);
}
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 60f40ec..8a73c8f 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -996,24 +996,6 @@ adjudge_to_death:
if (state != DCCP_CLOSED && sk->sk_state == DCCP_CLOSED)
goto out;
- /*
- * The last release_sock may have processed the CLOSE or RESET
- * packet moving sock to CLOSED state, if not we have to fire
- * the CLOSE/CLOSEREQ retransmission timer, see "8.3. Termination"
- * in draft-ietf-dccp-spec-11. -acme
- */
- if (sk->sk_state == DCCP_CLOSING) {
- /* FIXME: should start at 2 * RTT */
- /* Timer for repeating the CLOSE/CLOSEREQ until an answer. */
- inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
- inet_csk(sk)->icsk_rto,
- DCCP_RTO_MAX);
-#if 0
- /* Yeah, we should use sk->sk_prot->orphan_count, etc */
- dccp_set_state(sk, DCCP_CLOSED);
-#endif
- }
-
if (sk->sk_state == DCCP_CLOSED)
inet_csk_destroy_sock(sk);
--
1.5.3.4
^ permalink raw reply related
* [PATCHES 0/12]: DCCP patches for 2.6.25
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:05 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, dccp
Hi David,
Please consider pulling from:
master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.25
Best Regards,
- Arnaldo
Documentation/networking/dccp.txt | 6 +
include/linux/dccp.h | 24 ++++++-
net/dccp/dccp.h | 10 ++-
net/dccp/feat.c | 29 ++++----
net/dccp/feat.h | 26 -------
net/dccp/input.c | 28 +++++---
net/dccp/ipv4.c | 8 +-
net/dccp/ipv6.c | 8 +-
net/dccp/minisocks.c | 33 +++++----
net/dccp/options.c | 126 +++++++++++++++++++++++++-------------
net/dccp/output.c | 21 +++++-
net/dccp/proto.c | 34 +++-------
12 files changed, 208 insertions(+), 145 deletions(-)
^ permalink raw reply
* [PATCH 05/12] [DCCP]: Collapse repeated `len' statements into one
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:05 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-5-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
This replaces 4 individual assignments for `len' with a single
one, placed where the control flow of those 4 leads to.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
net/dccp/proto.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index cc87c50..0bed4a6 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -657,19 +657,15 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
(__be32 __user *)optval, optlen);
case DCCP_SOCKOPT_GET_CUR_MPS:
val = dp->dccps_mss_cache;
- len = sizeof(val);
break;
case DCCP_SOCKOPT_SERVER_TIMEWAIT:
val = dp->dccps_server_timewait;
- len = sizeof(val);
break;
case DCCP_SOCKOPT_SEND_CSCOV:
val = dp->dccps_pcslen;
- len = sizeof(val);
break;
case DCCP_SOCKOPT_RECV_CSCOV:
val = dp->dccps_pcrlen;
- len = sizeof(val);
break;
case 128 ... 191:
return ccid_hc_rx_getsockopt(dp->dccps_hc_rx_ccid, sk, optname,
@@ -681,6 +677,7 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
return -ENOPROTOOPT;
}
+ len = sizeof(val);
if (put_user(len, optlen) || copy_to_user(optval, &val, len))
return -EFAULT;
--
1.5.3.4
^ permalink raw reply related
* [PATCH 10/12] [DCCP]: Remove unused and redundant validation functions
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:06 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-10-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
This removes two inlines which were both called in a single function only:
1) dccp_feat_change() is always called with either DCCPO_CHANGE_L or DCCPO_CHANGE_R as argument
* from dccp_set_socktopt_change() via do_dccp_setsockopt() with DCCP_SOCKOPT_CHANGE_R/L
* from __dccp_feat_init() via dccp_feat_init() also with DCCP_SOCKOPT_CHANGE_R/L.
Hence the dccp_feat_is_valid_type() is completely unnecessary and always returns true.
2) Due to (1), the length test reduces to 'len >= 4', which in turn makes
dccp_feat_is_valid_length() unnecessary.
Furthermore, the inline function dccp_feat_is_reserved() was unfolded,
since only called in a single place.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
net/dccp/feat.c | 12 ++++--------
net/dccp/feat.h | 26 --------------------------
2 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index 5ebdd86..084744e 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -24,11 +24,7 @@ int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature,
dccp_feat_debug(type, feature, *val);
- if (!dccp_feat_is_valid_type(type)) {
- DCCP_WARN("option type %d invalid in negotiation\n", type);
- return 1;
- }
- if (!dccp_feat_is_valid_length(type, feature, len)) {
+ if (len > 3) {
DCCP_WARN("invalid length %d\n", len);
return 1;
}
@@ -637,12 +633,12 @@ const char *dccp_feat_name(const u8 feat)
[DCCPF_MIN_CSUM_COVER] = "Min. Csum Coverage",
[DCCPF_DATA_CHECKSUM] = "Send Data Checksum",
};
+ if (feat > DCCPF_DATA_CHECKSUM && feat < DCCPF_MIN_CCID_SPECIFIC)
+ return feature_names[DCCPF_RESERVED];
+
if (feat >= DCCPF_MIN_CCID_SPECIFIC)
return "CCID-specific";
- if (dccp_feat_is_reserved(feat))
- return feature_names[DCCPF_RESERVED];
-
return feature_names[feat];
}
diff --git a/net/dccp/feat.h b/net/dccp/feat.h
index 177f7de..e272222 100644
--- a/net/dccp/feat.h
+++ b/net/dccp/feat.h
@@ -14,32 +14,6 @@
#include <linux/types.h>
#include "dccp.h"
-static inline int dccp_feat_is_valid_length(u8 type, u8 feature, u8 len)
-{
- /* sec. 6.1: Confirm has at least length 3,
- * sec. 6.2: Change has at least length 4 */
- if (len < 3)
- return 1;
- if (len < 4 && (type == DCCPO_CHANGE_L || type == DCCPO_CHANGE_R))
- return 1;
- /* XXX: add per-feature length validation (sec. 6.6.8) */
- return 0;
-}
-
-static inline int dccp_feat_is_reserved(const u8 feat)
-{
- return (feat > DCCPF_DATA_CHECKSUM &&
- feat < DCCPF_MIN_CCID_SPECIFIC) ||
- feat == DCCPF_RESERVED;
-}
-
-/* feature negotiation knows only these four option types (RFC 4340, sec. 6) */
-static inline int dccp_feat_is_valid_type(const u8 optnum)
-{
- return optnum >= DCCPO_CHANGE_L && optnum <= DCCPO_CONFIRM_R;
-
-}
-
#ifdef CONFIG_IP_DCCP_DEBUG
extern const char *dccp_feat_typename(const u8 type);
extern const char *dccp_feat_name(const u8 feat);
--
1.5.3.4
^ permalink raw reply related
* [PATCH 09/12] [DCCP]: Support inserting options during the 3-way handshake
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:06 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-9-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
This provides a separate routine to insert options during the initial handshake.
The main purpose is to conduct feature negotiation, for the moment the only user
is the timestamp echo needed for the (CCID3) handshake RTT sample.
Padding of options has been put into a small separate routine, to be shared among
the two functions. This could also be used as a generic routine to finish inserting
options.
Also removed an `XXX' comment since its content was obvious.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
net/dccp/dccp.h | 1 +
net/dccp/options.c | 32 ++++++++++++++++++++++----------
net/dccp/output.c | 2 +-
3 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 3af3320..b138e20 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -428,6 +428,7 @@ static inline int dccp_ack_pending(const struct sock *sk)
}
extern int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
+extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*);
extern int dccp_insert_option_elapsed_time(struct sock *sk,
struct sk_buff *skb,
u32 elapsed_time);
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 0c996d8..bedb5da 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -537,6 +537,18 @@ static int dccp_insert_options_feat(struct sock *sk, struct sk_buff *skb)
return 0;
}
+/* The length of all options needs to be a multiple of 4 (5.8) */
+static void dccp_insert_option_padding(struct sk_buff *skb)
+{
+ int padding = DCCP_SKB_CB(skb)->dccpd_opt_len % 4;
+
+ if (padding != 0) {
+ padding = 4 - padding;
+ memset(skb_push(skb, padding), 0, padding);
+ DCCP_SKB_CB(skb)->dccpd_opt_len += padding;
+ }
+}
+
int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
{
struct dccp_sock *dp = dccp_sk(sk);
@@ -580,18 +592,18 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
dccp_insert_option_timestamp_echo(dp, NULL, skb))
return -1;
- /* XXX: insert other options when appropriate */
+ dccp_insert_option_padding(skb);
+ return 0;
+}
- if (DCCP_SKB_CB(skb)->dccpd_opt_len != 0) {
- /* The length of all options has to be a multiple of 4 */
- int padding = DCCP_SKB_CB(skb)->dccpd_opt_len % 4;
+int dccp_insert_options_rsk(struct dccp_request_sock *dreq, struct sk_buff *skb)
+{
+ DCCP_SKB_CB(skb)->dccpd_opt_len = 0;
- if (padding != 0) {
- padding = 4 - padding;
- memset(skb_push(skb, padding), 0, padding);
- DCCP_SKB_CB(skb)->dccpd_opt_len += padding;
- }
- }
+ if (dreq->dreq_timestamp_echo != 0 &&
+ dccp_insert_option_timestamp_echo(NULL, dreq, skb))
+ return -1;
+ dccp_insert_option_padding(skb);
return 0;
}
diff --git a/net/dccp/output.c b/net/dccp/output.c
index b2e1791..5589a5e 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -303,7 +303,7 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst,
DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_RESPONSE;
DCCP_SKB_CB(skb)->dccpd_seq = dreq->dreq_iss;
- if (dccp_insert_options(sk, skb)) {
+ if (dccp_insert_options_rsk(dreq, skb)) {
kfree_skb(skb);
return NULL;
}
--
1.5.3.4
^ permalink raw reply related
* [PATCH 06/12] [DCCP]: Allow to parse options on Request Sockets
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:05 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-6-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
The option parsing code currently only parses on full sk's. This causes a problem for
options sent during the initial handshake (in particular timestamps and feature-negotiation
options). Therefore, this patch extends the option parsing code with an additional argument
for request_socks: if it is non-NULL, options are parsed on the request socket, otherwise
the normal path (parsing on the sk) is used.
Subsequent patches, which implement feature negotiation during connection setup, make use
of this facility.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
include/linux/dccp.h | 5 +++--
net/dccp/input.c | 6 +++---
net/dccp/ipv4.c | 8 ++++----
net/dccp/ipv6.c | 8 ++++----
net/dccp/options.c | 34 +++++++++++++++++++++++-----------
5 files changed, 37 insertions(+), 24 deletions(-)
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index c676021..7214031 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -407,8 +407,6 @@ struct dccp_opt_pend {
extern void dccp_minisock_init(struct dccp_minisock *dmsk);
-extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb);
-
struct dccp_request_sock {
struct inet_request_sock dreq_inet_rsk;
__u64 dreq_iss;
@@ -423,6 +421,9 @@ static inline struct dccp_request_sock *dccp_rsk(const struct request_sock *req)
extern struct inet_timewait_death_row dccp_death_row;
+extern int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
+ struct sk_buff *skb);
+
struct dccp_options_received {
u32 dccpor_ndp; /* only 24 bits */
u32 dccpor_timestamp;
diff --git a/net/dccp/input.c b/net/dccp/input.c
index dacd4fd..08392ed 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -369,7 +369,7 @@ int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
if (dccp_check_seqno(sk, skb))
goto discard;
- if (dccp_parse_options(sk, skb))
+ if (dccp_parse_options(sk, NULL, skb))
goto discard;
if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
@@ -427,7 +427,7 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
goto out_invalid_packet;
}
- if (dccp_parse_options(sk, skb))
+ if (dccp_parse_options(sk, NULL, skb))
goto out_invalid_packet;
/* Obtain usec RTT sample from SYN exchange (used by CCID 3) */
@@ -609,7 +609,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
/*
* Step 8: Process options and mark acknowledgeable
*/
- if (dccp_parse_options(sk, skb))
+ if (dccp_parse_options(sk, NULL, skb))
goto discard;
if (dcb->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index db17b83..02fc91c 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -600,11 +600,12 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
if (req == NULL)
goto drop;
- if (dccp_parse_options(sk, skb))
- goto drop_and_free;
-
dccp_reqsk_init(req, skb);
+ dreq = dccp_rsk(req);
+ if (dccp_parse_options(sk, dreq, skb))
+ goto drop_and_free;
+
if (security_inet_conn_request(sk, skb, req))
goto drop_and_free;
@@ -621,7 +622,6 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
* In fact we defer setting S.GSR, S.SWL, S.SWH to
* dccp_create_openreq_child.
*/
- dreq = dccp_rsk(req);
dreq->dreq_isr = dcb->dccpd_seq;
dreq->dreq_iss = dccp_v4_init_sequence(skb);
dreq->dreq_service = service;
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index a08e2cb..f42b75c 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -415,11 +415,12 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
if (req == NULL)
goto drop;
- if (dccp_parse_options(sk, skb))
- goto drop_and_free;
-
dccp_reqsk_init(req, skb);
+ dreq = dccp_rsk(req);
+ if (dccp_parse_options(sk, dreq, skb))
+ goto drop_and_free;
+
if (security_inet_conn_request(sk, skb, req))
goto drop_and_free;
@@ -449,7 +450,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
* In fact we defer setting S.GSR, S.SWL, S.SWH to
* dccp_create_openreq_child.
*/
- dreq = dccp_rsk(req);
dreq->dreq_isr = dcb->dccpd_seq;
dreq->dreq_iss = dccp_v6_init_sequence(skb);
dreq->dreq_service = service;
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 523250b..f496d4d 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -46,7 +46,13 @@ static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len)
return value;
}
-int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
+/**
+ * dccp_parse_options - Parse DCCP options present in @skb
+ * @sk: client|server|listening dccp socket (when @dreq != NULL)
+ * @dreq: request socket to use during connection setup, or NULL
+ */
+int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
+ struct sk_buff *skb)
{
struct dccp_sock *dp = dccp_sk(sk);
const struct dccp_hdr *dh = dccp_hdr(skb);
@@ -92,6 +98,20 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
goto out_invalid_option;
}
+ /*
+ * CCID-Specific Options (from RFC 4340, sec. 10.3):
+ *
+ * Option numbers 128 through 191 are for options sent from the
+ * HC-Sender to the HC-Receiver; option numbers 192 through 255
+ * are for options sent from the HC-Receiver to the HC-Sender.
+ *
+ * CCID-specific options are ignored during connection setup, as
+ * negotiation may still be in progress (see RFC 4340, 10.3).
+ *
+ */
+ if (dreq != NULL && opt >= 128)
+ goto ignore_option;
+
switch (opt) {
case DCCPO_PADDING:
break;
@@ -150,6 +170,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
opt_val = get_unaligned((__be32 *)value);
opt_recv->dccpor_timestamp = ntohl(opt_val);
+ /* FIXME: if dreq != NULL, don't store this on listening socket */
dp->dccps_timestamp_echo = opt_recv->dccpor_timestamp;
dp->dccps_timestamp_time = ktime_get_real();
@@ -213,15 +234,6 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
dccp_pr_debug("%s rx opt: ELAPSED_TIME=%d\n",
dccp_role(sk), elapsed_time);
break;
- /*
- * From RFC 4340, sec. 10.3:
- *
- * Option numbers 128 through 191 are for
- * options sent from the HC-Sender to the
- * HC-Receiver; option numbers 192 through 255
- * are for options sent from the HC-Receiver to
- * the HC-Sender.
- */
case 128 ... 191: {
const u16 idx = value - options;
@@ -245,7 +257,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
"implemented, ignoring", sk, opt, len);
break;
}
-
+ignore_option:
if (opt != DCCPO_MANDATORY)
mandatory = 0;
}
--
1.5.3.4
^ permalink raw reply related
* [PATCH 12/12] [DCCP]: Ignore feature negotiation on Data packets
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:06 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, dccp, Gerrit Renker, Ian McDonald,
Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-12-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
This implements [RFC 4340, p. 32]: "any feature negotiation options received
on DCCP-Data packets MUST be ignored".
Also added a FIXME for further processing, since the code currently (wrongly)
classifies empty Confirm options as invalid - this needs to be resolved in
a separate patch.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
net/dccp/options.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/dccp/options.c b/net/dccp/options.c
index bedb5da..d2a84a2 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -132,6 +132,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
case DCCPO_CHANGE_L:
/* fall through */
case DCCPO_CHANGE_R:
+ if (pkt_type == DCCP_PKT_DATA)
+ break;
if (len < 2)
goto out_invalid_option;
rc = dccp_feat_change_recv(sk, opt, *value, value + 1,
@@ -148,7 +150,9 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
case DCCPO_CONFIRM_L:
/* fall through */
case DCCPO_CONFIRM_R:
- if (len < 2)
+ if (pkt_type == DCCP_PKT_DATA)
+ break;
+ if (len < 2) /* FIXME this disallows empty confirm */
goto out_invalid_option;
if (dccp_feat_confirm_recv(sk, opt, *value,
value + 1, len - 1))
--
1.5.3.4
^ permalink raw reply related
* [PATCH 08/12] [DCCP]: Handle timestamps on Request/Response exchange separately
From: Arnaldo Carvalho de Melo @ 2007-12-13 15:06 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, dccp, Gerrit Renker, Arnaldo Carvalho de Melo
In-Reply-To: <1197558365-31134-8-git-send-email-acme@redhat.com>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
In DCCP, timestamps can occur on packets anytime, CCID3 uses a timestamp(/echo) on the Request/Response
exchange. This patch addresses the following situation:
* timestamps are recorded on the listening socket;
* Responses are sent from dccp_request_sockets;
* suppose two connections reach the listening socket with very small time in between:
* the first timestamp value gets overwritten by the second connection request.
This is not really good, so this patch separates timestamps into
* those which are received by the server during the initial handshake (on dccp_request_sock);
* those which are received by the client or the client after connection establishment.
As before, a timestamp of 0 is regarded as indicating that no (meaningful) timestamp has been
received (in addition, a warning message is printed if hosts send 0-valued timestamps).
The timestamp-echoing now works as follows:
* when a timestamp is present on the initial Request, it is placed into dreq, due to the
call to dccp_parse_options in dccp_v{4,6}_conn_request;
* when a timestamp is present on the Ack leading from RESPOND => OPEN, it is copied over
from the request_sock into the child cocket in dccp_create_openreq_child;
* timestamps received on an (established) dccp_sock are treated as before.
Since Elapsed Time is measured in hundredths of milliseconds (13.2), the new dccp_timestamp()
function is used, as it is expected that the time between receiving the timestamp and
sending the timestamp echo will be very small against the wrap-around time. As a byproduct,
this allows smaller timestamping-time fields.
Furthermore, inserting the Timestamp Echo option has been taken out of the block starting with
'!dccp_packet_without_ack()', since Timestamp Echo can be carried on any packet (5.8 and 13.3).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
include/linux/dccp.h | 16 ++++++++++++-
net/dccp/minisocks.c | 21 +++++++++++-------
net/dccp/options.c | 56 ++++++++++++++++++++++++++++++++-----------------
3 files changed, 63 insertions(+), 30 deletions(-)
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 7214031..484e45c 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -407,11 +407,23 @@ struct dccp_opt_pend {
extern void dccp_minisock_init(struct dccp_minisock *dmsk);
+/**
+ * struct dccp_request_sock - represent DCCP-specific connection request
+ * @dreq_inet_rsk: structure inherited from
+ * @dreq_iss: initial sequence number sent on the Response (RFC 4340, 7.1)
+ * @dreq_isr: initial sequence number received on the Request
+ * @dreq_service: service code present on the Request (there is just one)
+ * The following two fields are analogous to the ones in dccp_sock:
+ * @dreq_timestamp_echo: last received timestamp to echo (13.1)
+ * @dreq_timestamp_echo: the time of receiving the last @dreq_timestamp_echo
+ */
struct dccp_request_sock {
struct inet_request_sock dreq_inet_rsk;
__u64 dreq_iss;
__u64 dreq_isr;
__be32 dreq_service;
+ __u32 dreq_timestamp_echo;
+ __u32 dreq_timestamp_time;
};
static inline struct dccp_request_sock *dccp_rsk(const struct request_sock *req)
@@ -477,8 +489,8 @@ struct dccp_ackvec;
* @dccps_gar - greatest valid ack number received on a non-Sync; initialized to %dccps_iss
* @dccps_service - first (passive sock) or unique (active sock) service code
* @dccps_service_list - second .. last service code on passive socket
- * @dccps_timestamp_time - time of latest TIMESTAMP option
* @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
+ * @dccps_timestamp_time - time of receiving latest @dccps_timestamp_echo
* @dccps_l_ack_ratio - feature-local Ack Ratio
* @dccps_r_ack_ratio - feature-remote Ack Ratio
* @dccps_pcslen - sender partial checksum coverage (via sockopt)
@@ -514,8 +526,8 @@ struct dccp_sock {
__u64 dccps_gar;
__be32 dccps_service;
struct dccp_service_list *dccps_service_list;
- ktime_t dccps_timestamp_time;
__u32 dccps_timestamp_echo;
+ __u32 dccps_timestamp_time;
__u16 dccps_l_ack_ratio;
__u16 dccps_r_ack_ratio;
__u16 dccps_pcslen;
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index b1d5da6..027d181 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -117,11 +117,13 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
struct dccp_sock *newdp = dccp_sk(newsk);
struct dccp_minisock *newdmsk = dccp_msk(newsk);
- newdp->dccps_role = DCCP_ROLE_SERVER;
- newdp->dccps_hc_rx_ackvec = NULL;
- newdp->dccps_service_list = NULL;
- newdp->dccps_service = dreq->dreq_service;
- newicsk->icsk_rto = DCCP_TIMEOUT_INIT;
+ newdp->dccps_role = DCCP_ROLE_SERVER;
+ newdp->dccps_hc_rx_ackvec = NULL;
+ newdp->dccps_service_list = NULL;
+ newdp->dccps_service = dreq->dreq_service;
+ newdp->dccps_timestamp_echo = dreq->dreq_timestamp_echo;
+ newdp->dccps_timestamp_time = dreq->dreq_timestamp_time;
+ newicsk->icsk_rto = DCCP_TIMEOUT_INIT;
if (dccp_feat_clone(sk, newsk))
goto out_free;
@@ -303,9 +305,12 @@ EXPORT_SYMBOL_GPL(dccp_reqsk_send_ack);
void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb)
{
- inet_rsk(req)->rmt_port = dccp_hdr(skb)->dccph_sport;
- inet_rsk(req)->acked = 0;
- req->rcv_wnd = sysctl_dccp_feat_sequence_window;
+ struct dccp_request_sock *dreq = dccp_rsk(req);
+
+ inet_rsk(req)->rmt_port = dccp_hdr(skb)->dccph_sport;
+ inet_rsk(req)->acked = 0;
+ req->rcv_wnd = sysctl_dccp_feat_sequence_window;
+ dreq->dreq_timestamp_echo = 0;
}
EXPORT_SYMBOL_GPL(dccp_reqsk_init);
diff --git a/net/dccp/options.c b/net/dccp/options.c
index f496d4d..0c996d8 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -166,16 +166,27 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
case DCCPO_TIMESTAMP:
if (len != 4)
goto out_invalid_option;
-
+ /*
+ * RFC 4340 13.1: "The precise time corresponding to
+ * Timestamp Value zero is not specified". We use
+ * zero to indicate absence of a meaningful timestamp.
+ */
opt_val = get_unaligned((__be32 *)value);
- opt_recv->dccpor_timestamp = ntohl(opt_val);
-
- /* FIXME: if dreq != NULL, don't store this on listening socket */
- dp->dccps_timestamp_echo = opt_recv->dccpor_timestamp;
- dp->dccps_timestamp_time = ktime_get_real();
+ if (unlikely(opt_val == 0)) {
+ DCCP_WARN("Timestamp with zero value\n");
+ break;
+ }
+ if (dreq != NULL) {
+ dreq->dreq_timestamp_echo = ntohl(opt_val);
+ dreq->dreq_timestamp_time = dccp_timestamp();
+ } else {
+ opt_recv->dccpor_timestamp =
+ dp->dccps_timestamp_echo = ntohl(opt_val);
+ dp->dccps_timestamp_time = dccp_timestamp();
+ }
dccp_pr_debug("%s rx opt: TIMESTAMP=%u, ackno=%llu\n",
- dccp_role(sk), opt_recv->dccpor_timestamp,
+ dccp_role(sk), ntohl(opt_val),
(unsigned long long)
DCCP_SKB_CB(skb)->dccpd_ack_seq);
break;
@@ -393,16 +404,24 @@ int dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb)
EXPORT_SYMBOL_GPL(dccp_insert_option_timestamp);
-static int dccp_insert_option_timestamp_echo(struct sock *sk,
+static int dccp_insert_option_timestamp_echo(struct dccp_sock *dp,
+ struct dccp_request_sock *dreq,
struct sk_buff *skb)
{
- struct dccp_sock *dp = dccp_sk(sk);
__be32 tstamp_echo;
- int len, elapsed_time_len;
unsigned char *to;
- const suseconds_t delta = ktime_us_delta(ktime_get_real(),
- dp->dccps_timestamp_time);
- u32 elapsed_time = delta / 10;
+ u32 elapsed_time, elapsed_time_len, len;
+
+ if (dreq != NULL) {
+ elapsed_time = dccp_timestamp() - dreq->dreq_timestamp_time;
+ tstamp_echo = htonl(dreq->dreq_timestamp_echo);
+ dreq->dreq_timestamp_echo = 0;
+ } else {
+ elapsed_time = dccp_timestamp() - dp->dccps_timestamp_time;
+ tstamp_echo = htonl(dp->dccps_timestamp_echo);
+ dp->dccps_timestamp_echo = 0;
+ }
+
elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
len = 6 + elapsed_time_len;
@@ -415,7 +434,6 @@ static int dccp_insert_option_timestamp_echo(struct sock *sk,
*to++ = DCCPO_TIMESTAMP_ECHO;
*to++ = len;
- tstamp_echo = htonl(dp->dccps_timestamp_echo);
memcpy(to, &tstamp_echo, 4);
to += 4;
@@ -427,8 +445,6 @@ static int dccp_insert_option_timestamp_echo(struct sock *sk,
memcpy(to, &var32, 4);
}
- dp->dccps_timestamp_echo = 0;
- dp->dccps_timestamp_time = ktime_set(0, 0);
return 0;
}
@@ -537,10 +553,6 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
dccp_ackvec_pending(dp->dccps_hc_rx_ackvec) &&
dccp_insert_option_ackvec(sk, skb))
return -1;
-
- if (dp->dccps_timestamp_echo != 0 &&
- dccp_insert_option_timestamp_echo(sk, skb))
- return -1;
}
if (dp->dccps_hc_rx_insert_options) {
@@ -564,6 +576,10 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
dccp_insert_option_timestamp(sk, skb))
return -1;
+ if (dp->dccps_timestamp_echo != 0 &&
+ dccp_insert_option_timestamp_echo(dp, NULL, skb))
+ return -1;
+
/* XXX: insert other options when appropriate */
if (DCCP_SKB_CB(skb)->dccpd_opt_len != 0) {
--
1.5.3.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox