Re: slab corruption in 2.6.16rc1-git4
On Sat, 04 Feb 2006 13:50:44 +1100 Herbert Xu <[EMAIL PROTECTED]> wrote: > Dave Jones <[EMAIL PROTECTED]> wrote: > > Note the first slab corruption line.. > > > > 000: 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b > > > > has a single bit error, which _could_ be bad ram, as this box is an ancient > > Actually, this is exactly what would've happened if someone did a > dst_release on a freed dst entry. So this probably ties in with > your report about dst badness. > > Unfrotunately, I was able to reproduce this bug exactly once with isic > and since then no matter what I do it just works perfectly. It takes about 15 minutes of over a gigabit link for me to trigger on a dual Opteron with 2G of mem. Maybe Dave's niagra's would be faster. Although it might be depend on what level of debugging is turned on. What would be helpful is knowing whether it is related to code path (ie input packet), or dst cache fillup/release. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fw: genetlink or connector interface for delay accounting patches ?
On Fri, 2006-03-02 at 16:34 -0800, David S. Miller wrote: > Can someone look into the holes found in the genetlink code > Andrew mentions below? > "how come the return value from genlmsg_multicast() gets ignored" Sometimes the users dont care about the return code; i.e if the message doesnt make it fine. You should look at if you care about reliability of delivery and perhaps retransmit when it makes sense. > "how come i takes the address of an inline function" Didnt quiet follow > "how come genl_register_family() leaves genl_sem held if kmalloc >failed" and "how come there's a return statement after panic() which >is marked NORET_TYPE". certainly bugs. patch attached. PS:- I have a doc i started working on - will look it up and post cheers, jamal Fix genetlink bugs found by Sir Andrew Morton Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]> --- diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 4ae1538..8cbad1d 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -238,7 +238,7 @@ int genl_register_family(struct genl_fam sizeof(struct nlattr *), GFP_KERNEL); if (family->attrbuf == NULL) { err = -ENOMEM; - goto errout; + goto errout_locked; } } else family->attrbuf = NULL; @@ -549,10 +549,8 @@ static int __init genl_init(void) netlink_set_nonroot(NETLINK_GENERIC, NL_NONROOT_RECV); genl_sock = netlink_kernel_create(NETLINK_GENERIC, GENL_MAX_ID, genl_rcv, THIS_MODULE); - if (genl_sock == NULL) { + if (genl_sock == NULL) panic("GENL: Cannot initialize generic netlink\n"); - return -ENOMEM; - } return 0; @@ -560,7 +558,6 @@ errout_register: genl_unregister_family(&genl_ctrl); errout: panic("GENL: Cannot register controller: %d\n", err); - return err; } subsys_initcall(genl_init);
Re: slab corruption in 2.6.16rc1-git4
Dave Jones <[EMAIL PROTECTED]> wrote: > Note the first slab corruption line.. > > 000: 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b > > has a single bit error, which _could_ be bad ram, as this box is an ancient Actually, this is exactly what would've happened if someone did a dst_release on a freed dst entry. So this probably ties in with your report about dst badness. Unfrotunately, I was able to reproduce this bug exactly once with isic and since then no matter what I do it just works perfectly. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed
From: Pradeep Vincent <[EMAIL PROTECTED]> Date: Fri, 3 Feb 2006 18:06:53 -0800 > Resending.. Your email client has tab and newline mangled the patch so it cannot be applied. Please fix this up and also supply an appropriate "Signed-off-by: " line. Thanks. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Fwd: [Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed
Resending.. -- Forwarded message -- From: Pradeep Vincent <[EMAIL PROTECTED]> Date: Nov 28, 2005 12:57 PM Subject: [Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed To: linux-kernel@vger.kernel.org, [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] In 2.4.21, arp code uses gc_timer to check for stale arp cache entries. In 2.6, each entry has its own timer to check for stale arp cache. 2.4.29 to 2.4.32 kernels (atleast) use neither of these timers. This causes problems in environments where IPs or MACs are reassigned - saw this problem on load balancing router based networks that use VMACs. Tested this code on load balancing router based networks as well as peer-linux systems. Let me know if I need to contact someone else about this, Thanks, Pradeep Vincent diff -Naur old/net/core/neighbour.c new/net/core/neighbour.c --- old/net/core/neighbour.cWed Nov 23 17:15:30 2005 +++ new/net/core/neighbour.cWed Nov 23 17:26:01 2005 @@ -14,6 +14,7 @@ * Vitaly E. Lavrovreleasing NULL neighbor in neigh_add. * Harald WelteAdd neighbour cache statistics like rtstat * Harald Welteport neighbour cache rework from 2.6.9-rcX + * Pradeep Vincent Move neighbour cache entry to stale state */ #include @@ -705,6 +706,14 @@ neigh_release(n); continue; } + + /* Mark it stale - To be reconfirmed later when used */ + if (n->nud_state&NUD_REACHABLE && + now - n->confirmed > n->parms->reachable_time) { + n->nud_state = NUD_STALE; + neigh_suspect(n); + } + write_unlock(&n->lock); next_elt: - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[2.6 patch] schedule eepro100.c for removal
On Fri, Feb 03, 2006 at 05:18:58PM -0500, Benjamin LaHaise wrote: > Where's the hunk to make the eepro100 driver spew messages about being > obsolete out upon loading? Updated patch below. > -ben cu Adrian <-- snip --> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- Documentation/feature-removal-schedule.txt |6 ++ drivers/net/eepro100.c |1 + 2 files changed, 7 insertions(+) --- linux-2.6.15-mm4-full/Documentation/feature-removal-schedule.txt.old 2006-01-18 08:38:57.0 +0100 +++ linux-2.6.15-mm4-full/Documentation/feature-removal-schedule.txt 2006-01-18 08:39:59.0 +0100 @@ -164,0 +165,6 @@ +--- + +What: eepro100 network driver +When: April 2006 +Why:replaced by the e100 driver +Who:Adrian Bunk <[EMAIL PROTECTED]> --- linux-2.6.16-rc1-mm5-full/drivers/net/eepro100.c.old2006-02-03 23:37:55.0 +0100 +++ linux-2.6.16-rc1-mm5-full/drivers/net/eepro100.c2006-02-03 23:39:10.0 +0100 @@ -2391,6 +2391,7 @@ static int __init eepro100_init_module(v #ifdef MODULE printk(version); #endif + printk(KERN_WARNING "eepro100 will be removed soon, please use the e100 driver\n"); return pci_module_init(&eepro100_driver); } - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[2.6 patch] move some code to net/ipx/af_ipx.c
This patch moves some code only used in this file to net/ipx/af_ipx.c . Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- This patch was already sent on: - 22 Jan 2006 - 14 Jan 2006 include/net/p8022.h | 13 - net/802/Makefile | 14 ++--- net/802/p8022.c | 66 --- net/802/p8023.c | 61 - net/8021q/vlan.c |1 net/8021q/vlan_dev.c |1 net/ethernet/Makefile |2 net/ethernet/pe2.c| 39 net/ipx/af_ipx.c | 102 -- 9 files changed, 106 insertions(+), 193 deletions(-) --- linux-2.6.15-rc1-mm1-full/net/ethernet/Makefile.old 2005-11-18 02:15:17.0 +0100 +++ linux-2.6.15-rc1-mm1-full/net/ethernet/Makefile 2005-11-18 02:15:22.0 +0100 @@ -4,5 +4,3 @@ obj-y += eth.o obj-$(CONFIG_SYSCTL) += sysctl_net_ether.o -obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o -obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o --- linux-2.6.15-rc1-mm1-full/net/8021q/vlan.c.old 2005-11-18 02:19:40.0 +0100 +++ linux-2.6.15-rc1-mm1-full/net/8021q/vlan.c 2005-11-18 02:19:46.0 +0100 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include --- linux-2.6.15-rc1-mm1-full/net/8021q/vlan_dev.c.old 2005-11-18 02:19:55.0 +0100 +++ linux-2.6.15-rc1-mm1-full/net/8021q/vlan_dev.c 2005-11-18 02:19:58.0 +0100 @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "vlan.h" --- linux-2.6.15-rc1-mm1-full/net/ipx/af_ipx.c.old 2005-11-18 02:17:00.0 +0100 +++ linux-2.6.15-rc1-mm1-full/net/ipx/af_ipx.c 2005-11-18 02:26:01.0 +0100 @@ -48,10 +48,10 @@ #include #include -#include #include #include #include +#include #include @@ -1939,8 +1939,104 @@ .notifier_call = ipxitf_device_event, }; -extern struct datalink_proto *make_EII_client(void); -extern void destroy_EII_client(struct datalink_proto *); +static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb, +unsigned char *dest) +{ + llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap); + return 0; +} + +static struct datalink_proto *register_8022_client(unsigned char type, + int (*func)(struct sk_buff *skb, + struct net_device *dev, + struct packet_type *pt, + struct net_device *orig_dev)) +{ + struct datalink_proto *proto; + + proto = kmalloc(sizeof(*proto), GFP_ATOMIC); + if (proto) { + proto->type[0] = type; + proto->header_length= 3; + proto->request = p8022_request; + proto->sap = llc_sap_open(type, func); + if (!proto->sap) { + kfree(proto); + proto = NULL; + } + } + return proto; +} + +static void unregister_8022_client(struct datalink_proto *proto) +{ + llc_sap_put(proto->sap); + kfree(proto); +} + +/* + * Place an 802.3 header on a packet. The driver will do the mac + * addresses, we just need to give it the buffer length. + */ +static int p8023_request(struct datalink_proto *dl, +struct sk_buff *skb, unsigned char *dest_node) +{ + struct net_device *dev = skb->dev; + + dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len); + return dev_queue_xmit(skb); +} + +/* + * Create an 802.3 client. Note there can be only one 802.3 client + */ +static struct datalink_proto *make_8023_client(void) +{ + struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC); + + if (proto) { + proto->header_length = 0; + proto->request = p8023_request; + } + return proto; +} + +/* + * Destroy the 802.3 client. + */ +static void destroy_8023_client(struct datalink_proto *dl) +{ + kfree(dl); +} + +static int pEII_request(struct datalink_proto *dl, + struct sk_buff *skb, unsigned char *dest_node) +{ + struct net_device *dev = skb->dev; + + skb->protocol = htons(ETH_P_IPX); + if (dev->hard_header) + dev->hard_header(skb, dev, ETH_P_IPX, +dest_node, NULL, skb->len); + return dev_queue_xmit(skb); +} + +static struct datalink_proto *make_EII_client(void) +{ + struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC); + + if (proto) { + proto->header_length = 0; + proto->request = pEII_request; + } + + return proto; +} + +static void destroy_EII_client(struct datalink_proto *dl) +{
[2.6 patch] net/tipc/: possible cleanups
This patch contains the following possible cleanups: - make needlessly global code static - #if 0 the following unused global functions: - name_table.c: tipc_nametbl_print() - name_table.c: tipc_nametbl_dump() - net.c: tipc_net_next_node() Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- This patch was already sent on: - 26 Jan 2006 net/tipc/bcast.c |9 + net/tipc/cluster.c| 11 +-- net/tipc/discover.c |8 net/tipc/name_table.c | 27 ++- net/tipc/net.c|3 ++- net/tipc/node.c |2 +- 6 files changed, 35 insertions(+), 25 deletions(-) --- linux-2.6.16-rc1-mm3-full/net/tipc/bcast.c.old 2006-01-26 06:56:41.0 +0100 +++ linux-2.6.16-rc1-mm3-full/net/tipc/bcast.c 2006-01-26 06:57:33.0 +0100 @@ -314,7 +314,8 @@ * Only tipc_net_lock set. */ -void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) +static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, + u32 gap_to) { struct node *n_ptr = tipc_node_find(dest); u32 my_after, my_to; @@ -525,9 +526,9 @@ * Returns 0 if packet sent successfully, non-zero if not */ -int tipc_bcbearer_send(struct sk_buff *buf, - struct tipc_bearer *unused1, - struct tipc_media_addr *unused2) +static int tipc_bcbearer_send(struct sk_buff *buf, + struct tipc_bearer *unused1, + struct tipc_media_addr *unused2) { static int send_count = 0; --- linux-2.6.16-rc1-mm3-full/net/tipc/cluster.c.old2006-01-26 06:57:51.0 +0100 +++ linux-2.6.16-rc1-mm3-full/net/tipc/cluster.c2006-01-26 06:58:31.0 +0100 @@ -44,9 +44,8 @@ #include "msg.h" #include "bearer.h" -void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, -u32 lower, u32 upper); -struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); +static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, + u32 lower, u32 upper); struct node **tipc_local_nodes = 0; struct node_map tipc_cltr_bcast_nodes = {0,{0,}}; @@ -229,7 +228,7 @@ *Routing table management: See description in node.c */ -struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest) +static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest) { u32 size = INT_H_SIZE + data_size; struct sk_buff *buf = buf_acquire(size); @@ -495,8 +494,8 @@ * tipc_cltr_multicast - multicast message to local nodes */ -void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, -u32 lower, u32 upper) +static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, + u32 lower, u32 upper) { struct sk_buff *buf_copy; struct node *n_ptr; --- linux-2.6.16-rc1-mm3-full/net/tipc/discover.c.old 2006-01-26 06:59:53.0 +0100 +++ linux-2.6.16-rc1-mm3-full/net/tipc/discover.c 2006-01-26 07:00:05.0 +0100 @@ -110,10 +110,10 @@ * @b_ptr: ptr to bearer issuing message */ -struct sk_buff *tipc_disc_init_msg(u32 type, - u32 req_links, - u32 dest_domain, - struct bearer *b_ptr) +static struct sk_buff *tipc_disc_init_msg(u32 type, + u32 req_links, + u32 dest_domain, + struct bearer *b_ptr) { struct sk_buff *buf = buf_acquire(DSC_H_SIZE); struct tipc_msg *msg; --- linux-2.6.16-rc1-mm3-full/net/tipc/name_table.c.old 2006-01-26 07:00:49.0 +0100 +++ linux-2.6.16-rc1-mm3-full/net/tipc/name_table.c 2006-01-26 07:03:54.0 +0100 @@ -46,7 +46,7 @@ #include "cluster.h" #include "bcast.h" -int tipc_nametbl_size = 1024; /* must be a power of 2 */ +static int tipc_nametbl_size = 1024; /* must be a power of 2 */ /** * struct sub_seq - container for all published instances of a name sequence @@ -142,7 +142,7 @@ * tipc_subseq_alloc - allocate a specified number of sub-sequence structures */ -struct sub_seq *tipc_subseq_alloc(u32 cnt) +static struct sub_seq *tipc_subseq_alloc(u32 cnt) { u32 sz = cnt * sizeof(struct sub_seq); struct sub_seq *sseq = (struct sub_seq *)kmalloc(sz, GFP_ATOMIC); @@ -158,7 +158,8 @@ * Allocates a single sub-sequence structure and sets it to all 0's. */ -struct name_seq *tipc_nameseq_create(u32 type, struct hlist_head *seq_head) +static struct name_seq *tipc_nameseq_create(u32 type, + struct hlist_head *seq_head) { struct name_seq *nseq = (struct name_seq *)kmalloc(sizeof(*nseq), GFP_ATOMIC); @@
Fw: genetlink or connector interface for delay accounting patches ?
Can someone look into the holes found in the genetlink code Andrew mentions below? Thanks. --- Begin Message --- "David S. Miller" <[EMAIL PROTECTED]> wrote: > > Or do you think people working on networking should have to shift > through 300 postings a day about the copyrights of dead authors and > the bi-yearly flame fests about cdrecord? No, I think that people who are proposing a piece of code which other kernel developers are expected to use should keep those developers informed on it. I at no point suggested that Jamal & co should read linux-kernel. I meant that they (or you) should have cc'ed linux-kernel on the discussions regarding this feature. And I think you know that's what I meant. And if the patches _had_ been cc'ed to linux-kernel, not only would the knowledge been better spread, people might have asked stuff like "how come the return value from genlmsg_multicast() gets ignored" and "how come it takes the address of an inline function" and "how come genl_register_family() leaves genl_sem held if kmalloc failed" and "how come there's a return statement after panic() which is marked NORET_TYPE". Again: bottom line: the target audience for this feature don't know how to use it, don't know who wrote it, don't know why they wrote it and don't even know it exists. That's just a boring old fact and we should have found a way to prevent this from coming about. --- End Message ---
open bugzilla reports
This is a listing of the 263 bugzilla records which I felt worth keeping an eye on. It would be appreciated if the various maintenance teams could take a look, close off any which are fixed and see if we can fix any which aren't. There's probably not a lot of point in replying to this email for any particular bug: please do that within bugzilla and I can update this list based upon any bugzilla updates. If you do reply to this email, please trim the cc list to something appropriate, thanks. agp/drm/video/X === [Bug 5163] x crashes at startup http://bugzilla.kernel.org/show_bug.cgi?id=5163 alsa [Bug 5398] ES1988 Allegro-1 : No sound after boot http://bugzilla.kernel.org/show_bug.cgi?id=5398 [Bug 5420] SiS CMI onboard sound card not working http://bugzilla.kernel.org/show_bug.cgi?id=5420 [Bug 5523] Alsa Broken on 2.6.14 http://bugzilla.kernel.org/show_bug.cgi?id=5523 [Bug 5568] opl3sa driver broken in 2.6.14 http://bugzilla.kernel.org/show_bug.cgi?id=5568 [Bug 5824] EMU8000 does not depend on SB http://bugzilla.kernel.org/show_bug.cgi?id=5824 [Bug 5852] emu10k1 doesn't work http://bugzilla.kernel.org/show_bug.cgi?id=5852 [Bug 5126] No sound on Thinkpad X31 (Intel http://bugzilla.kernel.org/show_bug.cgi?id=5126 [Bug 5207] Sound system crashes when using the http://bugzilla.kernel.org/show_bug.cgi?id=5207 [Bug 5828] mplayer093 crash after update to http://bugzilla.kernel.org/show_bug.cgi?id=5828 [Bug 5892] Impossible to congigure hda_intel http://bugzilla.kernel.org/show_bug.cgi?id=5892 [Bug 5912] Can't record audio with mencoder http://bugzilla.kernel.org/show_bug.cgi?id=5912 [Bug 5621] no sound with snd-via82xx after resume http://bugzilla.kernel.org/show_bug.cgi?id=5621 [Bug 5628] snd_intel8x0 crash with Java application http://bugzilla.kernel.org/show_bug.cgi?id=5628 [Bug 5634] ALSA fails with SB16 value http://bugzilla.kernel.org/show_bug.cgi?id=5634 [Bug 5705] cmipci - No 5.1 http://bugzilla.kernel.org/show_bug.cgi?id=5705 [Bug 5723] No sound with SB Live (Chip: SigmaTel http://bugzilla.kernel.org/show_bug.cgi?id=5723 [Bug 5726] soundblaster live 5.1 soundcard gets http://bugzilla.kernel.org/show_bug.cgi?id=5726 [Bug 5761] intel hda with some wrong http://bugzilla.kernel.org/show_bug.cgi?id=5761 [Bug 5763] ali5451 sound module hangs on swsusp http://bugzilla.kernel.org/show_bug.cgi?id=5763 [Bug 5792] ENS1371 codec read timeout http://bugzilla.kernel.org/show_bug.cgi?id=5792 [Bug 5937] regression: 2.6.15 and 2.6.16-rc1: http://bugzilla.kernel.org/show_bug.cgi?id=5937 [Bug 5986] speaker/headphone output selection http://bugzilla.kernel.org/show_bug.cgi?id=5986 block = [Bug 5485] cdrom door locked when pktcdvd is http://bugzilla.kernel.org/show_bug.cgi?id=5485 [Bug 5900] Extremely slow sync with anticipatory http://bugzilla.kernel.org/show_bug.cgi?id=5900 bluetooth = [Bug 5886] Immediate reboot when cancel file http://bugzilla.kernel.org/show_bug.cgi?id=5886 [Bug 5944] killing hciattach causes kernel oops if http://bugzilla.kernel.org/show_bug.cgi?id=5944 [Bug 5959] bluetooth CF card is broken by http://bugzilla.kernel.org/show_bug.cgi?id=5959 core kernel === [Bug 5823] complete freeze http://bugzilla.kernel.org/show_bug.cgi?id=5823 [Bug 5042] setrlimit/getrlimit broken on 32-bit http://bugzilla.kernel.org/show_bug.cgi?id=5042 [Bug 5074] /sys/module/*/parameters/* not working http://bugzilla.kernel.org/show_bug.cgi?id=5074 [Bug 5127] Lost ticks compensation fires when it http://bugzilla.kernel.org/show_bug.cgi?id=5127 [Bug 5138] 64bit put_unaligned/get_unaligned does http://bugzilla.kernel.org/show_bug.cgi?id=5138 [Bug 5877] Suspected scheduling starvation http://bugzilla.kernel.org/show_bug.cgi?id=5877 [Bug 3927] AMD64/ATI : timer is running twice as fast as it should http://bugzilla.kernel.org/show_bug.cgi?id=3927 [Bug 5645] [ELF] SIGKILL for n*0x1000 sized ELF http://bugzilla.kernel.org/show_bug.cgi?id=5645 cpufreq === [Bug 5353] cpufreq_conservative: cpu always in http://bugzilla.kernel.org/show_bug.cgi?id=5353 [Bug 5495] changing cpu frequency causes fatal USB http://bugzilla.kernel.org/show_bug.cgi?id=5495 [Bug 5553] speedstep-smi fails to load if http://bugzilla.kernel.org/show_bug.cgi?id=5553 [Bug 5860] ondemand and speedstep-ich fail on http://bugzilla.kernel.org/show_bug.cgi?id=5860 [Bug 5122] cpufreq/powernowd is still not working http://bugzilla.kernel.org/show_bug.cgi?id=5122 [Bug 5771] OOPS in libata when scaling cpu http://bugzilla.kernel.org/show_bug.cgi?id=5771 [Bug 5773] hang on reboot http://bugzilla.kernel.org/show_bug.cgi?id=5773 [Bug 5779] A very strange bug - possibly a BIOS http://
Re: [2.6 patch] schedule eepro100.c for removal
Where's the hunk to make the eepro100 driver spew messages about being obsolete out upon loading? -ben On Fri, Feb 03, 2006 at 10:32:34PM +0100, Adrian Bunk wrote: > Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> > > --- > > This patch was already sent on: > - 18 Jan 2006 > > --- linux-2.6.15-mm4-full/Documentation/feature-removal-schedule.txt.old > 2006-01-18 08:38:57.0 +0100 > +++ linux-2.6.15-mm4-full/Documentation/feature-removal-schedule.txt > 2006-01-18 08:39:59.0 +0100 > @@ -164,0 +165,6 @@ > +--- > + > +What: eepro100 network driver > +When: April 2006 > +Why:replaced by the e100 driver > +Who:Adrian Bunk <[EMAIL PROTECTED]> > > - > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html -- "Ladies and gentlemen, I'm sorry to interrupt, but the police are here and they've asked us to stop the party." Don't Email: <[EMAIL PROTECTED]>. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: badness in dst_release
The backtrace in 2.6.12-rc2 is: [ 955.224077] Badness in dst_release at include/net/dst.h:155 [ 955.226547] [ 955.226548] Call Trace: {__kfree_skb+101} {ip_rcv+1255} [ 955.229219]{packet_rcv_spkt+608} {netif_receive_skb+500} [ 955.231976]{:tg3:tg3_poll+1589} {net_rx_action+132} [ 955.234879]{__do_softirq+111} {do_softirq+48} [ 955.237866]{do_IRQ+77} {ret_from_intr+0} [ 955.240929] {default_idle+0} {default_idle+34} [ 955.244095]{cpu_idle+71} And hitting machine with: isic -s rand -d {SUTIP} Config is: # # Automatically generated make config: don't edit # Linux kernel version: 2.6.12-rc2 # Fri Feb 3 11:44:27 2006 # CONFIG_X86_64=y CONFIG_64BIT=y CONFIG_X86=y CONFIG_MMU=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_X86_CMPXCHG=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup # CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_HOTPLUG=y CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_CPUSETS is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y CONFIG_STOP_MACHINE=y # # Processor type and features # CONFIG_MK8=y # CONFIG_MPSC is not set # CONFIG_GENERIC_CPU is not set CONFIG_X86_L1_CACHE_BYTES=64 CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_X86_TSC=y CONFIG_X86_GOOD_APIC=y # CONFIG_MICROCODE is not set # CONFIG_X86_MSR is not set # CONFIG_X86_CPUID is not set CONFIG_X86_IO_APIC=y CONFIG_X86_LOCAL_APIC=y CONFIG_MTRR=y CONFIG_SMP=y # CONFIG_PREEMPT is not set # CONFIG_SCHED_SMT is not set # CONFIG_K8_NUMA is not set # CONFIG_NUMA_EMU is not set # CONFIG_NUMA is not set CONFIG_HAVE_DEC_LOCK=y CONFIG_NR_CPUS=8 CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_GART_IOMMU=y CONFIG_SWIOTLB=y CONFIG_X86_MCE=y # CONFIG_X86_MCE_INTEL is not set CONFIG_SECCOMP=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y # # Power management options # CONFIG_PM=y # CONFIG_PM_DEBUG is not set # CONFIG_SOFTWARE_SUSPEND is not set # # ACPI (Advanced Configuration and Power Interface) Support # CONFIG_ACPI=y CONFIG_ACPI_BOOT=y CONFIG_ACPI_INTERPRETER=y CONFIG_ACPI_SLEEP=y CONFIG_ACPI_SLEEP_PROC_FS=y CONFIG_ACPI_AC=m CONFIG_ACPI_BATTERY=m CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m CONFIG_ACPI_FAN=m CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_THERMAL=m CONFIG_ACPI_ASUS=m # CONFIG_ACPI_IBM is not set # CONFIG_ACPI_TOSHIBA is not set CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_BUS=y CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_PCI=y CONFIG_ACPI_SYSTEM=y # CONFIG_ACPI_CONTAINER is not set # # CPU Frequency scaling # # CONFIG_CPU_FREQ is not set # # Bus options (PCI etc.) # CONFIG_PCI=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_UNORDERED_IO=y CONFIG_PCIEPORTBUS=y CONFIG_PCI_MSI=y # CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set # CONFIG_PCI_DEBUG is not set # # PCCARD (PCMCIA/CardBus) support # # CONFIG_PCCARD is not set # # PCI Hotplug Support # # CONFIG_HOTPLUG_PCI is not set # # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_IA32_EMULATION=y CONFIG_IA32_AOUT=y CONFIG_COMPAT=y CONFIG_SYSVIPC_COMPAT=y CONFIG_UID16=y # # Device Drivers # # # Generic Driver Options # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # # Parallel port support # # CONFIG_PARPORT is not set # # Plug and Play support # CONFIG_PNP=y # CONFIG_PNP_DEBUG is not set # # Protocols # CONFIG_PNPACPI=y # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=128000 CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set # CONFIG_CDROM_PKTCDVD is not set # # IO Schedulers # CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y #
RE: SNAP headers, RFC1042
The problem is that when bridging the bridge code gets run before the protocol handlers, hence psnap never sees the frame before it is output again. In addition any ingress qdisc has already been run before the protocol handlers, so the protocol is wrong there - hence my suggestion of using the _type_trans as a place to do it. Simon -Original Message- From: Stephen Hemminger [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 1:25 PM To: Simon Barber Cc: netdev@vger.kernel.org; Jouni Malinen Subject: Re: SNAP headers, RFC1042 On Fri, 3 Feb 2006 13:22:48 -0800 "Simon Barber" <[EMAIL PROTECTED]> wrote: > The main reason is bridging - the header format needs to be different > for different ports. Ideally I'd like to see a single snap processor > used in both cases (local receive & bridging). One problem with the > current processor is the in the bridge the skb->protocol is set to > 802_2_LLC, not to the real protocol type. This prevents ebtables rules > and tc from working correctly. > > Simon Then psnap should reset skb->protocol. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: badness in dst_release
On Thu, 02 Feb 2006 16:49:29 -0800 (PST) "David S. Miller" <[EMAIL PROTECTED]> wrote: > From: Dave Jones <[EMAIL PROTECTED]> > Date: Thu, 2 Feb 2006 14:30:28 -0500 > > > Here's a second flavour. > > Can you git bisect to figure out when this problem started > to occur? > It happened before git conversion. First git version 2.6.12-rc2 fails as well. I think it might be a zero day problem when the dst cache gets full. -- Stephen Hemminger <[EMAIL PROTECTED]> OSDL http://developer.osdl.org/~shemminger - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[2.6 patch] schedule eepro100.c for removal
Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- This patch was already sent on: - 18 Jan 2006 --- linux-2.6.15-mm4-full/Documentation/feature-removal-schedule.txt.old 2006-01-18 08:38:57.0 +0100 +++ linux-2.6.15-mm4-full/Documentation/feature-removal-schedule.txt 2006-01-18 08:39:59.0 +0100 @@ -164,0 +165,6 @@ +--- + +What: eepro100 network driver +When: April 2006 +Why:replaced by the e100 driver +Who:Adrian Bunk <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: SNAP headers, RFC1042
On Fri, 3 Feb 2006 13:22:48 -0800 "Simon Barber" <[EMAIL PROTECTED]> wrote: > The main reason is bridging - the header format needs to be different > for different ports. Ideally I'd like to see a single snap processor > used in both cases (local receive & bridging). One problem with the > current processor is the in the bridge the skb->protocol is set to > 802_2_LLC, not to the real protocol type. This prevents ebtables rules > and tc from working correctly. > > Simon Then psnap should reset skb->protocol. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: SNAP headers, RFC1042
The main reason is bridging - the header format needs to be different for different ports. Ideally I'd like to see a single snap processor used in both cases (local receive & bridging). One problem with the current processor is the in the bridge the skb->protocol is set to 802_2_LLC, not to the real protocol type. This prevents ebtables rules and tc from working correctly. Simon -Original Message- From: Stephen Hemminger [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 1:19 PM To: Simon Barber Cc: netdev@vger.kernel.org; Jouni Malinen Subject: Re: SNAP headers, RFC1042 On Fri, 3 Feb 2006 13:08:17 -0800 "Simon Barber" <[EMAIL PROTECTED]> wrote: > Currently many wireless drivers handle SNAP->Ethernet header > processing > - this is an obvious candidate for factoring out - and might possibly > be something that should be moved out of the wireless code completely. > Would it make sense to add the code to eth_trans_type or create a > ieee80211_trans_type? > > Advantages: > 1) Better code reuse > 2) Frame data is no longer moved or touched unless bridging. > > Disadvantage: > 1) things like dhcpd need to understand SNAP header format (unless > frames going to a raw socket have the header re-written) > 2) bridge code needs to rewrite frames according to the output port's > needed header type > > Comments? Suggestions? > > Simon We already have a snap processor, so why not just do a netif_receive_skb on the frame. You need to select LLC in the kernel config with that driver. -- Stephen Hemminger <[EMAIL PROTECTED]> OSDL http://developer.osdl.org/~shemminger - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: SNAP headers, RFC1042
On Fri, 3 Feb 2006 13:08:17 -0800 "Simon Barber" <[EMAIL PROTECTED]> wrote: > Currently many wireless drivers handle SNAP->Ethernet header processing > - this is an obvious candidate for factoring out - and might possibly be > something that should be moved out of the wireless code completely. > Would it make sense to add the code to eth_trans_type or create a > ieee80211_trans_type? > > Advantages: > 1) Better code reuse > 2) Frame data is no longer moved or touched unless bridging. > > Disadvantage: > 1) things like dhcpd need to understand SNAP header format (unless > frames going to a raw socket have the header re-written) > 2) bridge code needs to rewrite frames according to the output port's > needed header type > > Comments? Suggestions? > > Simon We already have a snap processor, so why not just do a netif_receive_skb on the frame. You need to select LLC in the kernel config with that driver. -- Stephen Hemminger <[EMAIL PROTECTED]> OSDL http://developer.osdl.org/~shemminger - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Controlling the auto-route setting behaviour of the kernel [PATCH]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello! I implemented a patch to control the behaviour of the kernel when setting routes automatically while adding a new network address. You can select the types of routes you want to be set automatically. This enables the user - as an example - to set all routes in the local table automatically, but leave the main table untouched. (This is the special case I needed.) If you want you can disable it completly by writing. Any chance to be applied to the kernel? Regards ~ Sven - -- ~ Sven Anders <[EMAIL PROTECTED]> () Ascii Ribbon Campaign ~ /\ Support plain text e-mail ~ ANDURAS service solutions AG ~ Innstraße 71 - 94036 Passau - Germany ~ Web: www.anduras.de - Tel: +49 (0)851-4 90 50-0 - Fax: +49 (0)851-4 90 50-55 Rechtsform: Aktiengesellschaft - Sitz: Passau - Amtsgericht Passau HRB 6032 Mitglieder des Vorstands: Sven Anders, Marcus Junker, Michael Schön Vorsitzender des Aufsichtsrats: Dipl. Kfm. Thomas Träger -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD48ZN5lKZ7Feg4EcRArFcAJ40Op/3Lkmycjg3mq15QuS1TtUggQCfUN6X 7mu3mTXYBgLqkejLU6imdwg= =C5Ap -END PGP SIGNATURE- --- linux-2.6.15.1/include/linux/sysctl.h Sun Jan 15 07:16:02 2006 +++ linux-2.6.15.1/include/linux/sysctl.h.patched Tue Jan 31 21:43:58 2006 @@ -390,6 +390,7 @@ NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109, NET_TCP_CONG_CONTROL=110, NET_TCP_ABC=111, + NET_IPV4_AUTO_ROUTE_CREATE=112, }; enum { --- linux-2.6.15.1/net/ipv4/sysctl_net_ipv4.c Sun Jan 15 07:16:02 2006 +++ linux-2.6.15.1/net/ipv4/sysctl_net_ipv4.c.patched Tue Jan 31 21:53:14 2006 @@ -18,12 +18,15 @@ #include #include /* From af_inet.c */ extern int sysctl_ip_nonlocal_bind; +/* From fib_frontend.c */ +extern int sysctl_auto_route_create; + #ifdef CONFIG_SYSCTL static int tcp_retr1_max = 255; static int ip_local_port_range_min[] = { 1, 1 }; static int ip_local_port_range_max[] = { 65535, 65535 }; #endif @@ -646,12 +649,20 @@ .strategy = &sysctl_tcp_congestion_control, }, { .ctl_name = NET_TCP_ABC, .procname = "tcp_abc", .data = &sysctl_tcp_abc, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = NET_IPV4_AUTO_ROUTE_CREATE, + .procname = "ip_autoroute", + .data = &sysctl_auto_route_create, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_dointvec, }, { .ctl_name = 0 } --- linux-2.6.15.1/net/ipv4/fib_frontend.c Tue Jan 31 21:46:19 2006 +++ linux-2.6.15.1/net/ipv4/fib_frontend.c.patched Wed Feb 1 23:13:51 2006 @@ -47,6 +47,13 @@ #define FFprint(a...) printk(KERN_DEBUG a) +/* automatically create routes? */ +#define SYSCTL_AUTO_ROUTE_LOCAL 1 +#define SYSCTL_AUTO_ROUTE_BROADCAST 2 +#define SYSCTL_AUTO_ROUTE_UNICAST 4 +#define SYSCTL_AUTO_ROUTE_ALL 7 +int sysctl_auto_route_create = SYSCTL_AUTO_ROUTE_ALL; + #ifndef CONFIG_IP_MULTIPLE_TABLES #define RT_TABLE_MIN RT_TABLE_MAIN @@ -373,6 +380,14 @@ struct rtmsg rtm; } req; struct kern_rta rta; + + if (((type == RTN_LOCAL) && + !(sysctl_auto_route_create & SYSCTL_AUTO_ROUTE_LOCAL)) || + ((type == RTN_BROADCAST) && + !(sysctl_auto_route_create & SYSCTL_AUTO_ROUTE_BROADCAST)) || + ((type == RTN_UNICAST) && + !(sysctl_auto_route_create & SYSCTL_AUTO_ROUTE_UNICAST))) + return; memset(&req.rtm, 0, sizeof(req.rtm)); memset(&rta, 0, sizeof(rta)); --- linux-2.6.15.1/Documentation/networking/ip-sysctl.txt.orig Fri Feb 3 22:03:37 2006 +++ linux-2.6.15.1/Documentation/networking/ip-sysctl.txt Fri Feb 3 22:06:25 2006 @@ -27,6 +27,16 @@ The advertised MSS depends on the first hop route MTU, but will never be lower than this setting. +ip_autoroute - INTEGER + Control the behaviour of setting automatic routes (when adding an + ip address). Implemented as a bitmask. + + 1 = Add local routes (in local table) + 2 = Add broadcast routes (in local table) + 4 = Add unicast route (in main table) + + default 7 - Set all routes + IP Fragmentation: ipfrag_high_thresh - INTEGER begin:vcard fn:Sven Anders n:Anders;Sven org:ANDURAS AG;Research and Development adr;quoted-printable:;;Innstra=C3=9Fe 71;Passau;Bavaria;94036;Germany email;internet:[EMAIL PROTECTED] title:Dipl. Inf. tel;work:++49 (0)851 / 490 50 - 0 tel;fax:+49 (0)851 / 4 90 50 - 55 x-mozilla-html:FALSE url:http://www.anduras.de version:2.1 end:vcard
SNAP headers, RFC1042
Currently many wireless drivers handle SNAP->Ethernet header processing - this is an obvious candidate for factoring out - and might possibly be something that should be moved out of the wireless code completely. Would it make sense to add the code to eth_trans_type or create a ieee80211_trans_type? Advantages: 1) Better code reuse 2) Frame data is no longer moved or touched unless bridging. Disadvantage: 1) things like dhcpd need to understand SNAP header format (unless frames going to a raw socket have the header re-written) 2) bridge code needs to rewrite frames according to the output port's needed header type Comments? Suggestions? Simon - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[-mm patch] net/ipv4/fib_rules.c: make struct fib_rules static again
On Fri, Feb 03, 2006 at 12:07:04AM -0800, Andrew Morton wrote: >... > Changes since 2.6.15-mm4: >... > git-net.patch >... > Git trees >... struct fib_rules became global for no good reason. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- linux-2.6.16-rc1-mm5-full/net/ipv4/fib_rules.c.old 2006-02-03 16:12:48.0 +0100 +++ linux-2.6.16-rc1-mm5-full/net/ipv4/fib_rules.c 2006-02-03 16:13:00.0 +0100 @@ -100,7 +100,7 @@ .r_action = RTN_UNICAST, }; -struct hlist_head fib_rules; +static struct hlist_head fib_rules; /* writer func called from netlink -- rtnl_sem hold*/ - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [e2e] FW: Performance evaluation of high speed TCPs
Let's get off this e2e list for this discussion. It is really unnecessary to use this list for this discussion. I don't understand why you keep sending your email to this list even though we are seating next to each other in the same conference. Isn't this amusing or abusing of this mailing list? :-) -- to others in the list, Doug and I are attending pfldnet in japan now.. > Injong, > >>In fact, i contacted your student "Baruch" one month and half before we >> posted our > report -- it was CCed in the netdev mailing list as well and we gave him > login and > passwd on our result website (at that time we were just about to write the > report) > and we have not heard from your guys until just one week ago. At least we > did try to > make sure we are running a buggy version. > > We have no record of receiving such an email. Just a mix-up I guess. > > Doug > > >>>Seriously, we can't run the tests for every fix and bug report. >> >> Perhaps best to view it as returning a favour. You may recall that we >> re-ran all our own experimental tests last year (all data and code >> available online at www.hamilton.ie/net/eval/) on discovering a >> previously >> unreported bug introduced by the linux folks when implementing bic. >> Something similar has happened with importing htcp into linux. >> >> Seriously, where's the value in comparing buggy implementations - isn't >> that just a waste of all our time ? If we are genuine about wanting to >> understand tcp performance then I think we just have to take the hit >> from >> issues such as this that are outside all of our control. >> >> Doug >> >> Hamilton Institute >> www.hamilton.ie >> > > > > - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
Ravikiran G Thirumalai <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 02, 2006 at 07:16:00PM -0800, Andrew Morton wrote: > > Ravikiran G Thirumalai <[EMAIL PROTECTED]> wrote: > > > > > > On Fri, Jan 27, 2006 at 03:01:06PM -0800, Andrew Morton wrote: > > > Here's an implementation which delegates tuning of batching to the user. > > > We > > > don't really need local_t at all as percpu_counter_mod is not safe against > > > interrupts and softirqs as it is. If we have a counter which could be > > > modified in process context and irq/bh context, we just have to use a > > > wrapper like percpu_counter_mod_bh which will just disable and enable > > > bottom > > > halves. Reads on the counters are safe as they are atomic_reads, and the > > > cpu local variables are always accessed by that cpu only. > > > > > > (PS: the maxerr for ext2/ext3 is just guesstimate) > > > > Well that's the problem. We need to choose production-quality values for > > use in there. > > The guesstimate was loosely based on keeping the per-cpu batch at atleast 8 > on reasonably sized systems, while not letting maxerr grow too big. I guess > machines with cpu counts more than 128 don't use ext3 :). And if they do, > they can tune the counters with a higher maxerr. I guess it might be a bit > ugly on the user side with all the if num_possibl_cpus(), but is there a > better alternative? > > (I plan to test the counter values for ext2 and ext3 on a 16 way box, and > change these if they turn out to be not so good) OK, thanks. Frankly I think I went overboard on the scalability thing when adding percpu counters to ext2 and ext3. I suspect they're not providing significant benefit over per-sb-spinlock and a ulong. > > > > > Comments? > > > > Using num_possible_cpus() in that header file is just asking for build > > errors. Probably best to uninline the function rather than adding the > > needed include of cpumask.h. > > Yup, > > Here it is. > > Change the percpu_counter interface so that user can specify the maximum > tolerable deviation. OK, thanks. I need to sit down and a) remember why we're even discussing this and b) see what we've merged thus far and work out what it all does ;) - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please pull dscape-upsteam of bcm43xx driver
Please do a git pull git://bu3sch.de/wireless-2.6 dscape-upstream to pull latest bcm43xx updates into dscape-all: Michael Buesch: [bcm43xx] add DEBUG Kconfig option. Also fix indention. [bcm43xx] fix Kconfig "depends on" typo. [bcm43xx] Fix makefile. Remove all the "out-of-tree" stuff. [bcm43xx-d80211] Add more initvals sanity checks and error out, if one sanity check fails. [bcm43xx] Add more initvals sanity checks and error out, if one sanity check fails. [bcm43xx-d80211] [patch] basic ethtool support [bcm43xx-d80211] [patch] basic ethtool support (CONTINUED) [bcm43xx] Wireless Ext update: [bcm43xx-d80211] Add beacon template uploading code drivers/net/wireless/Kconfig | 19 ++ drivers/net/wireless/bcm43xx-d80211/Makefile | 87 +-- drivers/net/wireless/bcm43xx-d80211/bcm43xx.h | 41 + .../net/wireless/bcm43xx-d80211/bcm43xx_debugfs.c |8 + .../net/wireless/bcm43xx-d80211/bcm43xx_debugfs.h |6 - drivers/net/wireless/bcm43xx-d80211/bcm43xx_dma.c |8 + drivers/net/wireless/bcm43xx-d80211/bcm43xx_dma.h |4 - .../net/wireless/bcm43xx-d80211/bcm43xx_ethtool.c | 50 +++ .../net/wireless/bcm43xx-d80211/bcm43xx_ethtool.h |8 + drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c | 156 +++- drivers/net/wireless/bcm43xx-d80211/bcm43xx_phy.c |6 - 11 files changed, 196 insertions(+), 197 deletions(-) -- Greetings Michael. pgpExD3Eqjv3y.pgp Description: PGP signature
Please pull softmac-upsteam of bcm43xx driver
Please do a git pull git://bu3sch.de/wireless-2.6 softmac-upstream to pull latest bcm43xx updates into softmac-all: Michael Buesch: [bcm43xx] add DEBUG Kconfig option. Also fix indention. [bcm43xx] Fix makefile. Remove all the "out-of-tree" stuff. [bcm43xx] Add more initvals sanity checks and error out, if one sanity check fails. [bcm43xx] Remove function bcm43xx_channel_is_allowed(). Geographical restriction should become part of the 80211 stack, so every driver does not have to duplicate it. [bcm43xx] [patch] basic ethtool support [bcm43xx] Wireless Ext update: drivers/net/wireless/Kconfig | 19 +- drivers/net/wireless/bcm43xx/Makefile | 88 - drivers/net/wireless/bcm43xx/bcm43xx.h |6 - drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c |8 - drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c | 50 + drivers/net/wireless/bcm43xx/bcm43xx_ethtool.h |8 + drivers/net/wireless/bcm43xx/bcm43xx_main.c| 241 +--- drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 12 + 8 files changed, 144 insertions(+), 288 deletions(-) -- Greetings Michael. pgpmRtbWG5lJM.pgp Description: PGP signature
Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
On Thu, Feb 02, 2006 at 07:16:00PM -0800, Andrew Morton wrote: > Ravikiran G Thirumalai <[EMAIL PROTECTED]> wrote: > > > > On Fri, Jan 27, 2006 at 03:01:06PM -0800, Andrew Morton wrote: > > Here's an implementation which delegates tuning of batching to the user. We > > don't really need local_t at all as percpu_counter_mod is not safe against > > interrupts and softirqs as it is. If we have a counter which could be > > modified in process context and irq/bh context, we just have to use a > > wrapper like percpu_counter_mod_bh which will just disable and enable bottom > > halves. Reads on the counters are safe as they are atomic_reads, and the > > cpu local variables are always accessed by that cpu only. > > > > (PS: the maxerr for ext2/ext3 is just guesstimate) > > Well that's the problem. We need to choose production-quality values for > use in there. The guesstimate was loosely based on keeping the per-cpu batch at atleast 8 on reasonably sized systems, while not letting maxerr grow too big. I guess machines with cpu counts more than 128 don't use ext3 :). And if they do, they can tune the counters with a higher maxerr. I guess it might be a bit ugly on the user side with all the if num_possibl_cpus(), but is there a better alternative? (I plan to test the counter values for ext2 and ext3 on a 16 way box, and change these if they turn out to be not so good) > > > Comments? > > Using num_possible_cpus() in that header file is just asking for build > errors. Probably best to uninline the function rather than adding the > needed include of cpumask.h. Yup, Here it is. Change the percpu_counter interface so that user can specify the maximum tolerable deviation. Signed-off-by: Ravikiran Thirumalai <[EMAIL PROTECTED]> Index: linux-2.6.16-rc1mm4/include/linux/percpu_counter.h === --- linux-2.6.16-rc1mm4.orig/include/linux/percpu_counter.h 2006-02-02 11:18:54.0 -0800 +++ linux-2.6.16-rc1mm4/include/linux/percpu_counter.h 2006-02-03 11:04:05.0 -0800 @@ -16,24 +16,20 @@ struct percpu_counter { atomic_long_t count; + int percpu_batch; long *counters; }; -#if NR_CPUS >= 16 -#define FBC_BATCH (NR_CPUS*2) -#else -#define FBC_BATCH (NR_CPUS*4) -#endif - -static inline void percpu_counter_init(struct percpu_counter *fbc) -{ - atomic_long_set(&fbc->count, 0); - fbc->counters = alloc_percpu(long); -} +/* + * Choose maxerr carefully. maxerr/num_possible_cpus indicates per-cpu + * batching. Set maximum tolerance for better performance on large systems. + */ +void percpu_counter_init(struct percpu_counter *fbc, unsigned int maxerr); static inline void percpu_counter_destroy(struct percpu_counter *fbc) { - free_percpu(fbc->counters); + if (fbc->percpu_batch) + free_percpu(fbc->counters); } void percpu_counter_mod(struct percpu_counter *fbc, long amount); @@ -63,7 +59,8 @@ struct percpu_counter { long count; }; -static inline void percpu_counter_init(struct percpu_counter *fbc) +static inline void percpu_counter_init(struct percpu_counter *fbc, + unsigned int maxerr) { fbc->count = 0; } Index: linux-2.6.16-rc1mm4/mm/swap.c === --- linux-2.6.16-rc1mm4.orig/mm/swap.c 2006-01-29 20:20:20.0 -0800 +++ linux-2.6.16-rc1mm4/mm/swap.c 2006-02-03 11:02:05.0 -0800 @@ -468,15 +468,39 @@ static int cpu_swap_callback(struct noti #endif /* CONFIG_SMP */ #ifdef CONFIG_SMP + +/* + * Choose maxerr carefully. maxerr/num_possible_cpus indicates per-cpu + * batching. Set maximum tolerance for better performance on large systems. + */ +void percpu_counter_init(struct percpu_counter *fbc, unsigned int maxerr) +{ + atomic_long_set(&fbc->count, 0); + fbc->percpu_batch = maxerr/num_possible_cpus(); + if (fbc->percpu_batch) { + fbc->counters = alloc_percpu(long); + if (!fbc->counters) + fbc->percpu_batch = 0; + } + +} + void percpu_counter_mod(struct percpu_counter *fbc, long amount) { - long count; long *pcount; - int cpu = get_cpu(); + long count; + int cpu; + /* Slow mode */ + if (unlikely(!fbc->percpu_batch)) { + atomic_long_add(amount, &fbc->count); + return; + } + + cpu = get_cpu(); pcount = per_cpu_ptr(fbc->counters, cpu); count = *pcount + amount; - if (count >= FBC_BATCH || count <= -FBC_BATCH) { + if (count >= fbc->percpu_batch || count <= -fbc->percpu_batch) { atomic_long_add(count, &fbc->count); count = 0; } @@ -484,6 +508,7 @@ void percpu_counter_mod(struct percpu_co put_cpu(); } EXPORT_SYMBOL(percpu_counter_mod); +EXPORT_SYMBOL(percpu_counter_init)
Re: Linux 2.6.15.2
Holger Eitzenberger <[EMAIL PROTECTED]> wrote: > > On Mon, Jan 30, 2006 at 11:34:27PM -0800, Andrew Morton wrote: > > > - A skbuff_head_cache leak causes oom-killings. > > > > All of these only seem to affect a small minority of machines. > > Hi, > > I have searched for a description for the above mentioned bug report, > but havent found any. Can you tell me? http://www.mail-archive.com/netdev@vger.kernel.org/msg06355.html > The reason why I am asking that I am facing a similar problem on > kernel 2.6.10. During performance tests (Intel XEON, SMP, PCI-X, > e1000, 2 - 4 Gig RAM) the machine was out of memory. > > Tests showed that LowFree went linearly down to a few megabytes, where > most of the memory was used in skb_head_cache and size-1024 slab > caches. These two summed up to ~270 MG, which was the reason for > that. > > /proc/net/tcp showed that most of the memory was stuck in the RX > queues of some processes (two processes with ~1000 sockets each). > > A look into /proc/sys/net/ipv4/tcp_mem showed that that the values in > there were way to high. I hope that a reduction of these values will > help (not done yet). > Sounds different. Please test a more recent kernel and if the problem is still there, send a report to linux-kernel and cc [EMAIL PROTECTED] Include the contents of /proc/meminfo and /proc/slabinfo. Thanks. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] snap: needs hardware checksum fix
On Thu, 02 Feb 2006 22:24:27 -0800 (PST) "David S. Miller" <[EMAIL PROTECTED]> wrote: > From: Herbert Xu <[EMAIL PROTECTED]> > Date: Fri, 03 Feb 2006 12:26:32 +1100 > > > David S. Miller <[EMAIL PROTECTED]> wrote: > > > > > > This patch made me notice that the length is sort of implicit > > > or can be calculated given "start" and the current skb->data > > > value. > > > > > > Someone might want to look into making that simplification > > > at some point. > > > > Or we could simply merge skb_pull and skb_postpull_rcsum into one > > function that does both. > > True. There aren't that many skb_postpull_rcsum() call sites > at the moment so the changes should be quite easy. IMHO overloading CHECKSUM_HW with different semantics for transmit and receive was a bad idea. When packets are going through bridging, filtering, NAT, etc it can be really confusing. It really should be separate CHECKSUM_HWTX and CHECKSUM_HWRX, -- Stephen Hemminger <[EMAIL PROTECTED]> OSDL http://developer.osdl.org/~shemminger - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] snap: needs hardware checksum fix
On Thu, 02 Feb 2006 22:24:27 -0800 (PST) "David S. Miller" <[EMAIL PROTECTED]> wrote: > From: Herbert Xu <[EMAIL PROTECTED]> > Date: Fri, 03 Feb 2006 12:26:32 +1100 > > > David S. Miller <[EMAIL PROTECTED]> wrote: > > > > > > This patch made me notice that the length is sort of implicit > > > or can be calculated given "start" and the current skb->data > > > value. > > > > > > Someone might want to look into making that simplification > > > at some point. > > > > Or we could simply merge skb_pull and skb_postpull_rcsum into one > > function that does both. > > True. There aren't that many skb_postpull_rcsum() call sites > at the moment so the changes should be quite easy. static unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len) { if (unlikely(len > skb->len)) return NULL; if (skb->ip_summed == CHECKSUM_HW) skb->csum = csum_sub(skb->csum, csum_partial(skb->data, len, 0)); return __skb_pull(skb, len); } -- Stephen Hemminger <[EMAIL PROTECTED]> OSDL http://developer.osdl.org/~shemminger - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Bug in e1000 and kernel 2.4.32
Hi all, while doing some tests with our new switches i discovered that rebooting the switch sometimes causes a breakdown of the kernel on one of my test machines. The environment is: - nortel Baystack 5510-48T switch - network card: Intel Pro 1000 Desktop GT - kernel 2.4.32 (from www.kernel.org) - debian 3.1 After max of 3 reboots, the machine is frozen, showing the following message: kernel BUG at e1000_hw.c:5101! invalid operand: CPU:0 EIP:0010:[] Not tainted EFLAGS: 00010213 ... (please excuse me for not posting the complete message, as i only have a hardcopy as jpg of it. I will if it is necessary) I looked at line 5101 and it shows up as msec_delay(20); after googling around i noticed that there seem to be some problems with that function and that it was sometimes replaced by udelay. So i changed all occurences of msec_delay to udelay in the specific function (e1000_config_dsp_after_link_change), recompiled the module and everything works as expected. I know this is some kind of dirty hack, so please if someone else can look into it, would be great! attached is a patch that just changes msec_delay to udelay. regards, arne [EMAIL PROTECTED] www.uptime-isc.de Eiffestrasse 426 20537 Hamburg Telefon +49 40 254 137-00 Fax +49 40 254 137-22 e1000.patch Description: e1000.patch
Re: [Patch 7/7] IPSEC: Sync series - update selinux
On Fri, 3 Feb 2006, James Morris wrote: > On Fri, 3 Feb 2006, jamal wrote: > > > selinux updates. I also found a few from the past that were not updated. > > Acked-by: James Morris <[EMAIL PROTECTED]> Ack for all of these patches, btw. - James -- James Morris <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Patch 7/7] IPSEC: Sync series - update selinux
On Fri, 3 Feb 2006, jamal wrote: > selinux updates. I also found a few from the past that were not updated. Acked-by: James Morris <[EMAIL PROTECTED]> -- James Morris <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[Patch 7/7] IPSEC: Sync series - update selinux
selinux updates. I also found a few from the past that were not updated. cheers, jamal Add new netlink messages to selinux framework Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]> --- security/selinux/nlmsgtab.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/security/selinux/nlmsgtab.c b/security/selinux/nlmsgtab.c index 69b9329..85e3992 100644 --- a/security/selinux/nlmsgtab.c +++ b/security/selinux/nlmsgtab.c @@ -88,8 +88,15 @@ static struct nlmsg_perm nlmsg_xfrm_perm { XFRM_MSG_DELPOLICY, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, { XFRM_MSG_GETPOLICY, NETLINK_XFRM_SOCKET__NLMSG_READ }, { XFRM_MSG_ALLOCSPI,NETLINK_XFRM_SOCKET__NLMSG_WRITE }, + { XFRM_MSG_ACQUIRE, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, + { XFRM_MSG_EXPIRE, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, { XFRM_MSG_UPDPOLICY, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, { XFRM_MSG_UPDSA, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, + { XFRM_MSG_POLEXPIRE, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, + { XFRM_MSG_FLUSHSA, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, + { XFRM_MSG_FLUSHPOLICY, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, + { XFRM_MSG_NEWAE, NETLINK_XFRM_SOCKET__NLMSG_WRITE }, + { XFRM_MSG_GETAE, NETLINK_XFRM_SOCKET__NLMSG_READ }, }; static struct nlmsg_perm nlmsg_audit_perms[] =
[Patch 5/7] IPSEC: Sync series - SA expires
insertion of SA expires cheers, jamal This patch allows a user to insert SA expires. This is useful to do on an HA backup for the case of byte counts but may not be very useful for the case of time based expiry. Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]> --- include/net/xfrm.h|3 +++ net/xfrm/xfrm_state.c | 17 ++--- net/xfrm/xfrm_user.c | 30 ++ 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 7285642..8b5de1e 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -218,6 +218,9 @@ extern void km_state_notify(struct xfrm_ struct xfrm_tmpl; extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); +extern void km_state_expired(struct xfrm_state *x, int hard, u32 pid); +extern int __xfrm_state_delete(struct xfrm_state *x); + struct xfrm_state_afinfo { unsigned short family; rwlock_tlock; diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 4a7e185..d232d12 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -52,13 +52,13 @@ static DEFINE_SPINLOCK(xfrm_state_gc_loc static int xfrm_state_gc_flush_bundles; -static int __xfrm_state_delete(struct xfrm_state *x); +int __xfrm_state_delete(struct xfrm_state *x); static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family); static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); -static void km_state_expired(struct xfrm_state *x, int hard); +void km_state_expired(struct xfrm_state *x, int hard, u32 pid); static void xfrm_state_gc_destroy(struct xfrm_state *x) { @@ -157,7 +157,7 @@ static void xfrm_timer_handler(unsigned x->km.dying = warn; if (warn) - km_state_expired(x, 0); + km_state_expired(x, 0, 0); resched: if (next != LONG_MAX && !mod_timer(&x->timer, jiffies + make_jiffies(next))) @@ -172,7 +172,7 @@ expired: goto resched; } if (!__xfrm_state_delete(x) && x->id.spi) - km_state_expired(x, 1); + km_state_expired(x, 1, 0); out: spin_unlock(&x->lock); @@ -324,7 +324,7 @@ void __xfrm_state_destroy(struct xfrm_st } EXPORT_SYMBOL(__xfrm_state_destroy); -static int __xfrm_state_delete(struct xfrm_state *x) +int __xfrm_state_delete(struct xfrm_state *x) { int err = -ESRCH; @@ -363,6 +363,7 @@ static int __xfrm_state_delete(struct xf return err; } +EXPORT_SYMBOL(__xfrm_state_delete); int xfrm_state_delete(struct xfrm_state *x) { @@ -698,7 +699,7 @@ int xfrm_state_check_expire(struct xfrm_ (x->curlft.bytes >= x->lft.soft_byte_limit || x->curlft.packets >= x->lft.soft_packet_limit)) { x->km.dying = 1; - km_state_expired(x, 0); + km_state_expired(x, 0, 0); } return 0; } @@ -907,11 +908,12 @@ void km_state_notify(struct xfrm_state * EXPORT_SYMBOL(km_policy_notify); EXPORT_SYMBOL(km_state_notify); -void km_state_expired(struct xfrm_state *x, int hard) +void km_state_expired(struct xfrm_state *x, int hard, u32 pid) { struct km_event c; c.data.hard = hard; + c.pid = pid; c.event = XFRM_MSG_EXPIRE; km_state_notify(x, &c); @@ -919,6 +921,7 @@ void km_state_expired(struct xfrm_state wake_up(&km_waitq); } +EXPORT_SYMBOL(km_state_expired); /* * We send to all registered managers regardless of failure * We are happy with one success diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 801b976..1b8819d 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1232,6 +1232,34 @@ static int xfrm_flush_policy(struct sk_b return 0; } +static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) +{ + struct xfrm_state *x; + int err; + struct xfrm_user_expire *ue = NLMSG_DATA(nlh); + struct xfrm_usersa_info *p = &ue->state; + + x = xfrm_state_lookup(&p->id.daddr, p->id.spi, p->id.proto, p->family); + err = -ENOENT; + + if (x == NULL) + return err; + + err = -EINVAL; + + spin_lock_bh(&x->lock); + if (x->km.state != XFRM_STATE_VALID) + goto out; + km_state_expired(x, ue->hard, current->pid); + + if (ue->hard) + __xfrm_state_delete(x); +out: + spin_unlock_bh(&x->lock); + xfrm_state_put(x); + return err; +} + static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) { struct xfrm_policy *xp; @@ -1296,6 +1324,7 @@ static const int xfrm_msg_min[XFRM_NR_MS [XFRM_MSG_GETPOLICY - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_id), [XFRM_MSG_ALLOCSPI- XFRM_MSG_BASE] = XMSGS
[Patch 6/7] IPSEC: Sync series - policy expires
insertion of policy expires cheers, jamal This is similar to the SA expire insertion patch - only it inserts expires for SP. Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]> --- include/net/xfrm.h |2 +- net/xfrm/xfrm_policy.c |4 ++- net/xfrm/xfrm_state.c |3 ++- net/xfrm/xfrm_user.c | 56 +++- 4 files changed, 60 insertions(+), 5 deletions(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 8b5de1e..c57d8ae 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -954,7 +954,7 @@ extern void xfrm_init_pmtu(struct dst_en extern wait_queue_head_t km_waitq; extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport); -extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard); +extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid); extern void xfrm_input_init(void); extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq); diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 077bbf9..15862c2 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -204,7 +204,7 @@ static void xfrm_policy_timer(unsigned l } if (warn) - km_policy_expired(xp, dir, 0); + km_policy_expired(xp, dir, 0, 0); if (next != LONG_MAX && !mod_timer(&xp->timer, jiffies + make_jiffies(next))) xfrm_pol_hold(xp); @@ -217,7 +217,7 @@ out: expired: read_unlock(&xp->lock); if (!xfrm_policy_delete(xp, dir)) - km_policy_expired(xp, dir, 1); + km_policy_expired(xp, dir, 1, 0); xfrm_pol_put(xp); } diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index d232d12..cfeca17 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -959,11 +959,12 @@ int km_new_mapping(struct xfrm_state *x, } EXPORT_SYMBOL(km_new_mapping); -void km_policy_expired(struct xfrm_policy *pol, int dir, int hard) +void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid) { struct km_event c; c.data.hard = hard; + c.pid = pid; c.event = XFRM_MSG_POLEXPIRE; km_policy_notify(pol, dir, &c); diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 1b8819d..83be180 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1222,7 +1222,7 @@ out: static int xfrm_flush_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) { - struct km_event c; +struct km_event c; xfrm_policy_flush(); c.event = nlh->nlmsg_type; @@ -1232,6 +1232,58 @@ static int xfrm_flush_policy(struct sk_b return 0; } +static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) +{ + struct xfrm_policy *xp; + struct xfrm_user_polexpire *up = NLMSG_DATA(nlh); + struct xfrm_userpolicy_info *p = &up->pol; + int err = -ENOENT; + + if (p->index) + xp = xfrm_policy_byid(p->dir, p->index, 0); + else { + struct rtattr **rtattrs = (struct rtattr **)xfrma; + struct rtattr *rt = rtattrs[XFRMA_SEC_CTX-1]; + struct xfrm_policy tmp; + + err = verify_sec_ctx_len(rtattrs); + if (err) + return err; + + memset(&tmp, 0, sizeof(struct xfrm_policy)); + if (rt) { + struct xfrm_user_sec_ctx *uctx = RTA_DATA(rt); + + if ((err = security_xfrm_policy_alloc(&tmp, uctx))) + return err; + } + xp = xfrm_policy_bysel_ctx(p->dir, &p->sel, tmp.security, 0); + security_xfrm_policy_free(&tmp); + } + + if (xp == NULL) + return err; + read_lock(&xp->lock); + if (xp->dead) { + read_unlock(&xp->lock); + goto out; + } + + read_unlock(&xp->lock); + err = 0; + if (up->hard) { + xfrm_policy_delete(xp, p->dir); + } else { + // reset the timers here? + printk("Dont know what to do with soft policy expire\n"); + } + km_policy_expired(xp, p->dir, up->hard, current->pid); + +out: + xfrm_pol_put(xp); + return err; +} + static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) { struct xfrm_state *x; @@ -1327,6 +1379,7 @@ static const int xfrm_msg_min[XFRM_NR_MS [XFRM_MSG_EXPIRE - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_expire), [XFRM_MSG_UPDPOLICY - XFRM_MSG_BASE] = XMSGSIZE(xfrm_userpolicy_info), [XFRM_MSG_UPDSA - XFRM_MSG_BASE] = XMSGSIZE(xfrm_usersa_info), + [XFRM_MSG_POLEXPIRE - XFRM_MSG_BASE] = XMSGSIZE(xfrm_user_polexpire), [XFRM_MSG_FLUSHSA
[Patch 4/7] IPSEC: Sync series - acquire insert
insertion of acquires cheers, jamal This introduces a feature similar to the one described in RFC 2367: " ... the application needing an SA sends a PF_KEY SADB_ACQUIRE message down to the Key Engine, which then either returns an error or sends a similar SADB_ACQUIRE message up to one or more key management applications capable of creating such SAs. ... ... The third is where an application-layer consumer of security associations (e.g. an OSPFv2 or RIPv2 daemon) needs a security association. Send an SADB_ACQUIRE message from a user process to the kernel. The kernel returns an SADB_ACQUIRE message to registered sockets. The user-level consumer waits for an SADB_UPDATE or SADB_ADD message for its particular type, and then can use that association by using SADB_GET messages. " An app such as OSPF could then use ipsec KM to get keys Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]> --- include/net/xfrm.h|2 +- net/xfrm/xfrm_state.c |5 +++-- net/xfrm/xfrm_user.c | 54 + 3 files changed, 58 insertions(+), 3 deletions(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index def887b..7285642 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -214,10 +214,10 @@ extern int xfrm_policy_register_afinfo(s extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo); extern void km_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c); extern void km_state_notify(struct xfrm_state *x, struct km_event *c); - #define XFRM_ACQ_EXPIRES 30 struct xfrm_tmpl; +extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); struct xfrm_state_afinfo { unsigned short family; rwlock_tlock; diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 735e833..4a7e185 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -57,7 +57,7 @@ static int __xfrm_state_delete(struct xf static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family); static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); -static int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); +int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); static void km_state_expired(struct xfrm_state *x, int hard); static void xfrm_state_gc_destroy(struct xfrm_state *x) @@ -923,7 +923,7 @@ void km_state_expired(struct xfrm_state * We send to all registered managers regardless of failure * We are happy with one success */ -static int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol) +int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol) { int err = -EINVAL, acqret; struct xfrm_mgr *km; @@ -937,6 +937,7 @@ static int km_query(struct xfrm_state *x read_unlock(&xfrm_km_lock); return err; } +EXPORT_SYMBOL(km_query); int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport) { diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index e3221ef..801b976 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1232,6 +1232,58 @@ static int xfrm_flush_policy(struct sk_b return 0; } +static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) +{ + struct xfrm_policy *xp; + struct xfrm_user_tmpl *ut; + int i; + struct rtattr *rt = xfrma[XFRMA_TMPL-1]; + + struct xfrm_user_acquire *ua = NLMSG_DATA(nlh); + struct xfrm_state *x = xfrm_state_alloc(); + int err = -ENOMEM; + + if (!x) + return err; + + err = verify_newpolicy_info(&ua->policy); + if (err) { + printk("BAD policy passed\n"); + kfree(x); + return err; + } + + /* build an XP */ + xp = xfrm_policy_construct(&ua->policy, (struct rtattr **) xfrma, &err);if (!xp) { + kfree(x); + return err; + } + + memcpy(&x->id, &ua->id, sizeof(ua->id)); + memcpy(&x->props.saddr, &ua->saddr, sizeof(ua->saddr)); + memcpy(&x->sel, &ua->sel, sizeof(ua->sel)); + + ut = RTA_DATA(rt); + /* extract the templates and for each call km_key */ + for (i = 0; i < xp->xfrm_nr; i++, ut++) { + struct xfrm_tmpl *t = &xp->xfrm_vec[i]; + memcpy(&x->id, &t->id, sizeof(x->id)); + x->props.mode = t->mode; + x->props.reqid = t->reqid; + x->props.family = ut->family; + t->aalgos = ua->aalgos; + t->ealgos = ua->ealgos; + t->calgos = ua->calgos; + err = km_query(x, t, xp); + + } + + kfree(x); + kfree(xp); + + return 0; +} + #define XMSGSIZE(type) N
[Patch 2/7] IPSEC: Sync series - fast path
data path changes cheers, jamal Fast path sequence updates that will generate ipsec async events Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]> --- net/ipv4/ah4.c |1 + net/ipv4/esp4.c |1 + net/ipv6/ah6.c |1 + net/ipv6/esp6.c |1 + 4 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index aed537f..e16d8b4 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -97,6 +97,7 @@ static int ah_output(struct xfrm_state * ah->reserved = 0; ah->spi = x->id.spi; ah->seq_no = htonl(++x->replay.oseq); + xfrm_aevent_doreplay(x); ahp->icv(ahp, skb, ah->auth_data); top_iph->tos = iph->tos; diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 73bfcae..99b4d1e 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -97,6 +97,7 @@ static int esp_output(struct xfrm_state esph->spi = x->id.spi; esph->seq_no = htonl(++x->replay.oseq); + xfrm_aevent_doreplay(x); if (esp->conf.ivlen) crypto_cipher_set_iv(tfm, esp->conf.ivec, crypto_tfm_alg_ivsize(tfm)); diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index c7932cb..8ff7147 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -213,6 +213,7 @@ static int ah6_output(struct xfrm_state ah->reserved = 0; ah->spi = x->id.spi; ah->seq_no = htonl(++x->replay.oseq); + xfrm_aevent_doreplay(x); ahp->icv(ahp, skb, ah->auth_data); err = 0; diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 7b5b94f..aa7f100 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -94,6 +94,7 @@ static int esp6_output(struct xfrm_state esph->spi = x->id.spi; esph->seq_no = htonl(++x->replay.oseq); + xfrm_aevent_doreplay(x); if (esp->conf.ivlen) crypto_cipher_set_iv(tfm, esp->conf.ivec, crypto_tfm_alg_ivsize(tfm));
[Patch 0/7] IPSEC: Sync series
Finally got around to this and run all the tests i have. Looking good. The following series of patches aim at allowing one IPSEC node to synchronize state to another. The mechanisms provide ability to easily write apps such as OpenBSD's sasyncd[1]. The first three patches are derived from Krisztian KOVACS <[EMAIL PROTECTED]> Thanks for everyone who has provided comments thus far. If you have any more comments please shoot, else Dave this is for 2.6.17 tree. These patches depend on Patrick McHardy's patch to discover netlink listeners. cheers, jamal [1]http://www.openbsd.org/cgi-bin/man.cgi?query=sasyncd&sektion=8&apropos=0&manpath=OpenBSD+Current&arch=i386 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[Patch 3/7] IPSEC: Sync series - user
xfrm as a user. cheers, jamal Add xfrm as the user of the core changes Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]> --- net/key/af_key.c |2 net/xfrm/xfrm_user.c | 238 -- 2 files changed, 230 insertions(+), 10 deletions(-) diff --git a/net/key/af_key.c b/net/key/af_key.c index 43f1ce7..43a9ecb 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -2649,6 +2649,8 @@ static int pfkey_send_notify(struct xfrm return key_notify_sa(x, c); case XFRM_MSG_FLUSHSA: return key_notify_sa_flush(c); + case XFRM_MSG_NEWAE: /* not yet supported */ + break; default: printk("pfkey: Unknown SA event %d\n", c->event); break; diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 08b28e5..e3221ef 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -276,6 +276,56 @@ static void copy_from_user_state(struct x->props.flags = p->flags; } +/* + * someday when pfkey also has support, we could have the code + * somehow made shareable and move it to xfrm_state.c - JHS + * +*/ +static int xfrm_update_ae_params(struct xfrm_state *x, struct rtattr **xfrma) +{ + int err = - EINVAL; + struct rtattr *rp = xfrma[XFRMA_REPLAY_VAL-1]; + struct rtattr *lt = xfrma[XFRMA_LTIME_VAL-1]; + struct rtattr *et = xfrma[XFRMA_ETIMER_THRESH-1]; + struct rtattr *rt = xfrma[XFRMA_REPLAY_THRESH-1]; + + if (rp) { + struct xfrm_replay_state *replay; + if (RTA_PAYLOAD(rp) < sizeof(*replay)) + goto error; + replay = RTA_DATA(rp); + memcpy(&x->replay, replay, sizeof(*replay)); + memcpy(&x->preplay, replay, sizeof(*replay)); + } + + if (lt) { + struct xfrm_lifetime_cur *ltime; + if (RTA_PAYLOAD(lt) < sizeof(*ltime)) + goto error; + ltime = RTA_DATA(lt); + x->curlft.bytes = ltime->bytes; + x->curlft.packets = ltime->packets; + x->curlft.add_time = ltime->add_time; + x->curlft.use_time = ltime->use_time; + } + + if (et) { + if (RTA_PAYLOAD(et) < sizeof(u32)) + goto error; + x->replay_maxage = *(u32*)RTA_DATA(et); + } + + if (rt) { + if (RTA_PAYLOAD(rt) < sizeof(u32)) + goto error; + x->replay_maxdiff = *(u32*)RTA_DATA(rt); + } + + return 0; +error: + return err; +} + static struct xfrm_state *xfrm_state_construct(struct xfrm_usersa_info *p, struct rtattr **xfrma, int *errp) @@ -311,6 +361,18 @@ static struct xfrm_state *xfrm_state_con goto error; x->km.seq = p->seq; + x->replay_maxdiff = sysctl_xfrm_aevent_rseqth; + /* sysctl_xfrm_aevent_etime is in 100ms units */ + x->replay_maxage = (sysctl_xfrm_aevent_etime*HZ)/XFRM_AE_ETH_M; + x->preplay.bitmap = 0; + x->preplay.seq = x->replay.seq+x->replay_maxdiff; + x->preplay.oseq = x->replay.oseq +x->replay_maxdiff; + + /* override default values from above */ + + err = xfrm_update_ae_params(x, (struct rtattr **)xfrma); + if (err < 0) + goto error; return x; @@ -1025,6 +1087,139 @@ static int xfrm_flush_sa(struct sk_buff return 0; } + +static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, struct km_event *c) +{ + struct xfrm_aevent_id *id; + struct nlmsghdr *nlh; + struct xfrm_lifetime_cur ltime; + unsigned char *b = skb->tail; + + nlh = NLMSG_PUT(skb, c->pid, c->seq, XFRM_MSG_NEWAE, sizeof(*id)); + id = NLMSG_DATA(nlh); + nlh->nlmsg_flags = 0; + + id->sa_id.daddr = x->id.daddr; + id->sa_id.spi = x->id.spi; + id->sa_id.family = x->props.family; + id->sa_id.proto = x->id.proto; + id->flags = c->data.aevent; + + RTA_PUT(skb, XFRMA_REPLAY_VAL, sizeof(x->replay), &x->replay); + + ltime.bytes = x->curlft.bytes; + ltime.packets = x->curlft.packets; + ltime.add_time = x->curlft.add_time; + ltime.use_time = x->curlft.use_time; + + RTA_PUT(skb, XFRMA_LTIME_VAL, sizeof(struct xfrm_lifetime_cur),flags&XFRM_AE_RTHR) { + RTA_PUT(skb,XFRMA_REPLAY_THRESH,sizeof(u32),&x->replay_maxdiff); + } + + if (id->flags&XFRM_AE_ETHR) { + u32 etimer = x->replay_maxage*10/HZ; + RTA_PUT(skb,XFRMA_ETIMER_THRESH,sizeof(u32),&etimer); + } + + nlh->nlmsg_len = skb->tail - b; + return skb->len; + +rtattr_failure: +nlmsg_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +static int xfrm_get_ae(struct sk_buff *skb,
[Patch 1/7] IPSEC: Sync series - core changes
The core changes. cheers, jamal This patch provides the core functionality needed for sync events for ipsec. Derived work of Krisztian KOVACS <[EMAIL PROTECTED]> Signed-off-by: Jamal Hadi Salim <[EMAIL PROTECTED]> --- include/linux/sysctl.h |2 + include/linux/xfrm.h | 30 + include/net/xfrm.h | 44 + net/core/sysctl_net_core.c | 23 + net/xfrm/xfrm_state.c | 76 +++- net/xfrm/xfrm_user.c |4 ++ 6 files changed, 176 insertions(+), 3 deletions(-) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 840ad4f..846e86e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -258,6 +258,8 @@ enum NET_CORE_DEV_WEIGHT=17, NET_CORE_SOMAXCONN=18, NET_CORE_BUDGET=19, + NET_CORE_AEVENT_ETIME=20, + NET_CORE_AEVENT_RSEQTH=21, }; /* /proc/sys/net/ethernet */ diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 82fbb75..b54a129 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h @@ -156,6 +156,10 @@ enum { XFRM_MSG_FLUSHPOLICY, #define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY + XFRM_MSG_NEWAE, +#define XFRM_MSG_NEWAE XFRM_MSG_NEWAE + XFRM_MSG_GETAE, +#define XFRM_MSG_GETAE XFRM_MSG_GETAE __XFRM_MSG_MAX }; #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) @@ -194,6 +198,21 @@ struct xfrm_encap_tmpl { xfrm_address_t encap_oa; }; +/* AEVENT flags */ +enum xfrm_ae_ftype_t { + XFRM_AE_UNSPEC, + XFRM_AE_RTHR=1, /* replay threshold*/ + XFRM_AE_RVAL=2, /* replay value */ + XFRM_AE_LVAL=4, /* lifetime value */ + XFRM_AE_ETHR=8, /* expiry timer threshold */ + XFRM_AE_CR=16, /* Event cause is replay update */ + XFRM_AE_CE=32, /* Event cause is timer expiry */ + XFRM_AE_CU=64, /* Event cause is policy update */ + __XFRM_AE_MAX + +#define XFRM_AE_MAX (__XFRM_AE_MAX - 1) +}; + /* Netlink message attributes. */ enum xfrm_attr_type_t { XFRMA_UNSPEC, @@ -205,6 +224,10 @@ enum xfrm_attr_type_t { XFRMA_SA, XFRMA_POLICY, XFRMA_SEC_CTX, /* struct xfrm_sec_ctx */ + XFRMA_LTIME_VAL, + XFRMA_REPLAY_VAL, + XFRMA_REPLAY_THRESH, + XFRMA_ETIMER_THRESH, __XFRMA_MAX #define XFRMA_MAX (__XFRMA_MAX - 1) @@ -235,6 +258,11 @@ struct xfrm_usersa_id { __u8proto; }; +struct xfrm_aevent_id { + __u32 flags; + struct xfrm_usersa_id sa_id; +}; + struct xfrm_userspi_info { struct xfrm_usersa_info info; __u32 min; @@ -306,6 +334,8 @@ enum xfrm_nlgroups { #define XFRMNLGRP_SA XFRMNLGRP_SA XFRMNLGRP_POLICY, #define XFRMNLGRP_POLICY XFRMNLGRP_POLICY + XFRMNLGRP_AEVENTS, +#define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS __XFRMNLGRP_MAX }; #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d09ca0e..def887b 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -20,6 +20,10 @@ #define XFRM_ALIGN8(len) (((len) + 7) & ~7) +extern struct sock *xfrm_nl; +extern u32 sysctl_xfrm_aevent_etime; +extern u32 sysctl_xfrm_aevent_rseqth; + extern struct semaphore xfrm_cfg_sem; /* Organization of SPD aka "XFRM rules" @@ -135,6 +139,16 @@ struct xfrm_state /* State for replay detection */ struct xfrm_replay_state replay; + /* Replay detection state at the time we sent the last notification */ + struct xfrm_replay_state preplay; + + /* Replay detection notification settings */ + u32 replay_maxage; + u32 replay_maxdiff; + + /* Replay detection notification timer */ + struct timer_list rtimer; + /* Statistics */ struct xfrm_stats stats; @@ -169,6 +183,7 @@ struct km_event u32 hard; u32 proto; u32 byid; + u32 aevent; } data; u32 seq; @@ -306,7 +321,21 @@ struct xfrm_policy struct xfrm_tmplxfrm_vec[XFRM_MAX_DEPTH]; }; -#define XFRM_KM_TIMEOUT30 +#define XFRM_KM_TIMEOUT30 +/* which seqno */ +#define XFRM_REPLAY_SEQ1 +#define XFRM_REPLAY_OSEQ 2 +#define XFRM_REPLAY_SEQ_MASK 3 +/* what happened */ +#define XFRM_REPLAY_UPDATE XFRM_AE_CR +#define XFRM_REPLAY_TIMEOUTXFRM_AE_CE + +/* default aevent timeout in units of 100ms */ +#define XFRM_AE_ETIME 10 +/* Async Event timer multiplier */ +#define XFRM_AE_ETH_M 10 +/* default seq threshold size */ +#define XFRM_AE_SEQT_SIZE 2 struct xfrm_mgr { @@ -861,6 +890,7 @@ extern int xfrm_state_delete(struct xfrm extern void xfrm_state_flush(u8 proto); extern int xfrm_repl
Re: [Acx100-devel] [PATCH] acx: make firmware statistics parsing more intelligent
Hi, On Fri, Feb 03, 2006 at 03:28:29PM +0200, Denis Vlasenko wrote: > On Friday 03 February 2006 14:39, Denis Vlasenko wrote: > > Well, gcc obviously failed to realize that "% 16" == "& 15". > > I'll file a bug. > > -ENOTABUG. It's incorrect for signed integers, > and gcc uses idiv insn instead. ...which is one of the performance reasons why it may be a good idea to use unsigned ints wherever signedness isn't required (unsigned int is said to be faster sometimes, on many platforms). Andreas Mohr - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Acx100-devel] [PATCH] acx: make firmware statistics parsing more intelligent
On Friday 03 February 2006 14:39, Denis Vlasenko wrote: > Well, gcc obviously failed to realize that "% 16" == "& 15". > I'll file a bug. -ENOTABUG. It's incorrect for signed integers, and gcc uses idiv insn instead. -- vda - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Acx100-devel] [PATCH] acx: make firmware statistics parsing more intelligent
On Friday 03 February 2006 12:58, Andreas Mohr wrote: > - adev->tx_head = (head + 1) % TX_CNT; > + /* slower: adev->tx_head = (head + 1) % TX_CNT; */ > + adev->tx_head = head + 1; > + if (adev->tx_head >= TX_CNT) > + adev->tx_head = 0; struct a { int tx_head; }; #define TX_CNT 16 void f(struct a *adev, int head) { adev->tx_head = (head + 1) % TX_CNT; } void g(struct a *adev, int head) { adev->tx_head = head + 1; if (adev->tx_head >= TX_CNT) adev->tx_head = 0; } gcc -Os -S t.c -fomit-frame-pointer -falign-functions=1 -falign-labels=1 -falign-loops=1 -falign-jumps=1 -mtune=i386 -march=i386 produces: f: movl8(%esp), %eax incl%eax movl$16, %edx movl%edx, %ecx cltd idivl %ecx movl4(%esp), %eax movl%edx, (%eax) ret .size f, .-f .globl g .type g, @function g: movl4(%esp), %edx movl8(%esp), %eax incl%eax movl%eax, (%edx) cmpl$15, %eax jle .L6 movl$0, (%edx) .L6: ret .size g, .-g .ident "GCC: (GNU) 4.0.0" Well, gcc obviously failed to realize that "% 16" == "& 15". I'll file a bug. Meanwhile, with & 15 f() is better: f: movl8(%esp), %eax incl%eax andl$15, %eax movl4(%esp), %edx movl%eax, (%edx) ret .size f, .-f .globl g .type g, @function g: movl4(%esp), %edx movl8(%esp), %eax incl%eax movl%eax, (%edx) cmpl$15, %eax jle .L6 movl$0, (%edx) .L6: ret .size g, .-g .ident "GCC: (GNU) 4.0.0" -- vda - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] acx: make firmware statistics parsing more intelligent
Hi all, this patch does: - implement much more flexible firmware statistics parsing (for /proc/driver/acx_wlanX_diag) This has the nice effect that we now get output for both the older TNETW1100 USB and TNETW1450. Since firmware statistics information has non-stable layout depending on firmware version, please report if you suspect any parsing mismatch! This improved version now uses 2kB more driver space, unfortunately. - use "% 8" modulo instead of more complicated "% 5" calculation - use if (++idx >= count) idx = 0; instead of more bloaty idx = (idx + 1) % count; We might want to add a kernel macro for this *very* common and performance-critical driver operation, say ring_advance_next or so, in order to have the most optimized version for each architecture; Or ($1 million question): Is there already such a beast somewhere!? - tiny cleanup Andreas Mohr diff -urN acx-20060202/acx_func.h acx-20060202_stats/acx_func.h --- acx-20060202/acx_func.h 2006-02-01 10:49:31.0 +0100 +++ acx-20060202_stats/acx_func.h 2006-02-05 06:21:35.0 +0100 @@ -257,7 +257,7 @@ ** but may be run under lock ** ** A small number of local helpers do not have acx_[eisl]_ prefix. -** They are always close to caller and are to be revieved locally. +** They are always close to caller and are to be reviewed locally. ** ** Theory of operation: ** diff -urN acx-20060202/acx_struct.h acx-20060202_stats/acx_struct.h --- acx-20060202/acx_struct.h 2006-02-01 10:49:38.0 +0100 +++ acx-20060202_stats/acx_struct.h 2006-02-03 23:21:35.0 +0100 @@ -582,21 +582,34 @@ /*--- Firmware statistics */ -typedef struct fw_stats { - u32 val0x0 ACX_PACKED; /* hdr; */ + +/* define a random 100 bytes more to catch firmware versions which + * provide a bigger struct */ +#define FW_STATS_FUTURE_EXTENSION 100 + +typedef struct fw_stats_tx { u32 tx_desc_of ACX_PACKED; +} fw_stats_tx_t; + +typedef struct fw_stats_rx { u32 rx_oom ACX_PACKED; u32 rx_hdr_of ACX_PACKED; - u32 rx_hdr_use_next ACX_PACKED; + u32 rx_hw_stuck ACX_PACKED; /* old: u32 rx_hdr_use_next */ u32 rx_dropped_frame ACX_PACKED; u32 rx_frame_ptr_err ACX_PACKED; u32 rx_xfr_hint_trig ACX_PACKED; + u32 rx_aci_events ACX_PACKED; /* later versions only */ + u32 rx_aci_resets ACX_PACKED; /* later versions only */ +} fw_stats_rx_t; +typedef struct fw_stats_dma { u32 rx_dma_req ACX_PACKED; u32 rx_dma_err ACX_PACKED; u32 tx_dma_req ACX_PACKED; u32 tx_dma_err ACX_PACKED; +} fw_stats_dma_t; +typedef struct fw_stats_irq { u32 cmd_cplt ACX_PACKED; u32 fiq ACX_PACKED; u32 rx_hdrs ACX_PACKED; @@ -604,23 +617,78 @@ u32 rx_mem_of ACX_PACKED; u32 rx_rdys ACX_PACKED; u32 irqs ACX_PACKED; - u32 acx_trans_procs ACX_PACKED; + u32 tx_procs ACX_PACKED; u32 decrypt_done ACX_PACKED; u32 dma_0_done ACX_PACKED; u32 dma_1_done ACX_PACKED; u32 tx_exch_complet ACX_PACKED; u32 commands ACX_PACKED; - u32 acx_rx_procs ACX_PACKED; + u32 rx_procs ACX_PACKED; u32 hw_pm_mode_changes ACX_PACKED; u32 host_acks ACX_PACKED; u32 pci_pm ACX_PACKED; u32 acm_wakeups ACX_PACKED; +} fw_stats_irq_t; +typedef struct fw_stats_wep { u32 wep_key_count ACX_PACKED; u32 wep_default_key_count ACX_PACKED; u32 dot11_def_key_mib ACX_PACKED; u32 wep_key_not_found ACX_PACKED; u32 wep_decrypt_fail ACX_PACKED; + u32 wep_pkt_decrypt ACX_PACKED; + u32 wep_decrypt_irqs ACX_PACKED; +} fw_stats_wep_t; + +typedef struct fw_stats_pwr { + u32 tx_start_ctr ACX_PACKED; + u32 no_ps_tx_too_short ACX_PACKED; + u32 rx_start_ctr ACX_PACKED; + u32 no_ps_rx_too_short ACX_PACKED; + u32 lppd_started ACX_PACKED; + u32 no_lppd_too_noisy ACX_PACKED; + u32 no_lppd_too_short ACX_PACKED; + u32 no_lppd_matching_frame ACX_PACKED; +} fw_stats_pwr_t; + +typedef struct fw_stats_mic { + u32 mic_rx_pkts ACX_PACKED; + u32 mic_calc_fail ACX_PACKED; +} fw_stats_mic_t; + +typedef struct fw_stats_aes { + u32 aes_enc_fail ACX_PACKED; + u32 aes_dec_fail ACX_PACKED; + u32 aes_enc_pkts ACX_PACKED; + u32 aes_dec_pkts ACX_PACKED; + u32 aes_enc_irq ACX_PACKED; + u32 aes_dec_irq ACX_PACKED; +} fw_stats_aes_t; + +typedef struct fw_stats_event { + u32 heartbeat ACX_PACKED; + u32 calibration ACX_PACKED; + u32 rx_mismatch ACX_PACKED; + u32 rx_mem_empty ACX_PACKED; + u32 rx_pool ACX_PACKED; + u32 oom_late ACX_
Re: sky2 rx error (was: Re: sky2 freezes the system)
On Tue, Jan 31, 2006 at 01:45:18PM -0800, Stephen Hemminger wrote: > The driver doesn't handle overlength packets properly. > Someone maybe sending you jumbo frames or some other crap. > > The vendor driver doesn't handle over size frames either; > it just resets itself every 5 seconds so you don't notice. Indeed, I just set the MTU to 4000 on the interface with problems and the hangs went away (it's connected to a switch monitor port so doesn't really matter what the MTU is, if it's oversized I definately want to see what it was :-) ). - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Van Jacobson net channels
On Fri, 2006-02-03 at 18:48, Andi Kleen wrote: > On Friday 03 February 2006 02:07, Greg Banks wrote: > > > > (Don't ask for code - it's not really in an usable state) > > > > Sure. I'm looking forward to it. > > I had actually shelved the idea because of TSO. But if you can get me > some data from your NFS servers that shows TSO is not enough > for them that might change the picture. We should be doing some NFS+TSO testing on SLES10 beta in the next few weeks, time permitting. I'll let you know how it goes. Greg. -- Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Van Jacobson net channels
On Friday 03 February 2006 02:07, Greg Banks wrote: > > (Don't ask for code - it's not really in an usable state) > > Sure. I'm looking forward to it. I had actually shelved the idea because of TSO. But if you can get me some data from your NFS servers that shows TSO is not enough for them that might change the picture. -Andi - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html