netdev@vger.kernel.org

2006-11-27 Thread Auke Kok

Willy Tarreau wrote:

Hi Auke,

On Mon, Nov 27, 2006 at 09:31:34AM -0800, Auke Kok wrote:

Willy Tarreau wrote:

Hi guys,

I'm about to apply this fix to 2.4. 2.6 is not affected.
Do you have any objection ?

Willy,

you didn't CC netdev. linux-net is a users list, you didn't CC the 
maintainers of the driver. Please do this. We're more than happy to help, 
even for 2.4 kernels.


I'm really sorry, as I usually use netdev and not linux-net. I don't know
why I used this one in the first step. There might have been some fog
inside my head.

BTW, there's no clear maintainer identified for e100. At best I can find
"[EMAIL PROTECTED]" in the file, without any freshness info. Is that
still OK or do you want to update the MAINTAINERS file ?


I'll post a patch for it, it's definately out of date :(

Auke

-
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] [IPVS] use msleep_interruptable() instead of ssleep() aka msleep()

2006-11-27 Thread Horms
Dean Manners notices that when an IPVS synchonisation daemons are
started the system load slowly climbs up to 1. This seems to be related
to the call to ssleep(1) (aka msleep(1000) in the main loop. Replacing
this with a call to msleep_interruptable() seems to make the problem go
away. Though I'm not sure that it is correct.

Cc: Dean Manners <[EMAIL PROTECTED]>
Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>

Index: linux-2.6/net/ipv4/ipvs/ip_vs_sync.c
===
--- linux-2.6.orig/net/ipv4/ipvs/ip_vs_sync.c   2006-11-10 15:33:42.0 
+0900
+++ linux-2.6/net/ipv4/ipvs/ip_vs_sync.c2006-11-10 15:33:52.0 
+0900
@@ -657,7 +657,7 @@
if (stop_master_sync)
break;
 
-   ssleep(1);
+   msleep_interruptible(1000);
}
 
/* clean up the sync_buff queue */
-
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][NET_SCHED] sch_htb: turn intermediate classes into leaves

2006-11-27 Thread Jarek Poplawski
[NET_SCHED] sch_htb:

[PATCH 2.6.19-rc6 with "Fix endless loops" set of patches]

- turn intermediate classes into leaves again when their
  last child is deleted (struct htb_class changed)


Signed-off-by: Jarek Poplawski <[EMAIL PROTECTED]>
---

diff -Nurp linux-2.6.19-rc6-endless-/net/sched/sch_htb.c 
linux-2.6.19-rc6-endless/net/sched/sch_htb.c
--- linux-2.6.19-rc6-endless-/net/sched/sch_htb.c   2006-11-27 
18:40:30.0 +0100
+++ linux-2.6.19-rc6-endless/net/sched/sch_htb.c2006-11-27 
20:27:52.0 +0100
@@ -147,6 +147,10 @@ struct htb_class {
psched_tdiff_t mbuffer; /* max wait time */
long tokens, ctokens;   /* current number of tokens */
psched_time_t t_c;  /* checkpoint time */
+   
+   int prio;   /* For parent to leaf return possible here */
+   int quantum;/* we do backup. Finally full replacement  */
+   /* of un.leaf originals should be done. */
 };
 
 /* TODO: maybe compute rate when size is too large .. or drop ? */
@@ -1271,6 +1275,38 @@ static void htb_destroy_filters(struct t
}
 }
 
+static inline int htb_parent_last_child(struct htb_class *cl)
+{
+   if (!cl->parent)
+   /* the root class */
+   return 0;
+
+   if (!(cl->parent->children.next == &cl->sibling &&
+   cl->parent->children.prev == &cl->sibling))
+   /* not the last child */
+   return 0;   
+
+   return 1;
+}
+
+static void htb_parent_to_leaf(struct htb_class *cl, struct Qdisc *new_q)
+{
+   struct htb_class *parent = cl->parent;
+
+   BUG_TRAP(!cl->level && cl->un.leaf.q && !cl->prio_activity);
+
+   parent->level = 0;
+   memset(&parent->un.inner, 0, sizeof(parent->un.inner));
+   INIT_LIST_HEAD(&parent->un.leaf.drop_list);
+   parent->un.leaf.q = new_q ? new_q : &noop_qdisc;
+   parent->un.leaf.quantum = parent->quantum;
+   parent->un.leaf.prio = parent->prio;
+   parent->tokens = parent->buffer;
+   parent->ctokens = parent->cbuffer;
+   PSCHED_GET_TIME(parent->t_c);
+   parent->cmode = HTB_CAN_SEND;
+}
+
 static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
 {
struct htb_sched *q = qdisc_priv(sch);
@@ -1328,6 +1364,8 @@ static int htb_delete(struct Qdisc *sch,
struct htb_sched *q = qdisc_priv(sch);
struct htb_class *cl = (struct htb_class *)arg;
unsigned int qlen;
+   struct Qdisc *new_q = NULL;
+   int last_child = 0;
 
// TODO: why don't allow to delete subtree ? references ? does
// tc subsys quarantee us that in htb_destroy it holds no class
@@ -1335,6 +1373,12 @@ static int htb_delete(struct Qdisc *sch,
if (!list_empty(&cl->children) || cl->filter_cnt)
return -EBUSY;
 
+   if (!cl->level && htb_parent_last_child(cl)) {
+   new_q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops,
+   cl->parent->classid);
+   last_child = 1;
+   }
+
sch_tree_lock(sch);
 
/* delete from hash and active; remainder in destroy_class */
@@ -1349,6 +1393,9 @@ static int htb_delete(struct Qdisc *sch,
if (cl->prio_activity)
htb_deactivate(q, cl);
 
+   if (last_child)
+   htb_parent_to_leaf(cl, new_q);
+   
if (--cl->refcnt == 0)
htb_destroy_class(sch, cl);
 
@@ -1483,6 +1530,10 @@ static int htb_change_class(struct Qdisc
cl->un.leaf.quantum = hopt->quantum;
if ((cl->un.leaf.prio = hopt->prio) >= TC_HTB_NUMPRIO)
cl->un.leaf.prio = TC_HTB_NUMPRIO - 1;
+
+   /* backup for htb_parent_to_leaf */
+   cl->quantum = cl->un.leaf.quantum;
+   cl->prio = cl->un.leaf.prio;
}
 
cl->buffer = hopt->buffer;
-
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][NET_SCHED] sch_cbq: deactivating when grafting, purging etc.

2006-11-27 Thread Jarek Poplawski
[NET_SCHED] sch_cbq:

[PATCH 2.6.19-rc6 with "Fix endless loops" set of patches]

- P. McHardy's "Fix endless loops" patch supplement
  (cbq_graft, cbq_qlen_notify, cbq_delete, cbq_class_ops)

- deactivating of active classes when q.qlen drops to zero
  (cbq_drop)

- a redundant instruction removed from cbq_deactivate_class

PS: probably htb_deactivate in htb_delete and
cbq_deactivate_class in cbq_delete are also
redundant now.

Signed-off-by: Jarek Poplawski <[EMAIL PROTECTED]>
---

diff -Nurp linux-2.6.19-rc6-endless-/net/sched/sch_cbq.c 
linux-2.6.19-rc6-endless/net/sched/sch_cbq.c
--- linux-2.6.19-rc6-endless-/net/sched/sch_cbq.c   2006-11-27 
18:40:16.0 +0100
+++ linux-2.6.19-rc6-endless/net/sched/sch_cbq.c2006-11-27 
20:31:46.0 +0100
@@ -371,8 +371,6 @@ static void cbq_deactivate_class(struct 
return;
}
}
-
-   cl = cl_prev->next_alive;
return;
}
} while ((cl_prev = cl) != q->active[prio]);
@@ -1258,6 +1256,8 @@ static unsigned int cbq_drop(struct Qdis
do {
if (cl->q->ops->drop && (len = 
cl->q->ops->drop(cl->q))) {
sch->q.qlen--;
+   if (!cl->q->q.qlen)
+   cbq_deactivate_class(cl);
return len;
}
} while ((cl = cl->next_alive) != cl_head);
@@ -1685,8 +1685,7 @@ static int cbq_graft(struct Qdisc *sch, 
 #endif
}
sch_tree_lock(sch);
-   *old = cl->q;
-   cl->q = new;
+   *old = xchg(&cl->q, new);
qdisc_tree_decrease_qlen(*old, (*old)->q.qlen);
qdisc_reset(*old);
sch_tree_unlock(sch);
@@ -1704,6 +1703,14 @@ cbq_leaf(struct Qdisc *sch, unsigned lon
return cl ? cl->q : NULL;
 }
 
+static void cbq_qlen_notify(struct Qdisc *sch, unsigned long arg)
+{
+   struct cbq_class *cl = (struct cbq_class *)arg;
+
+   if (cl->q->q.qlen == 0)
+   cbq_deactivate_class(cl);
+}
+
 static unsigned long cbq_get(struct Qdisc *sch, u32 classid)
 {
struct cbq_sched_data *q = qdisc_priv(sch);
@@ -1988,12 +1995,17 @@ static int cbq_delete(struct Qdisc *sch,
 {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *cl = (struct cbq_class*)arg;
+   unsigned int qlen;
 
if (cl->filters || cl->children || cl == &q->link)
return -EBUSY;
 
sch_tree_lock(sch);
 
+   qlen = cl->q->q.qlen;
+   qdisc_reset(cl->q);
+   qdisc_tree_decrease_qlen(cl->q, qlen);
+
if (cl->next_alive)
cbq_deactivate_class(cl);
 
@@ -2084,6 +2096,7 @@ static void cbq_walk(struct Qdisc *sch, 
 static struct Qdisc_class_ops cbq_class_ops = {
.graft  =   cbq_graft,
.leaf   =   cbq_leaf,
+   .qlen_notify=   cbq_qlen_notify,
.get=   cbq_get,
.put=   cbq_put,
.change =   cbq_change_class,
-
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 1/1] [INET]: Change protocol field in struct inet_protosw to u16

2006-11-27 Thread David Miller
From: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
Date: Tue, 28 Nov 2006 03:14:11 -0200

> Hi David,
> 
>   Last one tonight, please consider pulling from:
> 
> master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.20.git

Pulled, thanks a lot!
-
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 1/1] [INET]: Change protocol field in struct inet_protosw to u16

2006-11-27 Thread Arnaldo Carvalho de Melo
Hi David,

Last one tonight, please consider pulling from:

master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.20.git

- Arnaldo

[EMAIL PROTECTED] net-2.6.20]$ pahole /tmp/tcp_ipv6.o inet_protosw
/* /pub/scm/linux/kernel/git/acme/net-2.6.20/include/net/protocol.h:69 */
struct inet_protosw {
struct list_head   list; /* 0 8 */
short unsigned int type; /* 8 2 */

/* XXX 2 bytes hole, try to pack */

intprotocol; /*12 4 */
struct proto * prot; /*16 4 */
const struct proto_ops  *  ops;  /*20 4 */
intcapability;   /*24 4 */
char   no_check; /*28 1 */
unsigned char  flags;/*29 1 */
}; /* size: 32, sum members: 28, holes: 1, sum holes: 2, padding: 2 */

So that we can kill that hole, protocol can only go all the way to 255 (RAW).

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
---
 include/net/protocol.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/net/protocol.h b/include/net/protocol.h
index 28c4cac..105bf12 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -71,7 +71,7 @@ struct inet_protosw {
 
 /* These two fields form the lookup key.  */
unsigned short   type; /* This is the 2nd argument to socket(2). */
-   int  protocol; /* This is the L4 protocol number.  */
+   unsigned short   protocol; /* This is the L4 protocol number.  */
 
struct proto *prot;
const struct proto_ops *ops;
-- 
1.4.2.1.g3d5c

-
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 1/1] add auditing to ipsec

2006-11-27 Thread James Morris
On Mon, 27 Nov 2006, Joy Latten wrote:

> This patch adds auditing to ipsec in 
> support of labeled ipsec. 
> An audit message occurs when an ipsec SA
> or ipsec policy is created/deleted.
> 
> Patch was built against linux kernel 2.6.19-rc6.
> Please let me know if this is acceptable. 

Looks ok to me.


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


Re: [2.6 patch] kill net/rxrpc/rxrpc_syms.c

2006-11-27 Thread Arnaldo Carvalho de Melo

On 11/28/06, Andrew Morton <[EMAIL PROTECTED]> wrote:

On Mon, 27 Nov 2006 11:21:25 +
David Howells <[EMAIL PROTECTED]> wrote:

> Adrian Bunk <[EMAIL PROTECTED]> wrote:
>
> > This patch moves the EXPORT_SYMBOL's from net/rxrpc/rxrpc_syms.c to the
> > files with the actual functions.
>
> You can if you like.  Can you slap a blank line before each EXPORT_SYMBOL()
> though please?

We have a mixture of both styles and given that they waste space in return
for no added value, people have been gradually removing these blank lines
in many places.  Please don't add more.


Agreed, good thing would be if we could have something like

void foo(int bar) gpl_exported
{
}

I.e. some kind of __attribute__, nah, I should just get some sleep :-)

- Arnaldo
-
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: [PATCHES 0/2][TCP]: pack tcp_sock

2006-11-27 Thread David Miller
From: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
Date: Tue, 28 Nov 2006 01:15:46 -0200

>   Please consider pulling from:
> 
> master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.20.git

Looks great, pulled and pushed out, thanks Arnaldo.
-
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: [2.6 patch] kill net/rxrpc/rxrpc_syms.c

2006-11-27 Thread Andrew Morton
On Mon, 27 Nov 2006 11:21:25 +
David Howells <[EMAIL PROTECTED]> wrote:

> Adrian Bunk <[EMAIL PROTECTED]> wrote:
> 
> > This patch moves the EXPORT_SYMBOL's from net/rxrpc/rxrpc_syms.c to the 
> > files with the actual functions.
> 
> You can if you like.  Can you slap a blank line before each EXPORT_SYMBOL()
> though please?

We have a mixture of both styles and given that they waste space in return
for no added value, people have been gradually removing these blank lines
in many places.  Please don't add more.

-
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 0/7][IP] IProute2 ip command updates

2006-11-27 Thread Masahide NAKAMURA

Stephen Hemminger wrote:

Plan is to put out new iproute2 release after 2.6.19 final


OK.

As you know, netlink related interface is changed at 2.6.19.
I have another patches for iproute2 (libnetlink fix and Mobile
IPv6 support). Those are depends on 2.6.19 headers.

So this time I'd like to know when to update your tree's kernel headers, too.
To use this chance to test with your tree, can I send my patches with the
header update to 2.6.19-rcX in advance (updating headers by you is also fine
with me), or just wait till 2.6.19 final release is done?

Regards,

--
Masahide NAKAMURA
-
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 2/2] [TCP]: Renove the __ prefix on the struct tcp_sock members

2006-11-27 Thread Arnaldo Carvalho de Melo
As this struct is not userland visible at all.

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
---
 include/linux/tcp.h |  156 ++-
 1 files changed, 78 insertions(+), 78 deletions(-)

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index b42ff0e..3cc70d1 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -185,17 +185,17 @@ struct tcp_sack_block_wire {
 };
 
 struct tcp_sack_block {
-   __u32   start_seq;
-   __u32   end_seq;
+   u32 start_seq;
+   u32 end_seq;
 };
 
 struct tcp_options_received {
 /* PAWS/RTTM data  */
longts_recent_stamp;/* Time we stored ts_recent (for aging) */
-   __u32   ts_recent;  /* Time stamp to echo next  */
-   __u32   rcv_tsval;  /* Time stamp value */
-   __u32   rcv_tsecr;  /* Time stamp echo reply*/
-   __u16   saw_tstamp : 1, /* Saw TIMESTAMP on last packet */
+   u32 ts_recent;  /* Time stamp to echo next  */
+   u32 rcv_tsval;  /* Time stamp value */
+   u32 rcv_tsecr;  /* Time stamp echo reply*/
+   u16 saw_tstamp : 1, /* Saw TIMESTAMP on last packet */
tstamp_ok : 1,  /* TIMESTAMP seen on SYN packet */
dsack : 1,  /* D-SACK is scheduled  */
wscale_ok : 1,  /* Wscale seen on SYN packet*/
@@ -203,10 +203,10 @@ struct tcp_options_received {
snd_wscale : 4, /* Window scaling received from sender  */
rcv_wscale : 4; /* Window scaling to send to receiver   */
 /* SACKs data  */
-   __u8eff_sacks;  /* Size of SACK array to send with next packet 
*/
-   __u8num_sacks;  /* Number of SACK blocks*/
-   __u16   user_mss;   /* mss requested by user in ioctl */
-   __u16   mss_clamp;  /* Maximal mss, negotiated at connection setup 
*/
+   u8  eff_sacks;  /* Size of SACK array to send with next packet 
*/
+   u8  num_sacks;  /* Number of SACK blocks*/
+   u16 user_mss;   /* mss requested by user in ioctl */
+   u16 mss_clamp;  /* Maximal mss, negotiated at connection setup 
*/
 };
 
 struct tcp_request_sock {
@@ -215,8 +215,8 @@ #ifdef CONFIG_TCP_MD5SIG
/* Only used by TCP MD5 Signature so far. */
struct tcp_request_sock_ops *af_specific;
 #endif
-   __u32   rcv_isn;
-   __u32   snt_isn;
+   u32 rcv_isn;
+   u32 snt_isn;
 };
 
 static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
@@ -241,13 +241,13 @@ struct tcp_sock {
  * read the code and the spec side by side (and laugh ...)
  * See RFC793 and RFC1122. The RFC writes these in capitals.
  */
-   __u32   rcv_nxt;/* What we want to receive next */
-   __u32   snd_nxt;/* Next sequence we send*/
+   u32 rcv_nxt;/* What we want to receive next */
+   u32 snd_nxt;/* Next sequence we send*/
 
-   __u32   snd_una;/* First byte we want an ack for*/
-   __u32   snd_sml;/* Last byte of the most recently transmitted 
small packet */
-   __u32   rcv_tstamp; /* timestamp of last received ACK (for 
keepalives) */
-   __u32   lsndtime;   /* timestamp of last sent data packet (for 
restart window) */
+   u32 snd_una;/* First byte we want an ack for*/
+   u32 snd_sml;/* Last byte of the most recently transmitted 
small packet */
+   u32 rcv_tstamp; /* timestamp of last received ACK (for 
keepalives) */
+   u32 lsndtime;   /* timestamp of last sent data packet (for 
restart window) */
 
/* Data for direct copy to user */
struct {
@@ -265,30 +265,30 @@ #ifdef CONFIG_NET_DMA
 #endif
} ucopy;
 
-   __u32   snd_wl1;/* Sequence for window update   */
-   __u32   snd_wnd;/* The window we expect to receive  */
-   __u32   max_window; /* Maximal window ever seen from peer   */
-   __u32   mss_cache;  /* Cached effective mss, not including SACKS */
+   u32 snd_wl1;/* Sequence for window update   */
+   u32 snd_wnd;/* The window we expect to receive  */
+   u32 max_window; /* Maximal window ever seen from peer   */
+   u32 mss_cache;  /* Cached effective mss, not including SACKS */
 
-   __u32   window_clamp;   /* Maximal window to advertise  */
-   __u32   rcv_ssthresh;   /* Current window clamp */
+   u32 window_clamp;   /* Maximal window to advertise 

[PATCH 1/2] [TCP]: Change tcp_header_len member in tcp_sock to u16

2006-11-27 Thread Arnaldo Carvalho de Melo
With this we eliminate the last hole in struct tcp_sock.

End result:

[EMAIL PROTECTED] net-2.6.20]$ codiff -sV /tmp/tcp.o.before net/ipv4/tcp.o
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv4/tcp.c:
  struct tcp_sock |   -4
tcp_header_len;
 from: int   /*  1000(0) 4(0) */
 to:   u16   /*  1000(0) 2(0) */
 1 struct changed
[EMAIL PROTECTED] net-2.6.20]$

Now sizeof(tcp_sock) is just...

[EMAIL PROTECTED] net-2.6.20]$ pahole --sizes 
../OUTPUT/qemu/net-2.6.20/net/ipv4/tcp.o | grep -w tcp_sock
struct tcp_sock: 1500 0

1500 bytes ;-)

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
---
 include/linux/tcp.h |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index dd61b17..b42ff0e 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -227,7 +227,8 @@ static inline struct tcp_request_sock *t
 struct tcp_sock {
/* inet_connection_sock has to be the first member of tcp_sock */
struct inet_connection_sock inet_conn;
-   int tcp_header_len; /* Bytes of tcp header to send  */
+   u16 tcp_header_len; /* Bytes of tcp header to send  */
+   u16 xmit_size_goal; /* Goal for segmenting output packets   */
 
 /*
  * Header prediction flags
@@ -268,8 +269,6 @@ #endif
__u32   snd_wnd;/* The window we expect to receive  */
__u32   max_window; /* Maximal window ever seen from peer   */
__u32   mss_cache;  /* Cached effective mss, not including SACKS */
-   __u16   xmit_size_goal; /* Goal for segmenting output packets   */
-   /* XXX Two bytes hole, try to pack */
 
__u32   window_clamp;   /* Maximal window to advertise  */
__u32   rcv_ssthresh;   /* Current window clamp */
-- 
1.4.2.1.g3d5c

-
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


[PATCHES 0/2][TCP]: pack tcp_sock

2006-11-27 Thread Arnaldo Carvalho de Melo
Hi David,

Please consider pulling from:

master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.20.git

Regards,

- Arnaldo
-
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 1/2] chelsio: T200 support

2006-11-27 Thread Andrew Morton
On Tue, 28 Nov 2006 00:17:38 +0100
Francois Romieu <[EMAIL PROTECTED]> wrote:

> Stephen Hemminger <[EMAIL PROTECTED]> :
> > This patch is experimental, it applies after the earlier 6 chelsio cleanup
> > patches. Tested on a pair of T210 board's.
> 
> The whole serie is stored as branch 'chelsio' at:
> git://electric-eye.fr.zoreil.com/home/romieu/linux/linux-2.6-out/.git chelsio

I think you meant
git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6.git#chelsio

> I have hand-edited a few patches to convert some spaces/tabs.

I'll try adding this to -mm.

I hope someone knows what's happening with this driver, because I've
seriously lost the plot.

-
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] kill net/rxrpc/rxrpc_syms.c

2006-11-27 Thread Adrian Bunk
On Mon, Nov 27, 2006 at 11:21:25AM +, David Howells wrote:
> Adrian Bunk <[EMAIL PROTECTED]> wrote:
> 
> > This patch moves the EXPORT_SYMBOL's from net/rxrpc/rxrpc_syms.c to the 
> > files with the actual functions.
> 
> You can if you like.  Can you slap a blank line before each EXPORT_SYMBOL()
> though please?

Updated patch below.

> David

cu
Adrian


<--  snip  -->


This patch moves the EXPORT_SYMBOL's from net/rxrpc/rxrpc_syms.c to the
files with the actual functions.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

 net/rxrpc/Makefile |1 -
 net/rxrpc/call.c   |   10 ++
 net/rxrpc/connection.c |4 
 net/rxrpc/rxrpc_syms.c |   34 --
 net/rxrpc/transport.c  |8 
 5 files changed, 22 insertions(+), 35 deletions(-)

--- linux-2.6.19-rc6-mm1/net/rxrpc/Makefile.old 2006-11-26 04:49:25.0 
+0100
+++ linux-2.6.19-rc6-mm1/net/rxrpc/Makefile 2006-11-26 04:50:08.0 
+0100
@@ -12,7 +12,6 @@
krxtimod.o \
main.o \
peer.o \
-   rxrpc_syms.o \
transport.o
 
 ifeq ($(CONFIG_PROC_FS),y)
--- linux-2.6.19-rc6-mm1/net/rxrpc/call.c.old   2006-11-26 04:50:51.0 
+0100
+++ linux-2.6.19-rc6-mm1/net/rxrpc/call.c   2006-11-27 22:15:05.0 
+0100
@@ -315,6 +315,8 @@
return ret;
 } /* end rxrpc_create_call() */
 
+EXPORT_SYMBOL(rxrpc_create_call);
+
 /*/
 /*
  * create a new call record for incoming calls
@@ -466,6 +468,8 @@
_leave(" [destroyed]");
 } /* end rxrpc_put_call() */
 
+EXPORT_SYMBOL(rxrpc_put_call);
+
 /*/
 /*
  * actually generate a normal ACK
@@ -924,6 +928,8 @@
 
 } /* end rxrpc_call_abort() */
 
+EXPORT_SYMBOL(rxrpc_call_abort);
+
 /*/
 /*
  * process packets waiting for this call
@@ -1911,6 +1917,8 @@
 
 } /* end rxrpc_call_read_data() */
 
+EXPORT_SYMBOL(rxrpc_call_read_data);
+
 /*/
 /*
  * write data to a call
@@ -2077,6 +2085,8 @@
 
 } /* end rxrpc_call_write_data() */
 
+EXPORT_SYMBOL(rxrpc_call_write_data);
+
 /*/
 /*
  * flush outstanding packets to the network
--- linux-2.6.19-rc6-mm1/net/rxrpc/connection.c.old 2006-11-26 
04:52:08.0 +0100
+++ linux-2.6.19-rc6-mm1/net/rxrpc/connection.c 2006-11-27 22:15:35.0 
+0100
@@ -208,6 +208,8 @@
goto make_active;
 } /* end rxrpc_create_connection() */
 
+EXPORT_SYMBOL(rxrpc_create_connection);
+
 /*/
 /*
  * lookup the connection for an incoming packet
@@ -412,6 +414,8 @@
_leave(" [killed]");
 } /* end rxrpc_put_connection() */
 
+EXPORT_SYMBOL(rxrpc_put_connection);
+
 /*/
 /*
  * free a connection record
--- linux-2.6.19-rc6-mm1/net/rxrpc/transport.c.old  2006-11-26 
04:52:43.0 +0100
+++ linux-2.6.19-rc6-mm1/net/rxrpc/transport.c  2006-11-27 22:15:57.0 
+0100
@@ -147,6 +147,8 @@
return ret;
 } /* end rxrpc_create_transport() */
 
+EXPORT_SYMBOL(rxrpc_create_transport);
+
 /*/
 /*
  * destroy a transport endpoint
@@ -197,6 +199,8 @@
_leave("");
 } /* end rxrpc_put_transport() */
 
+EXPORT_SYMBOL(rxrpc_put_transport);
+
 /*/
 /*
  * add a service to a transport to be listened upon
@@ -232,6 +236,8 @@
return ret;
 } /* end rxrpc_add_service() */
 
+EXPORT_SYMBOL(rxrpc_add_service);
+
 /*/
 /*
  * remove a service from a transport
@@ -249,6 +255,8 @@
_leave("");
 } /* end rxrpc_del_service() */
 
+EXPORT_SYMBOL(rxrpc_del_service);
+
 /*/
 /*
  * INET callback when data has been received on the socket.
--- linux-2.6.19-rc6-mm1/net/rxrpc/rxrpc_syms.c 2006-09-20 05:42:06.0 
+0200
+++ /dev/null   2006-09-19 00:45:31.0 +0200
@@ -1,34 +0,0 @@
-/* rxrpc_syms.c: exported Rx RPC layer interface symbols
- *
- * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells ([EMAIL PROTECTED])
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-
-/* call.c */
-EXPORT_SYMBOL(rxrpc_create_call);
-EXPORT_SY

netdev@vger.kernel.org

2006-11-27 Thread Willy Tarreau
Hi Auke,

On Mon, Nov 27, 2006 at 09:31:34AM -0800, Auke Kok wrote:
> Willy Tarreau wrote:
> >Hi guys,
> >
> >I'm about to apply this fix to 2.4. 2.6 is not affected.
> >Do you have any objection ?
> 
> Willy,
> 
> you didn't CC netdev. linux-net is a users list, you didn't CC the 
> maintainers of the driver. Please do this. We're more than happy to help, 
> even for 2.4 kernels.

I'm really sorry, as I usually use netdev and not linux-net. I don't know
why I used this one in the first step. There might have been some fog
inside my head.

BTW, there's no clear maintainer identified for e100. At best I can find
"[EMAIL PROTECTED]" in the file, without any freshness info. Is that
still OK or do you want to update the MAINTAINERS file ?

> Patch looks good, please apply.
> 
> Acked-by: Auke Kok <[EMAIL PROTECTED]>

Done, thanks !

Willy

-
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 1/1] add auditing to ipsec

2006-11-27 Thread Steve Grubb
On Monday 27 November 2006 17:26, Joy Latten wrote:
> This patch adds auditing to ipsec in
> support of labeled ipsec.

The audit changes in this patch look good to me.

-Steve Grubb
-
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 1/2] chelsio: T200 support

2006-11-27 Thread Francois Romieu
Stephen Hemminger <[EMAIL PROTECTED]> :
> This patch is experimental, it applies after the earlier 6 chelsio cleanup
> patches. Tested on a pair of T210 board's.

The whole serie is stored as branch 'chelsio' at:
git://electric-eye.fr.zoreil.com/home/romieu/linux/linux-2.6-out/.git chelsio

I have hand-edited a few patches to convert some spaces/tabs.

-- 
Ueimor
-
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 1/1] add auditing to ipsec

2006-11-27 Thread Joy Latten
This patch adds auditing to ipsec in 
support of labeled ipsec. 
An audit message occurs when an ipsec SA
or ipsec policy is created/deleted.

Patch was built against linux kernel 2.6.19-rc6.
Please let me know if this is acceptable. 

Regards,
Joy

---
diff -urpN linux-2.6.18.orig/include/linux/audit.h 
linux-2.6.18-patch/include/linux/audit.h
--- linux-2.6.18.orig/include/linux/audit.h 2006-11-27 11:21:16.0 
-0600
+++ linux-2.6.18-patch/include/linux/audit.h2006-11-27 12:28:43.0 
-0600
@@ -101,6 +101,10 @@
 #define AUDIT_MAC_CIPSOV4_DEL  1408/* NetLabel: del CIPSOv4 DOI entry */
 #define AUDIT_MAC_MAP_ADD  1409/* NetLabel: add LSM domain mapping */
 #define AUDIT_MAC_MAP_DEL  1410/* NetLabel: del LSM domain mapping */
+#define AUDIT_MAC_IPSEC_ADDSA  1411/* Add a XFRM state */
+#define AUDIT_MAC_IPSEC_DELSA  1412/* Delete a XFRM state */
+#define AUDIT_MAC_IPSEC_ADDSPD 1413/* Add a XFRM policy */
+#define AUDIT_MAC_IPSEC_DELSPD 1414/* Delete a XFRM policy */
 
 #define AUDIT_FIRST_KERN_ANOM_MSG   1700
 #define AUDIT_LAST_KERN_ANOM_MSG1799
@@ -377,6 +381,7 @@ extern void auditsc_get_stamp(struct aud
  struct timespec *t, unsigned int *serial);
 extern int  audit_set_loginuid(struct task_struct *task, uid_t loginuid);
 extern uid_t audit_get_loginuid(struct audit_context *ctx);
+extern void audit_log_task_context(struct audit_buffer *ab);
 extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp);
 extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, 
mode_t mode);
 extern int audit_bprm(struct linux_binprm *bprm);
@@ -449,6 +454,7 @@ extern int audit_n_rules;
 #define audit_inode_update(i) do { ; } while (0)
 #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
 #define audit_get_loginuid(c) ({ -1; })
+#define audit_log_task_context(b) do { ; } while (0)
 #define audit_ipc_obj(i) ({ 0; })
 #define audit_ipc_set_perm(q,u,g,m) ({ 0; })
 #define audit_bprm(p) ({ 0; })
diff -urpN linux-2.6.18.orig/include/net/xfrm.h 
linux-2.6.18-patch/include/net/xfrm.h
--- linux-2.6.18.orig/include/net/xfrm.h2006-11-27 11:21:43.0 
-0600
+++ linux-2.6.18-patch/include/net/xfrm.h   2006-11-27 12:29:11.0 
-0600
@@ -389,6 +389,15 @@ extern int xfrm_unregister_km(struct xfr
 
 extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2];
 
+/* Audit Information */
+struct xfrm_audit
+{
+   uid_t   loginuid;
+   u32 secid;
+};
+void xfrm_audit_log(uid_t auid, u32 secid, int type, int result,
+   struct xfrm_policy *xp, struct xfrm_state *x);
+
 static inline void xfrm_pol_hold(struct xfrm_policy *policy)
 {
if (likely(policy != NULL))
@@ -934,7 +943,7 @@ static inline int xfrm_state_sort(struct
 #endif
 extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq);
 extern int xfrm_state_delete(struct xfrm_state *x);
-extern void xfrm_state_flush(u8 proto);
+extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info);
 extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq);
 extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq);
 extern void xfrm_replay_notify(struct xfrm_state *x, int event);
@@ -987,13 +996,13 @@ struct xfrm_policy *xfrm_policy_bysel_ct
  struct xfrm_selector *sel,
  struct xfrm_sec_ctx *ctx, int delete);
 struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete);
-void xfrm_policy_flush(u8 type);
+void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info);
 u32 xfrm_get_acqseq(void);
 void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi);
 struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, 
  xfrm_address_t *daddr, xfrm_address_t *saddr, 
  int create, unsigned short family);
-extern void xfrm_policy_flush(u8 type);
+extern void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info);
 extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy 
*pol);
 extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst,
  struct flowi *fl, int family, int strict);
diff -urpN linux-2.6.18.orig/kernel/auditsc.c 
linux-2.6.18-patch/kernel/auditsc.c
--- linux-2.6.18.orig/kernel/auditsc.c  2006-11-27 11:19:36.0 -0600
+++ linux-2.6.18-patch/kernel/auditsc.c 2006-11-27 12:26:39.0 -0600
@@ -730,7 +730,7 @@ static inline void audit_free_context(st
printk(KERN_ERR "audit: freed %d contexts\n", count);
 }
 
-static void audit_log_task_context(struct audit_buffer *ab)
+void audit_log_task_context(struct audit_buffer *ab)
 {
char *ctx = NULL;
ssize_t len = 0;
@@ -759,6 +759,8 @@ error_path:
return;
 }
 
+EXPORT_SYMBOL(audit_log_task_context);
+
 static void audit_log

Re: [PATCH] potential NULL pointer deref in net/key/af_key.c

2006-11-27 Thread Jesper Juhl

On 27/11/06, David Miller <[EMAIL PROTECTED]> wrote:

From: Jesper Juhl <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 22:44:07 +0100

> In net/key/af_key.c::pfkey_send_policy_notify() there's a check at the
> beginning of the function :
>
> if (xp && xp->type != XFRM_POLICY_TYPE_MAIN)
>
> this implies that 'xp' may be null when the function is called. But later
> on in the function we have this code :
>
> return key_notify_policy(xp, dir, c);
>
> key_notify_policy() passes 'xp' to pfkey_xfrm_policy2msg_prep() that pass
> it on to pfkey_xfrm_policy2msg_size() which dereferences it.
> key_notify_policy() also passes 'xp' to pfkey_xfrm_policy2msg() which
> also dereferences it.
>
> So, in pfkey_send_policy_notify() in the cases where we end up calling
> key_notify_policy(), we should test 'xp' for NULL.
>
> (note: patch is compile tested only)
>
>
> Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>

We really need to teach your automated tool about context.

The NULL case can only occur for XFRM_MSG_FLUSHPOLICY.

Look at the km_policy_notify() call sites.  You can even see from the
net/xfrm/xfrm_user.c:xfrm_send_policy_notify() implementation of this
callback that for XFRM_MSG_FLUSHPOLICY the "xp" argument is ignored.


Arrgh, you are right. I really need to check call sites more carefully :(

--
Jesper Juhl <[EMAIL PROTECTED]>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please  http://www.expita.com/nomime.html
-
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] potential NULL pointer deref in net/key/af_key.c

2006-11-27 Thread David Miller
From: Jesper Juhl <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 22:44:07 +0100

> In net/key/af_key.c::pfkey_send_policy_notify() there's a check at the 
> beginning of the function : 
> 
> if (xp && xp->type != XFRM_POLICY_TYPE_MAIN)
> 
> this implies that 'xp' may be null when the function is called. But later 
> on in the function we have this code : 
> 
> return key_notify_policy(xp, dir, c);
> 
> key_notify_policy() passes 'xp' to pfkey_xfrm_policy2msg_prep() that pass
> it on to pfkey_xfrm_policy2msg_size() which dereferences it.
> key_notify_policy() also passes 'xp' to pfkey_xfrm_policy2msg() which 
> also dereferences it.
> 
> So, in pfkey_send_policy_notify() in the cases where we end up calling 
> key_notify_policy(), we should test 'xp' for NULL.
> 
> (note: patch is compile tested only)
> 
> 
> Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>

We really need to teach your automated tool about context.

The NULL case can only occur for XFRM_MSG_FLUSHPOLICY.

Look at the km_policy_notify() call sites.  You can even see from the
net/xfrm/xfrm_user.c:xfrm_send_policy_notify() implementation of this
callback that for XFRM_MSG_FLUSHPOLICY the "xp" argument is ignored.
-
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 0/3][NET] Pack some structs

2006-11-27 Thread David Miller
From: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 18:03:24 -0200

> Hi David,
> 
>   Please consider pulling from:
> 
> master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.20.git
> 
>   Already rebased from your net-2.6.20 tree.

Looks great, pulled and push back out.

Thanks Arnaldo.
-
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 take2] softmac: remove netif_tx_disable when scanning

2006-11-27 Thread Larry Finger
From: Michael Buesch <[EMAIL PROTECTED]>

In the scan section of ieee80211softmac, network transmits are disabled.
When SoftMAC re-enables transmits, it may override the wishes of a driver
that may have very good reasons for disabling transmits. At least one failure
in bcm43xx can be traced to this problem. In addition, several unexplained
problems may arise from the unexpected enabling of transmits. Note that
making this change introduces a new bug that would allow transmits for the
current session to be transmitted on the wrong channel; however, the new bug
is much less severe than the one being fixed, as the new one only leads to
a few retransmits, whereas the old one can bring the interface down.

A fix that will not introduce new bugs is being investigated; however, the 
current,
more serious one should be fixed now.

Signed-off-by: Michael Buesch <[EMAIL PROTECTED]>
Signed-off-by: Larry Finger <[EMAIL PROTECTED]>
---

John,

I assume you have seen the discussion on this matter in the netdev mailing list.
I agree with Michael that this patch should be applied despite the intoduction
of a new bug. Please apply this to wireless-2.6 and push it upstream for 
inclusion
in 2.6.19, if possible. I will be submitting it to 2.6.18.Y.

Larry


Index: linux-2.6.19-rc5/net/ieee80211/softmac/ieee80211softmac_scan.c
===
--- linux-2.6.19-rc5.orig/net/ieee80211/softmac/ieee80211softmac_scan.c
+++ linux-2.6.19-rc5/net/ieee80211/softmac/ieee80211softmac_scan.c
@@ -47,7 +47,6 @@ ieee80211softmac_start_scan(struct ieee8
sm->scanning = 1;
spin_unlock_irqrestore(&sm->lock, flags);
 
-   netif_tx_disable(sm->ieee->dev);
ret = sm->start_scan(sm->dev);
if (ret) {
spin_lock_irqsave(&sm->lock, flags);
@@ -248,7 +246,6 @@ void ieee80211softmac_scan_finished(stru
if (net)
sm->set_channel(sm->dev, net->channel);
}
-   netif_wake_queue(sm->ieee->dev);
ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, 
NULL);
 }
 EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished);

---

-
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: Intel 82559 NIC corrupted EEPROM

2006-11-27 Thread Jesse Brandeburg

On 11/27/06, John <[EMAIL PROTECTED]> wrote:

John wrote:

>> -0009 : System RAM
>> 000a-000b : Video RAM area
>> 000f-000f : System ROM
>> 0010-0ffe : System RAM
>>   0010-00296a1a : Kernel code
>>   00296a1b-0031bbe7 : Kernel data
>> 0fff-0fff2fff : ACPI Non-volatile Storage
>> 0fff3000-0fff : ACPI Tables
>> 2000-200f : :00:08.0
>> 2010-201f : :00:09.0
>> 2020-202f : :00:0a.0
>> e000-e3ff : :00:00.0
>> e500-e50f : :00:08.0
>> e510-e51f : :00:09.0
>> e520-e52f : :00:0a.0
>> e530-e5300fff : :00:08.0
>> e5301000-e5301fff : :00:0a.0
>> e5302000-e5302fff : :00:09.0
>> - : reserved
>>
>> I've also attached:
>>
>> o config-2.6.18.1-adlink used to compile this kernel
>> o dmesg output after the machine boots
>
> I suppose the information I've sent is not enough to locate the
> root of the problem. Is there more I can provide?

Here is some context for those who have been added to the CC list:
http://groups.google.com/group/linux.kernel/browse_frm/thread/bdc8fd08fb601c26

As far as I understand, some consider the eepro100 driver to be
obsolete, and it has been considered for removal.

What is the current status?

Unfortunately, e100 does not work out-of-the-box on this system.

Is there something I can do to improve the situation?


lets go ahead and print the output from e100_load_eeprom
debug patch attached.


e100_debug.patch
Description: Binary data


[PATCH 1/3] [INET_CONNECTION_SOCK]: Pack struct inet_connection_sock_af_ops

2006-11-27 Thread Arnaldo Carvalho de Melo
We have a hole in:

[EMAIL PROTECTED] net-2.6.20]$ pahole net/ipv6/tcp_ipv6.o 
inet_connection_sock_af_ops
/* 
/pub/scm/linux/kernel/git/acme/net-2.6.20/include/net/inet_connection_sock.h:38 
*/
struct inet_connection_sock_af_ops {
int(*queue_xmit)();  /* 0 4 */
void   (*send_check)();  /* 4 4 */
int(*rebuild_header)();  /* 8 4 */
int(*conn_request)();/*12 4 */
struct sock *  (*syn_recv_sock)();   /*16 4 */
int(*remember_stamp)();  /*20 4 */
__u16  net_header_len;   /*24 2 */

/* XXX 2 bytes hole, try to pack */

int(*setsockopt)();  /*28 4 */
int(*getsockopt)();  /*32 4 */
int(*compat_setsockopt)(); /*36 4 */
int(*compat_getsockopt)(); /*40 4 */
void   (*addr2sockaddr)();   /*44 4 */
intsockaddr_len; /*48 4 */
}; /* size: 52, sum members: 50, holes: 1, sum holes: 2 */

But we don't need sockaddr_len to be an int:

[EMAIL PROTECTED] net-2.6.20]$ find net -name "*.[ch]" | xargs grep 
'\.sockaddr_len.\+=' | sort -u
net/dccp/ipv4.c:.sockaddr_len  = sizeof(struct sockaddr_in),
net/dccp/ipv6.c:.sockaddr_len  = sizeof(struct sockaddr_in6),
net/ipv4/tcp_ipv4.c:.sockaddr_len  = sizeof(struct sockaddr_in),
net/ipv6/tcp_ipv6.c:.sockaddr_len  = sizeof(struct sockaddr_in6),
net/sctp/ipv6.c:.sockaddr_len  = sizeof(struct sockaddr_in6),
net/sctp/protocol.c:.sockaddr_len  = sizeof(struct sockaddr_in),

[EMAIL PROTECTED] net-2.6.20]$ pahole --sizes net/ipv6/tcp_ipv6.o | grep 
sockaddr_in
struct sockaddr_in: 16 0
struct sockaddr_in6: 28 0
[EMAIL PROTECTED] net-2.6.20]$

So I turned sockaddr_len a 'u16', and now:

[EMAIL PROTECTED] net-2.6.20]$ pahole net/ipv6/tcp_ipv6.o 
inet_connection_sock_af_ops
/* 
/pub/scm/linux/kernel/git/acme/net-2.6.20/include/net/inet_connection_sock.h:38 
*/
struct inet_connection_sock_af_ops {
int(*queue_xmit)();/* 0   4 */
void   (*send_check)();/* 4   4 */
int(*rebuild_header)();/* 8   4 */
int(*conn_request)();  /*12   4 */
struct sock *  (*syn_recv_sock)(); /*16   4 */
int(*remember_stamp)();/*20   4 */
u16net_header_len; /*24   2 */
u16sockaddr_len;   /*26   2 */
int(*setsockopt)();/*28   4 */
int(*getsockopt)();/*32   4 */
int(*compat_setsockopt)(); /*36   4 */
int(*compat_getsockopt)(); /*40   4 */
void   (*addr2sockaddr)(); /*44   4 */
}; /* size: 48 */

So we've saved 4 bytes:

[EMAIL PROTECTED] net-2.6.20]$ codiff -sV /tmp/tcp_ipv6.o.before 
net/ipv6/tcp_ipv6.o
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/tcp_ipv6.c:
  struct inet_connection_sock_af_ops |   -4
net_header_len;
 from: __u16 /*24(0) 2(0) */
 to:   u16   /*24(0) 2(0) */
sockaddr_len;
 from: int   /*48(0) 4(0) */
 to:   u16   /*26(0) 2(0) */
 1 struct changed
[EMAIL PROTECTED] net-2.6.20]$

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
---
 include/net/inet_connection_sock.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/inet_connection_sock.h 
b/include/net/inet_connection_sock.h
index fd3f1d8..cccea05 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -46,7 +46,8 @@ struct inet_connection_sock_af_ops {
  struct request_sock *req,
  struct dst_entry *dst);
int (*remember_stamp)(struct sock *sk);
-   __u16   net_header_len;
+   u16 net_header_len;
+   u16 sockaddr_len;
int (*setsockopt)(struct sock *sk, int level, int optname, 
  char __user *optval, int optlen);
int (*getsockopt)(struct sock *sk, int level, int optname, 
@@ -58,7 +59,6 @@ struct inet_connection_sock_af_ops {
int level, int optname,
char __user *optval, int __user *optlen);
void(*addr2sockaddr)(struct sock *sk, struct sockaddr *);
-   int sockaddr_len;
 };
 
 /** inet_connection_sock - INET connection oriented sock
-- 
1.4.2.1.g3d5c

-
To 

[PATCH 2/3] [NET]: Pack struct hh_cache

2006-11-27 Thread Arnaldo Carvalho de Melo
[EMAIL PROTECTED] net-2.6.20]$ pahole net/ipv4/tcp.o hh_cache
/* /pub/scm/linux/kernel/git/acme/net-2.6.20/include/linux/netdevice.h:190 */
struct hh_cache {
struct hh_cache *  hh_next;  /* 0 4 */
atomic_t   hh_refcnt;/* 4 4 */
__be16 hh_type;  /* 8 2 */

/* XXX 2 bytes hole, try to pack */

inthh_len;   /*12 4 */
int(*hh_output)();   /*16 4 */
rwlock_t   hh_lock;  /*2036 */
long unsigned int  hh_data[24];  /*5696 */
}; /* size: 152, sum members: 150, holes: 1, sum holes: 2 */

[EMAIL PROTECTED] net-2.6.20]$ find net -name "*.[ch]" | xargs grep 
'hh_len.\+=' | sort -u
net/atm/br2684.c:   hh->hh_len = PADLEN + ETH_HLEN;
net/ethernet/eth.c: hh->hh_len = ETH_HLEN;
net/ipv4/ipconfig.c:int hh_len = LL_RESERVED_SPACE(dev);
net/ipv4/ip_output.c:   hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
net/ipv4/ip_output.c:   int hh_len = LL_RESERVED_SPACE(dev);
net/ipv4/netfilter.c:   hh_len = (*pskb)->dst->dev->hard_header_len;
net/ipv4/raw.c: hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
net/ipv6/ip6_output.c:  hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
net/ipv6/netfilter/ip6t_REJECT.c:   hh_len = (dst->dev->hard_header_len + 
15)&~15;
net/ipv6/raw.c: hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
[EMAIL PROTECTED] net-2.6.20]$

[EMAIL PROTECTED] net-2.6.20]$ find include -name "*.h" | xargs grep 'define 
ETH_HLEN'
include/linux/if_ether.h:#define ETH_HLEN   14  /* Total octets 
in header.   */

(((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)

[EMAIL PROTECTED] net-2.6.20]$ pahole net/ipv4/tcp.o net_device | grep 
hard_header_len
short unsigned int hard_header_len;  /*   106 2 */
[EMAIL PROTECTED] net-2.6.20]$

So I think we're safe in turning hh_len an u16, end result:

[EMAIL PROTECTED] net-2.6.20]$ codiff -sV /tmp/tcp.o.before net/ipv4/tcp.o
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv4/tcp.c:
  struct hh_cache |   -4
hh_len;
 from: int   /*12(0) 4(0) */
 to:   u16   /*10(0) 2(0) */
 1 struct changed
[EMAIL PROTECTED] net-2.6.20]$

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
---
 include/linux/netdevice.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 50d95ac..ce4df7b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -194,7 +194,7 @@ struct hh_cache
  *  NOTE:  For VLANs, this will be the
  *  encapuslated type. --BLG
  */
-   int hh_len; /* length of header */
+   u16 hh_len; /* length of header */
int (*hh_output)(struct sk_buff *skb);
rwlock_thh_lock;
 
-- 
1.4.2.1.g3d5c

-
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 0/3][NET] Pack some structs

2006-11-27 Thread Arnaldo Carvalho de Melo
Hi David,

Please consider pulling from:

master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.20.git

Already rebased from your net-2.6.20 tree.

Regards,

- Arnaldo
-
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/3] [XFRM]: Pack struct xfrm_policy

2006-11-27 Thread Arnaldo Carvalho de Melo
[EMAIL PROTECTED] net-2.6.20]$ pahole net/ipv4/tcp.o xfrm_policy
/* /pub/scm/linux/kernel/git/acme/net-2.6.20/include/linux/security.h:67 */
struct xfrm_policy {
struct xfrm_policy *   next; /* 0 4 */
struct hlist_node  bydst;/* 4 8 */
struct hlist_node  byidx;/*12 8 */
rwlock_t   lock; /*2036 */
atomic_t   refcnt;   /*56 4 */
struct timer_list  timer;/*6024 */
u8 type; /*84 1 */

/* XXX 3 bytes hole, try to pack */

u32priority; /*88 4 */
u32index;/*92 4 */
struct xfrm_selector   selector; /*9656 */
struct xfrm_lifetime_cfg   lft;  /*   15264 */
struct xfrm_lifetime_cur   curlft;   /*   21632 */
struct dst_entry * bundles;  /*   248 4 */
__u16  family;   /*   252 2 */
__u8   action;   /*   254 1 */
__u8   flags;/*   255 1 */
__u8   dead; /*   256 1 */
__u8   xfrm_nr;  /*   257 1 */

/* XXX 2 bytes hole, try to pack */

struct xfrm_sec_ctx *  security; /*   260 4 */
struct xfrm_tmpl   xfrm_vec[6];  /*   264   360 */
}; /* size: 624, sum members: 619, holes: 2, sum holes: 5 */

So lets have just one hole instead of two, by moving 'type' to just before 
'action',
end result:

[EMAIL PROTECTED] net-2.6.20]$ codiff -s /tmp/tcp.o.before net/ipv4/tcp.o
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv4/tcp.c:
  struct xfrm_policy |   -4
 1 struct changed
[EMAIL PROTECTED] net-2.6.20]$

[EMAIL PROTECTED] net-2.6.20]$ pahole -c 64 net/ipv4/tcp.o xfrm_policy
/* /pub/scm/linux/kernel/git/acme/net-2.6.20/include/linux/security.h:67 */
struct xfrm_policy {
struct xfrm_policy *   next; /* 0 4 */
struct hlist_node  bydst;/* 4 8 */
struct hlist_node  byidx;/*12 8 */
rwlock_t   lock; /*2036 */
atomic_t   refcnt;   /*56 4 */
struct timer_list  timer;/*6024 */
u32priority; /*84 4 */
u32index;/*88 4 */
struct xfrm_selector   selector; /*9256 */
struct xfrm_lifetime_cfg   lft;  /*   14864 */
struct xfrm_lifetime_cur   curlft;   /*   21232 */
struct dst_entry * bundles;  /*   244 4 */
u16family;   /*   248 2 */
u8 type; /*   250 1 */
u8 action;   /*   251 1 */
u8 flags;/*   252 1 */
u8 dead; /*   253 1 */
u8 xfrm_nr;  /*   254 1 */

/* XXX 1 byte hole, try to pack */

struct xfrm_sec_ctx *  security; /*   256 4 */
struct xfrm_tmpl   xfrm_vec[6];  /*   260   360 */
}; /* size: 620, sum members: 619, holes: 1, sum holes: 1 */

Are there any fugly data dependencies here? None that I know.

In the process changed the removed the __ prefixed types, that are just for
userspace visible headers.

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
---
 include/net/xfrm.h |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 3878a88..984e5c4 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -340,18 +340,19 @@ struct xfrm_policy
atomic_trefcnt;
struct timer_list   timer;
 
-   u8  type;
u32 priority;
u32 index;
struct xfrm_selectorselector;
struct xfrm_lifetime_cfg lft;
struct xfrm_lifetime_cur curlft;
struct dst_entry   *bundles;
-   __u16   family;
-   __u8action;
-   __u8flags;
-   __u8dead;
-   __u8xfrm_nr;
+   u16 family;
+ 

Re: [take25 1/6] kevent: Description.

2006-11-27 Thread Ulrich Drepper

Evgeniy Polyakov wrote:

It _IS_ how previous interface worked.

EXACTLY!


No, the old interface committed everything not only up to a given index. 
 This is the huge difference which makes or breaks it.


--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-
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: [take25 1/6] kevent: Description.

2006-11-27 Thread Ulrich Drepper

Evgeniy Polyakov wrote:


That index is provided by kernel for userspace so that userspace could
determine where indexes are - of course userspace can maintain it
itself, but it can also use provided by kernel.


Indeed.  That's what I said.  But I also pointed out that the field is 
only useful in simple minded programs and certainly not in the wrappers 
the runtime (glibc) will provide.


As you said yourself, there is no real need for the value being there, 
userland can keep track of it by itself.  So, let's reduce the interface.



I do not care actually about that index, but as you have probably noticed, 
there was such an interface already, and I changed it. So, this will be the 
last change of the interface. You think it should not be exported -

fine, it will not be.


Thanks.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-
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: [take25 1/6] kevent: Description.

2006-11-27 Thread Ulrich Drepper

Evgeniy Polyakov wrote:

If kernel has put data asynchronously it will setup special flag, thus 
kevent_wait() will not sleep and will return, so thread will check new

entries and process them.


This is not sufficient.

The userlevel code does not commit the events until they are processed. 
 So assume two threads at userlevel, one event is asynchronously 
posted.  The first thread picks it up, the second call kevent_wait.


With your scheme it will not be put to sleep and unnecessarily returns 
to userlevel.


What I propose and what has been proven to work in many situations is to 
have part of the kevent_wait syscall the information about "I am aware 
of all events up to XX; wake me only if anything beyond that is added".


Please take a look at how futexes work, it's really the same concept. 
And it's really also simpler for the implementation.  Having such a flag 
is much more complicated than adding a simple index comparison before 
going to sleep.


--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-
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: e100: inappropriate handling of shared interrupt ?

2006-11-27 Thread Auke Kok

Shaw Vrana wrote:

Hello All,

I'm seeing some odd behavior using the e100 driver for an intel ethernet
controller 82557/8/9 (revv 10).  It appears as if the e100 driver is
handling interrupts generated by another device, though I am not certain
of this..

Using some printks, I see some odd packets received that are eventually
dropped somewhere up the stack.  The packets usually look something like
this:

SrcAddr: 8.0.69.0 (bogus source ip)
DstAddr: 0.40.226.169  (bogus dest ip)
Protocol: 6
InputInt: 2
SrcPort: 20
DstPort: 8793

The src address and dest. address are entirely bogus, the protocol is not
always TCP, but I've seen it be icmp or udp.  In addition, I see _nothing_
using tcpdump, which I also do not understand as I didn't think packets
were dropped before tcpdump.  I've seen this behavior on multiple machines
using the same hardware, but haven't been able to make much sense of it. 
These packets do not seem to affect the normal operation of the device,

i.e. it services correct ips/ports just as one would expect.

B/c I haven't been able to see the packets using tcpdump, I have been
thinking that the packets were generated by the box itself.  The packets
appear to be constantly arriving, though it does not appear as if a packet
with the same src ip/dst ip arrives more than once, though I could be
wrong about this.

From dmesg I see that the e100 is sharing irq 12.

e100: Intel(R) PRO/100 Network Driver, 3.4.8-k2-NAPI
e100: Copyright(c) 1999-2005 Intel Corporation
PCI: Found IRQ 12 for device :01:04.0
PCI: Sharing IRQ 12 with :00:02.0
PCI: Sharing IRQ 12 with :00:1d.0
divert: allocating divert_blk for eth0
e100: eth0: e100_probe: addr 0xe8083000, irq 12, MAC addr 00:0E:B6:26:95:05
(This is the only other message I see mentioning irq 12)


what does /proc/interrupts say after the box is fully booted?


serio: i8042 AUX port at 0x60,0x64 irq 12


so, proc/interrupts should show 2 devices using the same interrupt.


(output of ethtool -e)
Offset  Values
--  --
0x  00 0e b6 26 95 05 1b 0d ff ff 01 02 01 47 ff ff
0x0010  ff ff ff ff 00 5f 70 00 86 80 7f 00 ff ff ff ff
0x0020  ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0030  ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0040  ff ff ff ff ff ff 29 12 ff ff ff ff ff ff ff ff
0x0050  ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0060  2c 01 00 40 06 41 ff ff ff ff ff ff ff ff ff ff
0x0070  ff ff ff ff ff ff ff ff ff ff ff ff ff ff b3 b5





eth1Link encap:Ethernet  HWaddr 00:0E:B6:26:95:05
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:3959305 errors:0 dropped:0 overruns:0 frame:0
TX packets:5337629 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:801040171 (763.9 MiB)  TX bytes:797939498 (760.9 MiB)
Interrupt:12 Base address:0xd000 Memory:e8083000-e8084000


Notice that 0 errors are reported..  How could this be?


use ethtool -S eth1 to get more information on errors etc.

It's unlikely that an irq problem shows up in the ifconfig error stats. Those are 
completely different counters that don't interact.



ethtool eth1
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: g
Wake-on: d
Current message level: 0x0007 (7)
Link detected: yes


Any ideas?


can you try with the latest e100 driver from e1000.sf.net ? I don't think it solves it 
but it might help to try (doesn't hurt).


Cheers,

Auke



-
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: [take24 0/6] kevent: Generic event handling mechanism.

2006-11-27 Thread Ulrich Drepper

Evgeniy Polyakov wrote:

It just sets hrtimer with abs time and sleeps - it can achieve the same
goals using similar to wait_event() mechanism.


I don't follow.  Of course it is somehow possible to wait until an 
absolute deadline.  But it's not part of the parameter list and hence 
easily and _quickly_ usable.




Btw, do you propose to change all users of wait_event()?

Which users?


Any users which use wait_event() or schedule_timeout(). Futex for
example - it perfectly ok lives with relative timeouts provided to
schedule_timeout() - the same (roughly saying of course) is done in kevent.


No, it does not live perfectly OK with relative timeouts.  The userlevel 
implementation is actually wrong because of this in subtle ways.  Some 
futex interfaces take absolute timeouts and they have to be interrupted 
if the realtime clock is set forward.


Also, the calls are complicated and slow because the userlevel wrapper 
has to call clock_gettime/gettimeofday before each futex syscall.  If 
the kernel would accept absolute timeouts as well we would save a 
syscall and have actually a correct implementation.




I think I said already several times that absolute timeouts are not
related to syscall execution process. But you seems to not hear me and
insist.


Because you're wrong.  For your use cases it might not be but it's not 
true in general.  And your interface is preventing it from being 
implemented forever.




Ok, I will change waiting syscalls to have 'flags' parameter and 'struct
timespec' as timeout parameter. Special bit in flags will result in
additional timer setup which will fire after absolute timeout and will
wake up those who wait...


Thanks a lot.



kevent signal registering is atomic with respect to other kevent
syscalls: control syscalls are protected by mutex and waiting syscalls
work with queue, which is protected by appropriate lock.
It is about atomicity wrt to the signal mask manipulation which would 
have to precede the kevent_wait call and the call itself (and 
registering a signal for kevent delivery).  This is not atomic.


If signal mask is updated from userspace it should be done through
kevent - add/remove different kevent signals.


Indeed, this is what I've been saying and why ppoll/pselect/epoll_pwait 
take the sigset_t parameter.


Adding the signal mask to the queued events (e.g., the signal events) 
does not work.  First of all it's slow, you'd have to find and combine 
all mask at least every time a signal event is added/removed.  Then how 
do you combine them, OR or AND?  Not all threads might want/need the 
same signal mask.


These are just some of the usability problems.  The only clean and 
usable solution is really to OPTIONALLY pass in the signal mask.  Nobody 
forces anybody to use this feature.  Pass a NULL pointer and nothing 
happens, this is how the other syscalls also work.




The whole signal mask was added by POSXI exactly for that single
practical race in the event dispatching mechanism, which can not handle
other types of events like signals.


No.  How should this argument make sense ?  Signals cannot be used in 
the current event handling and are therefore used for something 
completely different.  And they will have to be used like this for many 
applications (.e., thread cancellation, setuid/setgid implementation, etc).


That fact that the new event handling can handle signals is orthogonal 
(and good).  But it does not supersede the old signal use, it's 
something new.  The old uses are still valid.


BTW: there is a little design decision which has to be made: if a signal 
is registered with kevent and this signal is sent to a specific thread 
instead of the process (tkill and tgkill), what should happen?  I'm 
currently leaning toward failing the tkill/tgkill syscall if delivery of 
the signal requires posting to an event queue.




There is major contradiction here - you say that programmers will use
old-style signal delivery and want me to add signal mask to prevent that
delivery, so signals would be in blocked mask,


That's one thing you can do.  You also can unblock signals.


when I say that current kevent 
signal delivery does not update pending signal mask, which is the same as

putting signals into blocked mask, you say that it is not what is
required.


First, what is "pending signal mask"?  There is one signal mask per 
thread.  And "pending" refers to thread delivery (either per-process or 
per-thread) which is not the signal mask (well, for non-RT signals it 
can be a bitmap but this still is no mask).


Second, I'm not talking about signal delivery.  Yes, sigaction allows to 
specify how the signal mask is to be changed when a signal is delivered. 
 But this is not what I'm talk about.  I'm talking about the signal 
mask used for the duration of the kevent_wait syscall, regardless of 
whether signals are waited for or delivered.





Signal queue is replaced with kevent queue, and it is in sync with all
other kevents.


But the

e100: inappropriate handling of shared interrupt ?

2006-11-27 Thread Shaw Vrana
Hello All,

I'm seeing some odd behavior using the e100 driver for an intel ethernet
controller 82557/8/9 (revv 10).  It appears as if the e100 driver is
handling interrupts generated by another device, though I am not certain
of this..

Using some printks, I see some odd packets received that are eventually
dropped somewhere up the stack.  The packets usually look something like
this:

SrcAddr: 8.0.69.0 (bogus source ip)
DstAddr: 0.40.226.169  (bogus dest ip)
Protocol: 6
InputInt: 2
SrcPort: 20
DstPort: 8793

The src address and dest. address are entirely bogus, the protocol is not
always TCP, but I've seen it be icmp or udp.  In addition, I see _nothing_
using tcpdump, which I also do not understand as I didn't think packets
were dropped before tcpdump.  I've seen this behavior on multiple machines
using the same hardware, but haven't been able to make much sense of it. 
These packets do not seem to affect the normal operation of the device,
i.e. it services correct ips/ports just as one would expect.

B/c I haven't been able to see the packets using tcpdump, I have been
thinking that the packets were generated by the box itself.  The packets
appear to be constantly arriving, though it does not appear as if a packet
with the same src ip/dst ip arrives more than once, though I could be
wrong about this.

>From dmesg I see that the e100 is sharing irq 12.

e100: Intel(R) PRO/100 Network Driver, 3.4.8-k2-NAPI
e100: Copyright(c) 1999-2005 Intel Corporation
PCI: Found IRQ 12 for device :01:04.0
PCI: Sharing IRQ 12 with :00:02.0
PCI: Sharing IRQ 12 with :00:1d.0
divert: allocating divert_blk for eth0
e100: eth0: e100_probe: addr 0xe8083000, irq 12, MAC addr 00:0E:B6:26:95:05
(This is the only other message I see mentioning irq 12)
serio: i8042 AUX port at 0x60,0x64 irq 12

(output of ethtool -e)
Offset  Values
--  --
0x  00 0e b6 26 95 05 1b 0d ff ff 01 02 01 47 ff ff
0x0010  ff ff ff ff 00 5f 70 00 86 80 7f 00 ff ff ff ff
0x0020  ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0030  ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0040  ff ff ff ff ff ff 29 12 ff ff ff ff ff ff ff ff
0x0050  ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0060  2c 01 00 40 06 41 ff ff ff ff ff ff ff ff ff ff
0x0070  ff ff ff ff ff ff ff ff ff ff ff ff ff ff b3 b5

eth1Link encap:Ethernet  HWaddr 00:0E:B6:26:95:05
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:3959305 errors:0 dropped:0 overruns:0 frame:0
TX packets:5337629 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:801040171 (763.9 MiB)  TX bytes:797939498 (760.9 MiB)
Interrupt:12 Base address:0xd000 Memory:e8083000-e8084000


Notice that 0 errors are reported..  How could this be?

ethtool eth1
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: g
Wake-on: d
Current message level: 0x0007 (7)
Link detected: yes


Any ideas? or debugging info greatly appreciated.


Thanks,
Shaw

-
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: Kevent POSIX timers support.

2006-11-27 Thread David Miller
From: Ulrich Drepper <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 10:36:06 -0800

> David Miller wrote:
> > Now we'll have to have a compat layer for 32-bit/64-bit environments
> > thanks to POSIX timers, which is rediculious.
> 
> We already have compat_sys_timer_create.  It should be sufficient just 
> to add the conversion (if anything new is needed) there.  The pointer 
> value can be passed to userland in one or two int fields, I don't really 
> care.  When reporting the event to the user code we cannot just point 
> into the ring buffer anyway.  So while copying the data we can rewrite 
> it if necessary.  I see no need to complicate the code more than it 
> already is.

Ok, as long as that thing doesn't end up in the ring buffer entry
data structure, that's where the real troubles would be.
-
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: Kevent POSIX timers support.

2006-11-27 Thread Ulrich Drepper

David Miller wrote:

Now we'll have to have a compat layer for 32-bit/64-bit environments
thanks to POSIX timers, which is rediculious.


We already have compat_sys_timer_create.  It should be sufficient just 
to add the conversion (if anything new is needed) there.  The pointer 
value can be passed to userland in one or two int fields, I don't really 
care.  When reporting the event to the user code we cannot just point 
into the ring buffer anyway.  So while copying the data we can rewrite 
it if necessary.  I see no need to complicate the code more than it 
already is.


--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-
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: 2.6.19-rc6-mm1: drivers/net/chelsio/: unused code

2006-11-27 Thread Stephen Hemminger
On Fri, 24 Nov 2006 01:17:31 +0100
Adrian Bunk <[EMAIL PROTECTED]> wrote:

> On Thu, Nov 23, 2006 at 02:17:03AM -0800, Andrew Morton wrote:
> >...
> > Changes since 2.6.19-rc5-mm2:
> >...
> > +chelsio-22-driver.patch
> >...
> >  netdev updates
> 
> It is suspicious that the following newly added code is completely unused:
>   drivers/net/chelsio/ixf1010.o
> t1_ixf1010_ops
>   drivers/net/chelsio/mac.o
> t1_chelsio_mac_ops
>   drivers/net/chelsio/vsc8244.o
> t1_vsc8244_ops
> 
> cu
> Adrian
> 

All that is gone in later version. I reposted new patches
after -mm2 was done.
-
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: [take24 0/6] kevent: Generic event handling mechanism.

2006-11-27 Thread Ulrich Drepper

Evgeniy Polyakov wrote:


With provided patch it is possible to wakeup 'for-free' - just call
kevent_ctl(ready) with zero number of ready events, so thread will be
awakened if it was in poll(kevent_fd), kevent_wait() or
kevent_get_events().


Yes, I realize that.  But I wrote something else:

>> Rather than mark an existing entry as ready, how about a call to
>> inject a new ready event?
>>
>> This would be useful to implement functionality at userlevel and
>> still use an event queue to announce the availability.  Without this
>> type of functionality we'd need to use indirect notification via
>> signal or pipe or something like that.

This is still something which is wanted.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-
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] [version 2] Remove support for old-style ethtool ioctl handlers

2006-11-27 Thread Matthew Wilcox

During the transition to the ethtool_ops way of doing things, we supported
calling the device's ->do_ioctl method to allow unconverted drivers to
continue working.  Those days are long behind us, all in-tree drivers
use the ethtool_ops way, and so we no longer need to support this.

The bonding driver and ethernet bridge code are the biggest beneficiaries
of this; calling the ioctl was unreliable as the context might well not
have CAP_SYS_ADMIN.

Thanks to Al Viro for pointing out I missed the bridge code in my first
version of this patch.

Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]>

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 17a4611..952b1be 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -613,38 +613,20 @@ down:
 static int bond_update_speed_duplex(struct slave *slave)
 {
struct net_device *slave_dev = slave->dev;
-   static int (* ioctl)(struct net_device *, struct ifreq *, int);
-   struct ifreq ifr;
struct ethtool_cmd etool;
+   int res;
 
/* Fake speed and duplex */
slave->speed = SPEED_100;
slave->duplex = DUPLEX_FULL;
 
-   if (slave_dev->ethtool_ops) {
-   int res;
-
-   if (!slave_dev->ethtool_ops->get_settings) {
-   return -1;
-   }
-
-   res = slave_dev->ethtool_ops->get_settings(slave_dev, &etool);
-   if (res < 0) {
-   return -1;
-   }
-
-   goto verify;
-   }
+   if (!slave_dev->ethtool_ops || !slave_dev->ethtool_ops->get_settings)
+   return -1;
 
-   ioctl = slave_dev->do_ioctl;
-   strncpy(ifr.ifr_name, slave_dev->name, IFNAMSIZ);
-   etool.cmd = ETHTOOL_GSET;
-   ifr.ifr_data = (char*)&etool;
-   if (!ioctl || (IOCTL(slave_dev, &ifr, SIOCETHTOOL) < 0)) {
+   res = slave_dev->ethtool_ops->get_settings(slave_dev, &etool);
+   if (res < 0)
return -1;
-   }
 
-verify:
switch (etool.speed) {
case SPEED_10:
case SPEED_100:
@@ -690,7 +672,6 @@ static int bond_check_dev_link(struct bo
static int (* ioctl)(struct net_device *, struct ifreq *, int);
struct ifreq ifr;
struct mii_ioctl_data *mii;
-   struct ethtool_value etool;
 
if (bond->params.use_carrier) {
return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0;
@@ -721,9 +702,9 @@ static int bond_check_dev_link(struct bo
}
}
 
-   /* try SIOCETHTOOL ioctl, some drivers cache ETHTOOL_GLINK */
-   /* for a period of time so we attempt to get link status   */
-   /* from it last if the above MII ioctls fail...*/
+   /* some drivers cache ETHTOOL_GLINK for a period of time so we only
+* attempt to get link status from it if the above MII ioctls fail.
+*/
if (slave_dev->ethtool_ops) {
if (slave_dev->ethtool_ops->get_link) {
u32 link;
@@ -734,23 +715,9 @@ static int bond_check_dev_link(struct bo
}
}
 
-   if (ioctl) {
-   strncpy(ifr.ifr_name, slave_dev->name, IFNAMSIZ);
-   etool.cmd = ETHTOOL_GLINK;
-   ifr.ifr_data = (char*)&etool;
-   if (IOCTL(slave_dev, &ifr, SIOCETHTOOL) == 0) {
-   if (etool.data == 1) {
-   return BMSR_LSTATUS;
-   } else {
-   dprintk("SIOCETHTOOL shows link down\n");
-   return 0;
-   }
-   }
-   }
-
/*
 * If reporting, report that either there's no dev->do_ioctl,
-* or both SIOCGMIIREG and SIOCETHTOOL failed (meaning that we
+* or both SIOCGMIIREG and get_link failed (meaning that we
 * cannot report link status).  If not reporting, pretend
 * we're ok.
 */
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 60a508e..dfcedae 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -813,9 +813,6 @@ int vlan_dev_ioctl(struct net_device *de
if (real_dev->do_ioctl && netif_device_present(real_dev)) 
err = real_dev->do_ioctl(real_dev, &ifrr, cmd);
break;
-
-   case SIOCETHTOOL:
-   err = dev_ethtool(&ifrr);
}
 
if (!err) 
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index f753c40..000d7e5 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -29,35 +29,24 @@
  * Determine initial path cost based on speed.
  * using recommendations from 802.1d standard
  *
- * Need to simulate user ioctl because not all device's that support
- * ethtool, use ethtool_ops.  Also, since driver might sleep need to
- * not be holding any locks.
+ * Since driver might sleep need to not be holding any locks.
  */
 static int por

Re: Kevent POSIX timers support.

2006-11-27 Thread David Miller
From: Ulrich Drepper <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 10:20:50 -0800

> Evgeniy Polyakov wrote:
> >> We need to pass the data in the sigev_value meember of the struct 
> >> sigevent structure passed to timer_create to the caller.  I don't see it 
> >> being done here nor when the timer is created.  Do I miss something? 
> >> The sigev_value value should be stored in the user/ptr member of struct 
> >> ukevent.
> > 
> > sigev_value was stored in k_itimer structure, I just do not know where
> > to put it in the ukevent provided to userspace - it can be placed in
> > pointer value if you like.
> 
> sigev_value is a union and the largest element is a pointer.  So, 
> transporting the pointer value is sufficient and it should be passed up 
> to the user in the ptr member of struct ukevent.

Now we'll have to have a compat layer for 32-bit/64-bit environments
thanks to POSIX timers, which is rediculious.

This is exactly the kind of thing I was hoping we could avoid when
designing these data structures.  No pointers, no non-fixed sized
types, only types which are identically sized and aligned between
32-bit and 64-bit environments.

It's OK to have these problems for things designed a long time ago
before 32-bit/64-bit compat issues existed, but for new stuff no
way.
-
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/3] NetXen: 64-bit memory fixes, driver cleanup

2006-11-27 Thread Stephen Hemminger
On Thu, 23 Nov 2006 08:32:52 -0800
Sanjeev Jorapur <[EMAIL PROTECTED]> wrote:

> > 
> > You should then set the same value for pci_set_dma_mask, because then the 
> > IOMMU
> > can help. See both b44 or tg3 drivers, they have to deal with odd size 
> > masks.
> > I don't think you have to do all the bounce buffer work in the driver.
> > 
> 
> We had tried something like this earlier, but found that on some
> platforms (Opteron, IA64), we got kernel panics when the kernel
> ran out of translation entries.

That's a bug, it should be fixed there.  It would make sense to reduce the size
of the Tx queue if not enough translation entries were available.
-
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: Kevent POSIX timers support.

2006-11-27 Thread Ulrich Drepper

Evgeniy Polyakov wrote:
We need to pass the data in the sigev_value meember of the struct 
sigevent structure passed to timer_create to the caller.  I don't see it 
being done here nor when the timer is created.  Do I miss something? 
The sigev_value value should be stored in the user/ptr member of struct 
ukevent.


sigev_value was stored in k_itimer structure, I just do not know where
to put it in the ukevent provided to userspace - it can be placed in
pointer value if you like.


sigev_value is a union and the largest element is a pointer.  So, 
transporting the pointer value is sufficient and it should be passed up 
to the user in the ptr member of struct ukevent.


--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-
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 0/7][IP] IProute2 ip command updates

2006-11-27 Thread Stephen Hemminger
On Fri, 24 Nov 2006 12:31:23 +0900
Masahide NAKAMURA <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> # First of all, I'm sorry I sent wrong email two times from
> # "[EMAIL PROTECTED]" which is not a valid addresss.
> # Please delete them!
> 
> These are iproute2 updates. Please review and apply them.
> 
> o Modify IPv6 address lifetimes
> o Introduce IPv6-over-IPv6 tunnel command
> 
> HEADLINES
> -
> 
> [IP] ADDR: Fix print format for lifetimes.
> [IP] ADDR: Enable to add IPv6 address with valid/preferred lifetime.
> [IP] ADDR: Add the 'change' and 'replace' commands to the IPv6 address 
> manipulation conte
> xt.
> [IP] ADDR: Define 0xU as INFINITY_LIFE_TIME regarding to the 
> kernel.
> [IP] TUNNEL: Split common functions to export them.
> [IP] TUNNEL: Import ip6tunnel.c.
> [IP] TUNNEL: IPv6-over-IPv6 tunnel support.
> 
> DIFFSTAT
> 
> 
>  include/linux/ip6_tunnel.h |   34 
>  ip/Makefile|2
>  ip/ip6tunnel.c |  387 
> 
>  ip/ip_common.h |5 +
>  ip/ipaddress.c |   74 +++-
>  ip/iptunnel.c  |  175 
>  ip/tunnel.c|  166 +++
>  ip/tunnel.h|   35 
>  8 files changed, 732 insertions(+), 146 deletions(-)
> 
> 

applied to git.
Plan is to put out new iproute2 release after 2.6.19 final
-
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] [UDP(-Lite)]: consolidate v4 and v6 get|setsockopt code

2006-11-27 Thread Gerrit Renker
Quoting David Miller:
|  >   if (level == SOL_UDP  ||  level == SOL_UDPLITE)
|  > - return do_udpv6_setsockopt(sk, level, optname, optval, 
optlen);
|  > + return udp_lib_setsockopt(sk, level, optname, optval, optlen,
|  > +   udp_v6_push_pending_frames         
);
|  >   return compat_ipv6_setsockopt(sk, level, optname, optval, optlen);
|  >  }
|  >  #endif
|  
|  Specifically, the space between the push_pending_frames final argument
|  passed and the closing parenthesis was removed.  Why did you put
|  that there?  It looks fugly :)
Thank you for ironing this out, and a nice euphemism, too |-) The intention was 
to match
the end of the arguments list in the preceding line. But it seems that my 
feeble attempts
to be neat here have not met with wide approval . still enjoying the 
euphemism :-)

Many thanks and best regards
Gerrit
-
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: [NETLINK]: Remove unused dst_pid field in netlink_skb_parms

2006-11-27 Thread David Miller
From: Thomas Graf <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 10:02:38 +0100

> The destination PID is passed directly to netlink_unicast()
> respectively netlink_multicast().
> 
> Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>

Nothing but assignments to that thing :-)  Good catch,
applied, thanks Thomas.
-
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] [UDP(-Lite)]: consolidate v4 and v6 get|setsockopt code

2006-11-27 Thread David Miller
From: Gerrit Renker <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 10:44:33 +

> [UDP(-Lite)]: consolidate v4 and v6 get|setsockopt code
> 
> This is for 2.6.20.
> 
> This patch consolidates set/getsockopt code between UDP(-Lite) v4 and 6. The 
> justification is that UDP(-Lite) is a transport-layer protocol and therefore
> the socket option code (at least in theory) should be AF-independent. 
> 
> Furthermore, there is the following code reduplication:
>  * do_udp{,v6}_getsockopt is 100% identical between v4 and v6
>  * do_udp{,v6}_setsockopt is identical up to the following differerence
>   --v4 in contrast to v4 additionally allows the experimental 
> encapsulation
>   types  UDP_ENCAP_ESPINUDP and UDP_ENCAP_ESPINUDP_NON_IKE
>   --the remainder is identical between v4 and v6
>I believe that this difference is of little relevance. 
> 
> The advantages in not duplicating twice almost completely identical code.
> 
> The patch further simplifies the interface of udp{,v6}_push_pending_frames,
> since for the second argument (struct udp_sock *up) it always holds that
> up = udp_sk(sk); where sk is the first function argument.
> 
> 
> Signed-off-by: Gerrit Renker  <[EMAIL PROTECTED]>

Applied, except that I fixed up the extraneous spaces here:

> @@ -1366,7 +1368,8 @@ int udp_setsockopt(struct sock *sk, int 
>  char __user *optval, int optlen)
>  {
>   if (level == SOL_UDP  ||  level == SOL_UDPLITE)
> - return do_udp_setsockopt(sk, level, optname, optval, optlen);
> + return udp_lib_setsockopt(sk, level, optname, optval, optlen,
> +   udp_push_pending_frames   );
>   return ip_setsockopt(sk, level, optname, optval, optlen);
>  }
>  
> @@ -1375,13 +1378,14 @@ int compat_udp_setsockopt(struct sock *s
> char __user *optval, int optlen)
>  {
>   if (level == SOL_UDP  ||  level == SOL_UDPLITE)
> - return do_udp_setsockopt(sk, level, optname, optval, optlen);
> + return udp_lib_setsockopt(sk, level, optname, optval, optlen,
> +   udp_push_pending_frames   );
>   return compat_ip_setsockopt(sk, level, optname, optval, optlen);
>  }
>  #endif

and here:

>  int udpv6_setsockopt(struct sock *sk, int level, int optname,
>char __user *optval, int optlen)
>  {
>   if (level == SOL_UDP  ||  level == SOL_UDPLITE)
> - return do_udpv6_setsockopt(sk, level, optname, optval, optlen);
> + return udp_lib_setsockopt(sk, level, optname, optval, optlen,
> +   udp_v6_push_pending_frames );
>   return ipv6_setsockopt(sk, level, optname, optval, optlen);
>  }
>  
> @@ -919,58 +860,17 @@ int compat_udpv6_setsockopt(struct sock 
>   char __user *optval, int optlen)
>  {
>   if (level == SOL_UDP  ||  level == SOL_UDPLITE)
> - return do_udpv6_setsockopt(sk, level, optname, optval, optlen);
> + return udp_lib_setsockopt(sk, level, optname, optval, optlen,
> +   udp_v6_push_pending_frames );
>   return compat_ipv6_setsockopt(sk, level, optname, optval, optlen);
>  }
>  #endif

Specifically, the space between the push_pending_frames final argument
passed and the closing parenthesis was removed.  Why did you put
that there?  It looks fugly :)
-
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: [RTNETLINK]: Add rtnl_put_cacheinfo() to unify some code

2006-11-27 Thread David Miller
From: Thomas Graf <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 10:13:20 +0100

> Resend: Need to export rtnl_put_cacheinfo() for IPv6
> 
> IPv4, IPv6, and DECNet all use struct rta_cacheinfo in a similiar
> way, therefore rtnl_put_cacheinfo() is added to reuse code.
> 
> Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>

Also applied, thanks Thomas.
-
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


netdev@vger.kernel.org

2006-11-27 Thread Auke Kok

Willy Tarreau wrote:

Hi guys,

I'm about to apply this fix to 2.4. 2.6 is not affected.
Do you have any objection ?


Willy,

you didn't CC netdev. linux-net is a users list, you didn't CC the maintainers of the 
driver. Please do this. We're more than happy to help, even for 2.4 kernels.



Patch looks good, please apply.

Acked-by: Auke Kok <[EMAIL PROTECTED]>

Cheers,

Auke




Thanks in advance,
Willy


From e716301a8829bd45e60ac48939afa80753534b59 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <[EMAIL PROTECTED]>
Date: Sat, 25 Nov 2006 22:11:36 +0100
Subject: [PATCH] e100: incorrect use of "&&" instead of "&"

In e100_do_ethtool_ioctl(), bdp->flags is a bitfield and is
checked for some bits but the AND operation is performed with
&& instead of &. Obvious fix is to use "&" as in all other
places. 2.6 does not seem affected.

Signed-off-by: Willy Tarreau <[EMAIL PROTECTED]>
---
 drivers/net/e100/e100_main.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e100/e100_main.c b/drivers/net/e100/e100_main.c
index c9d801a..d67a145 100644
--- a/drivers/net/e100/e100_main.c
+++ b/drivers/net/e100/e100_main.c
@@ -3292,11 +3292,11 @@ #ifdef  ETHTOOL_GPAUSEPARAM
if ((bdp->flags & IS_BACHELOR)
&& (bdp->params.b_params & PRM_FC)) {
epause.autoneg = 1;
-   if (bdp->flags && DF_LINK_FC_CAP) {
+   if (bdp->flags & DF_LINK_FC_CAP) {
epause.rx_pause = 1;
epause.tx_pause = 1;
}
-   if (bdp->flags && DF_LINK_FC_TX_ONLY)
+   if (bdp->flags & DF_LINK_FC_TX_ONLY)
epause.tx_pause = 1;
}
rc = copy_to_user(ifr->ifr_data, &epause, sizeof(epause))

-
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: VM deadlock avoidance

2006-11-27 Thread David Miller
From: Peter Zijlstra <[EMAIL PROTECTED]>
Date: Mon, 27 Nov 2006 15:06:25 +0100

> The patches definitely need more work but would you agree with the
> general direction I'm working in or would you suggest yet another
> direction?

You're definitely going to have to wait at least a week or so
before I can review anything serious, and in any event it needs
to be posted here so people can reply to the patch posting for
commentary, not stuck up on some random web site which makes
review terribly difficult.
-
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: [Cbe-oss-dev] [RFC][PATCH] spidernet: enable fiber autonegotiation

2006-11-27 Thread Arnd Bergmann
On Monday 27 November 2006 16:46, Jens Osterkamp wrote:
> Thanks for pointing me to this, I must have overlooked it. Some of it seems 
> only applicable to the Celleb copper interface, but some of it is quite 
> usable for us too.
> 
> Is it already queued upstream ?

No, I'm currently waiting for an updated series for Celleb, ported to
the latest kernel. The spidernet patch from this series has not yet
been submitted to netdev or jgarzik, AFAIK.

Arnd <><
-
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] softmac: remove netif_tx_disable when scanning

2006-11-27 Thread Michael Buesch
On Sunday 26 November 2006 17:37, Daniel Drake wrote:
> Johannes Berg wrote:
> > The problem is that queue disabling isn't refcounted so that a scan that
> > collides with bcm43xx having disabled the queue for calibration might
> > re-enable the queue while bcm43xx is still calibrating.
> 
> I agree with that part. However the other reason for the patch (transmit 
> queue needed for active scanning) is bogus, and the patch introduces a 
> problem where session frames may be transmitted during scanning (using 
> TX queue control avoids that problem).
> 
> > Clearly, this doesn't fully fix the problem because softmac will try to
> > transmit frames during the calibration. Hence, a proper fix would be to
> > not remove the calls to netif_tx_disable but make them go through
> > softmac (ieee80211_tx_disable) to make sure that softmac doesn't try to
> > scan while the queues are disabled, which would fix the aforementioned
> > problem of softmac enabling the queue while the driver needs it disabled
> > for free.
> 
> Stack-level refcounted TX control like this would also be beneficial for 
> zd1211rw, currently we have a semi-ugly implementation inside the driver.
> 
> > Also, for bcm43xx this isn't a problem since the firmware (optionally
> > but we use that afaik) takes care of not transmitting frames that are
> > tagged for a different channel than currently tuned to.
> 
> zd1211 has no such functionality :(
> 
> Michael Buesch wrote:
> > Softmac ignoring
> > this queue-disabled flag is just yet another bug.
> 
> Agreed, but this one isn't going to be fixed any time soon. This was the 
> first point I raised against softmac during early zd1211rw development a 
> long while back.
> 
> I agree with the objectives of this patch but the way I see it is that 
> it trades one bug for another. A proper solution, as suggested by 

Yeah, it trades one fat big bug against a very minor one.
AND!! Currently it's possible to transmit frames while scanning, too.
Don't forget that. Today we have both bugs. With this patch we have only
one left. The only "issue" is that today the "transmit packet while
scanning" bug is less likely to trigger. But it's still possible (because
of disabling not being refcounted).

> Johannes (refcounted stack-level TX control) would not be hard to 
> implement and would solve the bug without introducing another.

So, please do so.
But please apply this one regardless of what you do. ;)
It fixes a nasty kind of bug. With this trivial to fix bug
in the tree I won't look at periodic work "bugs" anymore, that
are reported now and then, because I really thing they are all
caused by this hidden bug.
I also saw a real life bugreport of the asserion in the DMA code
triggering. I didn't know back than how that was possible to happen,
but now I know.

Besides that, what's the problem with some bogus frames being transmitted
throughout the short period of scanning? I don't really see how that
can hurt anyone (besides consuming minor bandwidth).

I already said it in the past. We _have_ to trade one bug for the other
in softmac, because it's buggy by design. And it really doesn't make sense
to fix them all. Well, actually it does. Because fixing all these bugs
would mean replacing softmac by d80211. There's no real other way. ;)

-- 
Greetings Michael.
-
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: [Cbe-oss-dev] [RFC][PATCH] spidernet: enable fiber autonegotiation

2006-11-27 Thread Jens Osterkamp

> There was a patch from Ishizaki Kou recently, to set up autonegotiate
> and other things, see http://patchwork.ozlabs.org/linuxppc/patch?id=8121 .
>
> Are you sure that you don't need any of those changes as well?

Thanks for pointing me to this, I must have overlooked it. Some of it seems 
only applicable to the Celleb copper interface, but some of it is quite 
usable for us too.

Is it already queued upstream ?

Jens
-
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: [Cbe-oss-dev] [RFC][PATCH] spidernet: enable fiber autonegotiation

2006-11-27 Thread Arnd Bergmann
On Monday 27 November 2006 15:47, Jens Osterkamp wrote:
> 
> While experimenting with a copper passthrough module in bladecenter I found 
> out that this needs autonegotiation enabled in order to work properly.
> This quick hack enables it with the sideeffect of breaking other bladecenter 
> switch configurations.
> If anyone has any suggestions or has experimented with the same 
> configuration, 
> feel free to comment.

There was a patch from Ishizaki Kou recently, to set up autonegotiate
and other things, see http://patchwork.ozlabs.org/linuxppc/patch?id=8121 .

Are you sure that you don't need any of those changes as well?

Arnd <><
-
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


[RFC][PATCH] spidernet: enable fiber autonegotiation

2006-11-27 Thread Jens Osterkamp

While experimenting with a copper passthrough module in bladecenter I found 
out that this needs autonegotiation enabled in order to work properly.
This quick hack enables it with the sideeffect of breaking other bladecenter 
switch configurations.
If anyone has any suggestions or has experimented with the same configuration, 
feel free to comment.

This patch is not meant for inclusion into mainline.

Signed-off-by: Jens Osterkamp <[EMAIL PROTECTED]>

Index: linux-2.6.19-rc6/drivers/net/spider_net.c
===
--- linux-2.6.19-rc6.orig/drivers/net/spider_net.c
+++ linux-2.6.19-rc6/drivers/net/spider_net.c
@@ -1724,8 +1724,10 @@ spider_net_setup_phy(struct spider_net_c
  phy->mdio_read = spider_net_read_phy;
  phy->mdio_write = spider_net_write_phy;
 
+ /* reset phy, read id and setup phy struct with phy ops*/
  mii_phy_probe(phy, phy->mii_id);
 
+ /* write fix speed and duplex to BMCR */
  if (phy->def->ops->setup_forced)
   phy->def->ops->setup_forced(phy, SPEED_1000, DUPLEX_FULL);
 
Index: linux-2.6.19-rc6/drivers/net/sungem_phy.c
===
--- linux-2.6.19-rc6.orig/drivers/net/sungem_phy.c
+++ linux-2.6.19-rc6/drivers/net/sungem_phy.c
@@ -335,10 +335,6 @@ static int bcm5421_enable_fiber(struct m
  /* LEDs active in both modes, autosense prio = fiber */
  phy_write(phy, MII_NCONFIG, 0x945f);
 
- /* switch off fibre autoneg */
- phy_write(phy, MII_NCONFIG, 0xfc01);
- phy_write(phy, 0x0b, 0x0004);
-
  return 0;
 }
 
@@ -347,7 +343,7 @@ static int bcm5461_enable_fiber(struct m
  phy_write(phy, MII_NCONFIG, 0xfc0c);
  phy_write(phy, MII_BMCR, 0x4140);
  phy_write(phy, MII_NCONFIG, 0xfc0b);
- phy_write(phy, MII_BMCR, 0x0140);
+ phy_write(phy, MII_BMCR, 0x1140);
 
  return 0;
 }
-
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: Intel 82559 NIC corrupted EEPROM

2006-11-27 Thread John

John wrote:


-0009 : System RAM
000a-000b : Video RAM area
000f-000f : System ROM
0010-0ffe : System RAM
  0010-00296a1a : Kernel code
  00296a1b-0031bbe7 : Kernel data
0fff-0fff2fff : ACPI Non-volatile Storage
0fff3000-0fff : ACPI Tables
2000-200f : :00:08.0
2010-201f : :00:09.0
2020-202f : :00:0a.0
e000-e3ff : :00:00.0
e500-e50f : :00:08.0
e510-e51f : :00:09.0
e520-e52f : :00:0a.0
e530-e5300fff : :00:08.0
e5301000-e5301fff : :00:0a.0
e5302000-e5302fff : :00:09.0
- : reserved

I've also attached:

o config-2.6.18.1-adlink used to compile this kernel
o dmesg output after the machine boots


I suppose the information I've sent is not enough to locate the
root of the problem. Is there more I can provide?


Here is some context for those who have been added to the CC list:
http://groups.google.com/group/linux.kernel/browse_frm/thread/bdc8fd08fb601c26

As far as I understand, some consider the eepro100 driver to be 
obsolete, and it has been considered for removal.


What is the current status?

Unfortunately, e100 does not work out-of-the-box on this system.

Is there something I can do to improve the situation?

--
Regards,

John

[ E-mail address is a bit-bucket. I *do* monitor the mailing lists. ]

-
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


VM deadlock avoidance

2006-11-27 Thread Peter Zijlstra
Hi Dave,

I have a new version of these patches; I'm still using SOCK_VMIO socket
tagging and skb->emergency marks, since I have not come up with another
approach that might work and my RFC to netdev has so far been ignored.

Other than this though, it changed quite a bit;
 - I now use the regular allocation paths and cover all allocations
needed to process a skb (although the RX pool sizing might need more
variables)
 - The emergency RX pool size is based on ip[46]frag_high_thresh and
ip[46]_rt_max_size so that fragment assembly and dst route cache
allocations cannot exhaust the memory. (more paths need analysis xfrm,
conntrack?)
 - skb->emergency packets skip taps
 - skb->emergency packets warn about and ignores NF_QUEUE targets

http://programming.kicks-ass.net/kernel-patches/vm_deadlock/v9/

The patches definitely need more work but would you agree with the
general direction I'm working in or would you suggest yet another
direction?

Kind regards,

Peter

-
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][NET_SCHED] sch_htb: turn intermediate classes into leaves

2006-11-27 Thread Jarek Poplawski
On Mon, Nov 27, 2006 at 11:12:23AM +0100, Patrick McHardy wrote:
> Jarek Poplawski wrote:
> > Here is a trial to do something suggested by Patrick McHardy. 
> > 
> > [NET_SCHED] sch_htb:
> > 
> > - turn intermediate classes into leaves again when their last child is 
> > deleted
> >   (qdisc of deleted class is reused; struct htb_class changed)
> >   
> > - sch_tree_lock added in htb_put before htb_destroy_class
> >   (for consistency with htb_delete and htb_destroy) - my own suggestion
> 
> ->put() doesn't need the lock - if a class is deleted it must be
> completely unlinked in ->delete().

Could you give me some hint why not unlock before
htb_destroy_class call in htb_delete, please?

> > PS: qdisc_reset added to htb_delete by P. McHardy's patch: "perform qlen
> > adjustment immediately in ->delete" should be reconsidered.
> 
> No, that is a necessary fix, even though it only causes a
> shortly visible error.
> 
> > diff -Nurp linux-2.6.19-rc6-/net/sched/sch_htb.c 
> > linux-2.6.19-rc6/net/sched/sch_htb.c
> > --- linux-2.6.19-rc6-/net/sched/sch_htb.c   2006-11-16 20:46:08.0 
> > +0100
> > +++ linux-2.6.19-rc6/net/sched/sch_htb.c2006-11-26 22:54:15.0 
> > +0100
> > @@ -147,6 +147,10 @@ struct htb_class {
> > psched_tdiff_t mbuffer; /* max wait time */
> > long tokens, ctokens;   /* current number of tokens */
> > psched_time_t t_c;  /* checkpoint time */
> > +   
> > +   int prio;   /* For parent to leaf return possible here */
> > +   int quantum;/* we do backup. Finally full replacement  */
> > +   /* of un.leaf originals should be done. */
> >  };
> >  
> >  /* TODO: maybe compute rate when size is too large .. or drop ? */
> > @@ -1266,6 +1270,37 @@ static void htb_destroy_filters(struct t
> > }
> >  }
> >  
> > +static void htb_parent_to_leaf(struct htb_sched *q, struct htb_class *cl)
> > +{
> > +   struct htb_class *parent = cl->parent;
> > +
> > +   if (!parent)
> > +   /* the root class */
> > +   return;
> > +
> > +   BUG_TRAP(!cl->level && cl->un.leaf.q && !cl->prio_activity);
> > +
> > +   if (!(parent->children.next == &cl->sibling &&
> > +   parent->children.prev == &cl->sibling))
> > +   /* not the last child */
> > +   return; 
> > +
> > +   parent->level = 0;
> > +   memset(&parent->un.inner, 0, sizeof(parent->un.inner));
> > +   INIT_LIST_HEAD(&parent->un.leaf.drop_list);
> > +   parent->un.leaf.q = cl->un.leaf.q;
> > +   cl->un.leaf.q = &noop_qdisc;
> 
> default pfifo would be a better choice. Might be a bit ugly

I considered this unnecessary risk. But it can be done as you
like. If I understand, you are not sure yet. 

> though because you're holding the qdisc lock here and can't
> call qdisc_create_dflt. Since you're already keeping backup
> values from the union we could consider just turning it into
> two seperate structures and keep the child qdisc when turning
> a class into a parent.

I've thought about this but it seems there could still be some
memory saving with the union - probably - with large number of
inner classes. 

> > +   parent->un.leaf.quantum = parent->quantum;
> > +   parent->un.leaf.prio = parent->prio;
> > +   parent->tokens = parent->buffer;
> > +   parent->ctokens = parent->cbuffer;
> > +   PSCHED_GET_TIME(parent->t_c);
> > +   parent->cmode = HTB_CAN_SEND;
> > +
> > +   if (parent->un.leaf.q->q.qlen)
> > +   htb_activate(q, parent);
> 
> Not possible right now and even if we reuse the old child qdisc
> it should be empty.

I'll remove this but then qdisc_reset have to be added.
Or maybe I should forget rc6 and redo this only on top
of your patch?

> > +}
> > +
> >  static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
> >  {
> > struct htb_sched *q = qdisc_priv(sch);
> > @@ -1337,6 +1372,9 @@ static int htb_delete(struct Qdisc *sch,
> > if (cl->prio_activity)
> > htb_deactivate(q, cl);
> >  
> > +   if (!cl->level)
> > +   htb_parent_to_leaf(q, cl);
> > +   
> 
> You have to manually adjust the classes level before checking for
> zero, it is not done currently.

Could you explain? Probably I miss something here.

> 
> > if (--cl->refcnt == 0)
> > htb_destroy_class(sch, cl);
> >  
> > @@ -1348,8 +1386,11 @@ static void htb_put(struct Qdisc *sch, u
> >  {
> > struct htb_class *cl = (struct htb_class *)arg;
> >  
> > -   if (--cl->refcnt == 0)
> > +   if (--cl->refcnt == 0) {
> > +   sch_tree_lock(sch);
> > htb_destroy_class(sch, cl);
> > +   sch_tree_unlock(sch);
> > +   }
> >  }
> 
> See above.
> 
> 
> 
-
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: [2.6 patch] kill net/rxrpc/rxrpc_syms.c

2006-11-27 Thread David Howells
Adrian Bunk <[EMAIL PROTECTED]> wrote:

> This patch moves the EXPORT_SYMBOL's from net/rxrpc/rxrpc_syms.c to the 
> files with the actual functions.

You can if you like.  Can you slap a blank line before each EXPORT_SYMBOL()
though please?

David
-
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] [UDP(-Lite)]: consolidate v4 and v6 get|setsockopt code

2006-11-27 Thread Gerrit Renker
[UDP(-Lite)]: consolidate v4 and v6 get|setsockopt code

This is for 2.6.20.

This patch consolidates set/getsockopt code between UDP(-Lite) v4 and 6. The 
justification is that UDP(-Lite) is a transport-layer protocol and therefore
the socket option code (at least in theory) should be AF-independent. 

Furthermore, there is the following code reduplication:
 * do_udp{,v6}_getsockopt is 100% identical between v4 and v6
 * do_udp{,v6}_setsockopt is identical up to the following differerence
--v4 in contrast to v4 additionally allows the experimental 
encapsulation
  types  UDP_ENCAP_ESPINUDP and UDP_ENCAP_ESPINUDP_NON_IKE
--the remainder is identical between v4 and v6
   I believe that this difference is of little relevance. 

The advantages in not duplicating twice almost completely identical code.

The patch further simplifies the interface of udp{,v6}_push_pending_frames,
since for the second argument (struct udp_sock *up) it always holds that
up = udp_sk(sk); where sk is the first function argument.


Signed-off-by: Gerrit Renker  <[EMAIL PROTECTED]>
---
 include/net/udp.h |5 ++
 net/ipv4/udp.c|   30 -
 net/ipv6/udp.c|  118 --
 3 files changed, 32 insertions(+), 121 deletions(-)



diff --git a/include/net/udp.h b/include/net/udp.h
index eac69ff..1548d68 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -134,6 +134,11 @@ extern int udp_ioctl(struct sock *sk, in
 extern int udp_disconnect(struct sock *sk, int flags);
 extern unsigned int udp_poll(struct file *file, struct socket *sock,
 poll_table *wait);
+extern int udp_lib_getsockopt(struct sock *sk, int level, int optname,
+  char __user *optval, int __user *optlen);
+extern int udp_lib_setsockopt(struct sock *sk, int level, int optname,
+  char __user *optval, int optlen,
+  int (*push_pending_frames)(struct sock *));
 
 DECLARE_SNMP_STAT(struct udp_mib, udp_statistics);
 /*
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 74a62cd..b9606fa 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -448,8 +448,9 @@ static void udp4_hwcsum_outgoing(struct 
 /*
  * Push out all pending data as one UDP datagram. Socket is locked.
  */
-static int udp_push_pending_frames(struct sock *sk, struct udp_sock *up)
+static int udp_push_pending_frames(struct sock *sk)
 {
+   struct udp_sock  *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct flowi *fl = &inet->cork.fl;
struct sk_buff *skb;
@@ -673,7 +674,7 @@ do_append_data:
if (err)
udp_flush_pending_frames(sk);
else if (!corkreq)
-   err = udp_push_pending_frames(sk, up);
+   err = udp_push_pending_frames(sk);
else if (unlikely(skb_queue_empty(&sk->sk_write_queue)))
up->pending = 0;
release_sock(sk);
@@ -746,7 +747,7 @@ int udp_sendpage(struct sock *sk, struct
 
up->len += size;
if (!(up->corkflag || (flags&MSG_MORE)))
-   ret = udp_push_pending_frames(sk, up);
+   ret = udp_push_pending_frames(sk);
if (!ret)
ret = size;
 out:
@@ -1290,8 +1291,9 @@ int udp_destroy_sock(struct sock *sk)
 /*
  * Socket option code for UDP
  */
-static int do_udp_setsockopt(struct sock *sk, int level, int optname,
- char __user *optval, int optlen)
+int udp_lib_setsockopt(struct sock *sk, int level, int optname,
+  char __user *optval, int optlen,
+  int (*push_pending_frames)(struct sock *))
 {
struct udp_sock *up = udp_sk(sk);
int val;
@@ -1310,7 +1312,7 @@ static int do_udp_setsockopt(struct sock
} else {
up->corkflag = 0;
lock_sock(sk);
-   udp_push_pending_frames(sk, up);
+   (*push_pending_frames)(sk);
release_sock(sk);
}
break;
@@ -1366,7 +1368,8 @@ int udp_setsockopt(struct sock *sk, int 
   char __user *optval, int optlen)
 {
if (level == SOL_UDP  ||  level == SOL_UDPLITE)
-   return do_udp_setsockopt(sk, level, optname, optval, optlen);
+   return udp_lib_setsockopt(sk, level, optname, optval, optlen,
+ udp_push_pending_frames   );
return ip_setsockopt(sk, level, optname, optval, optlen);
 }
 
@@ -1375,13 +1378,14 @@ int compat_udp_setsockopt(struct sock *s
  char __user *optval, int optlen)
 {
if (level == SOL_UDP  ||  level == SOL_UDPLITE)
-   return do_udp_setsockopt(sk, level, optname, optval, optlen);
+   return udp_lib_setsockopt(sk, level, optname, optval, optlen,
+  

Re: [PATCH][NET_SCHED] sch_cbq: deactivating when grafting, purging etc.

2006-11-27 Thread Patrick McHardy
Jarek Poplawski wrote:
> On Mon, Nov 27, 2006 at 10:55:39AM +0100, Patrick McHardy wrote:
> 
>>Your patch looks good, but it conflicts with my patches.
> 
> 
> I know, but I wasn't sure which version this changes
> are needed for. If there will be something more to do,
> name the version, please. 

Just add it on top of them. They apply cleanly to the current
-git tree.

>>One thing I forgot to mention is that it should also have
>>a callback for deactivating classes when their childs
>>become empty. If you do that you can just call
>>disc_tree_decrement_qlen in graft/delete, which will take
>>care of the qlen decrement and class deactivation.
> 
>  
> If I understand correctly I should apply this to 
> the version after your patch (plus the missing cbq part
> of "endless loops"). I'll try.

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][NET_SCHED] sch_cbq: deactivating when grafting, purging etc.

2006-11-27 Thread Jarek Poplawski
On Mon, Nov 27, 2006 at 10:55:39AM +0100, Patrick McHardy wrote:
> Jarek Poplawski wrote:
> > Here are some fixes proposals suggested by Patrick McHardy.
> > 
> > [NET_SCHED] sch_cbq:
> > 
> > - deactivating of active classes when grafting
> > 
> > - purging of queue/q.qlen adjustment when deleting an active class
> > 
> > - deactivating of active classes when q.qlen drops to zero in ->drop()
> > 
> > - a redundant instruction removed from cbq_deactivate_class (my own
> >   suggestion)
> > 
> > PS: - purging of queue and deactivating of active classes
> > when attaching a new child - not done (according to man, CBQ can carry
> > packets in any type of nodes).
> 
> 
> Your patch looks good, but it conflicts with my patches.

I know, but I wasn't sure which version this changes
are needed for. If there will be something more to do,
name the version, please. 
 
> One thing I forgot to mention is that it should also have
> a callback for deactivating classes when their childs
> become empty. If you do that you can just call
> disc_tree_decrement_qlen in graft/delete, which will take
> care of the qlen decrement and class deactivation.
 
If I understand correctly I should apply this to 
the version after your patch (plus the missing cbq part
of "endless loops"). I'll try.

-
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][NET_SCHED] sch_htb: turn intermediate classes into leaves

2006-11-27 Thread Patrick McHardy
Jarek Poplawski wrote:
> Here is a trial to do something suggested by Patrick McHardy. 
> 
> [NET_SCHED] sch_htb:
> 
> - turn intermediate classes into leaves again when their last child is deleted
>   (qdisc of deleted class is reused; struct htb_class changed)
>   
> - sch_tree_lock added in htb_put before htb_destroy_class
>   (for consistency with htb_delete and htb_destroy) - my own suggestion

->put() doesn't need the lock - if a class is deleted it must be
completely unlinked in ->delete().

> PS: qdisc_reset added to htb_delete by P. McHardy's patch: "perform qlen
> adjustment immediately in ->delete" should be reconsidered.

No, that is a necessary fix, even though it only causes a
shortly visible error.

> diff -Nurp linux-2.6.19-rc6-/net/sched/sch_htb.c 
> linux-2.6.19-rc6/net/sched/sch_htb.c
> --- linux-2.6.19-rc6-/net/sched/sch_htb.c 2006-11-16 20:46:08.0 
> +0100
> +++ linux-2.6.19-rc6/net/sched/sch_htb.c  2006-11-26 22:54:15.0 
> +0100
> @@ -147,6 +147,10 @@ struct htb_class {
>   psched_tdiff_t mbuffer; /* max wait time */
>   long tokens, ctokens;   /* current number of tokens */
>   psched_time_t t_c;  /* checkpoint time */
> + 
> + int prio;   /* For parent to leaf return possible here */
> + int quantum;/* we do backup. Finally full replacement  */
> + /* of un.leaf originals should be done. */
>  };
>  
>  /* TODO: maybe compute rate when size is too large .. or drop ? */
> @@ -1266,6 +1270,37 @@ static void htb_destroy_filters(struct t
>   }
>  }
>  
> +static void htb_parent_to_leaf(struct htb_sched *q, struct htb_class *cl)
> +{
> + struct htb_class *parent = cl->parent;
> +
> + if (!parent)
> + /* the root class */
> + return;
> +
> + BUG_TRAP(!cl->level && cl->un.leaf.q && !cl->prio_activity);
> +
> + if (!(parent->children.next == &cl->sibling &&
> + parent->children.prev == &cl->sibling))
> + /* not the last child */
> + return; 
> +
> + parent->level = 0;
> + memset(&parent->un.inner, 0, sizeof(parent->un.inner));
> + INIT_LIST_HEAD(&parent->un.leaf.drop_list);
> + parent->un.leaf.q = cl->un.leaf.q;
> + cl->un.leaf.q = &noop_qdisc;

default pfifo would be a better choice. Might be a bit ugly
though because you're holding the qdisc lock here and can't
call qdisc_create_dflt. Since you're already keeping backup
values from the union we could consider just turning it into
two seperate structures and keep the child qdisc when turning
a class into a parent.

> + parent->un.leaf.quantum = parent->quantum;
> + parent->un.leaf.prio = parent->prio;
> + parent->tokens = parent->buffer;
> + parent->ctokens = parent->cbuffer;
> + PSCHED_GET_TIME(parent->t_c);
> + parent->cmode = HTB_CAN_SEND;
> +
> + if (parent->un.leaf.q->q.qlen)
> + htb_activate(q, parent);

Not possible right now and even if we reuse the old child qdisc
it should be empty.

> +}
> +
>  static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
>  {
>   struct htb_sched *q = qdisc_priv(sch);
> @@ -1337,6 +1372,9 @@ static int htb_delete(struct Qdisc *sch,
>   if (cl->prio_activity)
>   htb_deactivate(q, cl);
>  
> + if (!cl->level)
> + htb_parent_to_leaf(q, cl);
> + 

You have to manually adjust the classes level before checking for
zero, it is not done currently.

>   if (--cl->refcnt == 0)
>   htb_destroy_class(sch, cl);
>  
> @@ -1348,8 +1386,11 @@ static void htb_put(struct Qdisc *sch, u
>  {
>   struct htb_class *cl = (struct htb_class *)arg;
>  
> - if (--cl->refcnt == 0)
> + if (--cl->refcnt == 0) {
> + sch_tree_lock(sch);
>   htb_destroy_class(sch, cl);
> + sch_tree_unlock(sch);
> + }
>  }

See above.


-
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][NET_SCHED] sch_cbq: deactivating when grafting, purging etc.

2006-11-27 Thread Patrick McHardy
Jarek Poplawski wrote:
> Here are some fixes proposals suggested by Patrick McHardy.
> 
> [NET_SCHED] sch_cbq:
> 
> - deactivating of active classes when grafting
> 
> - purging of queue/q.qlen adjustment when deleting an active class
> 
> - deactivating of active classes when q.qlen drops to zero in ->drop()
> 
> - a redundant instruction removed from cbq_deactivate_class (my own
>   suggestion)
> 
> PS: - purging of queue and deactivating of active classes
> when attaching a new child - not done (according to man, CBQ can carry
> packets in any type of nodes).


Your patch looks good, but it conflicts with my patches.

One thing I forgot to mention is that it should also have
a callback for deactivating classes when their childs
become empty. If you do that you can just call
disc_tree_decrement_qlen in graft/delete, which will take
care of the qlen decrement and class deactivation.
-
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


[RTNETLINK]: Add rtnl_put_cacheinfo() to unify some code

2006-11-27 Thread Thomas Graf
Resend: Need to export rtnl_put_cacheinfo() for IPv6

IPv4, IPv6, and DECNet all use struct rta_cacheinfo in a similiar
way, therefore rtnl_put_cacheinfo() is added to reuse code.

Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>

Index: net-2.6.20/net/core/rtnetlink.c
===
--- net-2.6.20.orig/net/core/rtnetlink.c2006-11-25 15:35:26.0 
+0100
+++ net-2.6.20/net/core/rtnetlink.c 2006-11-27 10:04:27.0 +0100
@@ -212,6 +212,26 @@
return nla_nest_cancel(skb, mx);
 }
 
+int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id,
+  u32 ts, u32 tsage, long expires, u32 error)
+{
+   struct rta_cacheinfo ci = {
+   .rta_lastuse = jiffies_to_clock_t(jiffies - dst->lastuse),
+   .rta_used = dst->__use,
+   .rta_clntref = atomic_read(&(dst->__refcnt)),
+   .rta_error = error,
+   .rta_id =  id,
+   .rta_ts = ts,
+   .rta_tsage = tsage,
+   };
+
+   if (expires)
+   ci.rta_expires = jiffies_to_clock_t(expires);
+
+   return nla_put(skb, RTA_CACHEINFO, sizeof(ci), &ci);
+}
+
+EXPORT_SYMBOL_GPL(rtnl_put_cacheinfo);
 
 static void set_operstate(struct net_device *dev, unsigned char transition)
 {
Index: net-2.6.20/include/linux/rtnetlink.h
===
--- net-2.6.20.orig/include/linux/rtnetlink.h   2006-11-25 15:35:26.0 
+0100
+++ net-2.6.20/include/linux/rtnetlink.h2006-11-25 16:09:50.0 
+0100
@@ -585,6 +585,9 @@
   struct nlmsghdr *nlh, gfp_t flags);
 extern void rtnl_set_sk_err(u32 group, int error);
 extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
+extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst,
+ u32 id, u32 ts, u32 tsage, long expires,
+ u32 error);
 
 extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const 
void *data);
 
Index: net-2.6.20/net/ipv4/route.c
===
--- net-2.6.20.orig/net/ipv4/route.c2006-11-25 15:35:26.0 +0100
+++ net-2.6.20/net/ipv4/route.c 2006-11-25 16:09:50.0 +0100
@@ -2629,7 +2629,8 @@
struct rtable *rt = (struct rtable*)skb->dst;
struct rtmsg *r;
struct nlmsghdr *nlh;
-   struct rta_cacheinfo ci;
+   long expires;
+   u32 id = 0, ts = 0, tsage = 0, error;
 
nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags);
if (nlh == NULL)
@@ -2676,20 +2677,13 @@
if (rtnetlink_put_metrics(skb, rt->u.dst.metrics) < 0)
goto nla_put_failure;
 
-   ci.rta_lastuse  = jiffies_to_clock_t(jiffies - rt->u.dst.lastuse);
-   ci.rta_used = rt->u.dst.__use;
-   ci.rta_clntref  = atomic_read(&rt->u.dst.__refcnt);
-   if (rt->u.dst.expires)
-   ci.rta_expires = jiffies_to_clock_t(rt->u.dst.expires - 
jiffies);
-   else
-   ci.rta_expires = 0;
-   ci.rta_error= rt->u.dst.error;
-   ci.rta_id   = ci.rta_ts = ci.rta_tsage = 0;
+   error = rt->u.dst.error;
+   expires = rt->u.dst.expires ? rt->u.dst.expires - jiffies : 0;
if (rt->peer) {
-   ci.rta_id = rt->peer->ip_id_count;
+   id = rt->peer->ip_id_count;
if (rt->peer->tcp_ts_stamp) {
-   ci.rta_ts = rt->peer->tcp_ts;
-   ci.rta_tsage = xtime.tv_sec - rt->peer->tcp_ts_stamp;
+   ts = rt->peer->tcp_ts;
+   tsage = xtime.tv_sec - rt->peer->tcp_ts_stamp;
}
}
 
@@ -2708,7 +2702,7 @@
} else {
if (err == -EMSGSIZE)
goto nla_put_failure;
-   ci.rta_error = err;
+   error = err;
}
}
} else
@@ -2716,7 +2710,9 @@
NLA_PUT_U32(skb, RTA_IIF, rt->fl.iif);
}
 
-   NLA_PUT(skb, RTA_CACHEINFO, sizeof(ci), &ci);
+   if (rtnl_put_cacheinfo(skb, &rt->u.dst, id, ts, tsage,
+  expires, error) < 0)
+   goto nla_put_failure;
 
return nlmsg_end(skb, nlh);
 
Index: net-2.6.20/net/ipv6/route.c
===
--- net-2.6.20.orig/net/ipv6/route.c2006-11-25 15:35:26.0 +0100
+++ net-2.6.20/net/ipv6/route.c 2006-11-26 14:58:57.0 +0100
@@ -2026,7 +2026,7 @@
 {
struct rtmsg *rtm;
struct nlmsghdr *nlh;
-   struct rta_cacheinfo ci;
+   long expires;
u32 table;
 
if (prefix) {   /* user wants prefix routes only */
@@

[RTNETLINK]: Add rtnl_put_cacheinfo() to unify some code

2006-11-27 Thread Thomas Graf
IPv4, IPv6, and DECNet all use struct rta_cacheinfo in a similiar
way, therefore rtnl_put_cacheinfo() is added to reuse code.

Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>

Index: net-2.6.20/net/core/rtnetlink.c
===
--- net-2.6.20.orig/net/core/rtnetlink.c2006-11-25 15:35:26.0 
+0100
+++ net-2.6.20/net/core/rtnetlink.c 2006-11-25 16:09:50.0 +0100
@@ -212,6 +212,24 @@
return nla_nest_cancel(skb, mx);
 }
 
+int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id,
+  u32 ts, u32 tsage, long expires, u32 error)
+{
+   struct rta_cacheinfo ci = {
+   .rta_lastuse = jiffies_to_clock_t(jiffies - dst->lastuse),
+   .rta_used = dst->__use,
+   .rta_clntref = atomic_read(&(dst->__refcnt)),
+   .rta_error = error,
+   .rta_id =  id,
+   .rta_ts = ts,
+   .rta_tsage = tsage,
+   };
+
+   if (expires)
+   ci.rta_expires = jiffies_to_clock_t(expires);
+
+   return nla_put(skb, RTA_CACHEINFO, sizeof(ci), &ci);
+}
 
 static void set_operstate(struct net_device *dev, unsigned char transition)
 {
Index: net-2.6.20/include/linux/rtnetlink.h
===
--- net-2.6.20.orig/include/linux/rtnetlink.h   2006-11-25 15:35:26.0 
+0100
+++ net-2.6.20/include/linux/rtnetlink.h2006-11-25 16:09:50.0 
+0100
@@ -585,6 +585,9 @@
   struct nlmsghdr *nlh, gfp_t flags);
 extern void rtnl_set_sk_err(u32 group, int error);
 extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
+extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst,
+ u32 id, u32 ts, u32 tsage, long expires,
+ u32 error);
 
 extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const 
void *data);
 
Index: net-2.6.20/net/ipv4/route.c
===
--- net-2.6.20.orig/net/ipv4/route.c2006-11-25 15:35:26.0 +0100
+++ net-2.6.20/net/ipv4/route.c 2006-11-25 16:09:50.0 +0100
@@ -2629,7 +2629,8 @@
struct rtable *rt = (struct rtable*)skb->dst;
struct rtmsg *r;
struct nlmsghdr *nlh;
-   struct rta_cacheinfo ci;
+   long expires;
+   u32 id = 0, ts = 0, tsage = 0, error;
 
nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags);
if (nlh == NULL)
@@ -2676,20 +2677,13 @@
if (rtnetlink_put_metrics(skb, rt->u.dst.metrics) < 0)
goto nla_put_failure;
 
-   ci.rta_lastuse  = jiffies_to_clock_t(jiffies - rt->u.dst.lastuse);
-   ci.rta_used = rt->u.dst.__use;
-   ci.rta_clntref  = atomic_read(&rt->u.dst.__refcnt);
-   if (rt->u.dst.expires)
-   ci.rta_expires = jiffies_to_clock_t(rt->u.dst.expires - 
jiffies);
-   else
-   ci.rta_expires = 0;
-   ci.rta_error= rt->u.dst.error;
-   ci.rta_id   = ci.rta_ts = ci.rta_tsage = 0;
+   error = rt->u.dst.error;
+   expires = rt->u.dst.expires ? rt->u.dst.expires - jiffies : 0;
if (rt->peer) {
-   ci.rta_id = rt->peer->ip_id_count;
+   id = rt->peer->ip_id_count;
if (rt->peer->tcp_ts_stamp) {
-   ci.rta_ts = rt->peer->tcp_ts;
-   ci.rta_tsage = xtime.tv_sec - rt->peer->tcp_ts_stamp;
+   ts = rt->peer->tcp_ts;
+   tsage = xtime.tv_sec - rt->peer->tcp_ts_stamp;
}
}
 
@@ -2708,7 +2702,7 @@
} else {
if (err == -EMSGSIZE)
goto nla_put_failure;
-   ci.rta_error = err;
+   error = err;
}
}
} else
@@ -2716,7 +2710,9 @@
NLA_PUT_U32(skb, RTA_IIF, rt->fl.iif);
}
 
-   NLA_PUT(skb, RTA_CACHEINFO, sizeof(ci), &ci);
+   if (rtnl_put_cacheinfo(skb, &rt->u.dst, id, ts, tsage,
+  expires, error) < 0)
+   goto nla_put_failure;
 
return nlmsg_end(skb, nlh);
 
Index: net-2.6.20/net/ipv6/route.c
===
--- net-2.6.20.orig/net/ipv6/route.c2006-11-25 15:35:26.0 +0100
+++ net-2.6.20/net/ipv6/route.c 2006-11-25 16:09:50.0 +0100
@@ -2026,7 +2026,7 @@
 {
struct rtmsg *rtm;
struct nlmsghdr *nlh;
-   struct rta_cacheinfo ci;
+   long expires;
u32 table;
 
if (prefix) {   /* user wants prefix routes only */
@@ -2100,18 +2100,11 @@
NLA_PUT_U32(skb, RTA_OIF, rt->rt6i_dev->ifindex);
 
  

[NETLINK]: Remove unused dst_pid field in netlink_skb_parms

2006-11-27 Thread Thomas Graf
The destination PID is passed directly to netlink_unicast()
respectively netlink_multicast().

Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>

Index: net-2.6.20/include/linux/netlink.h
===
--- net-2.6.20.orig/include/linux/netlink.h 2006-11-25 15:35:26.0 
+0100
+++ net-2.6.20/include/linux/netlink.h  2006-11-25 15:59:14.0 +0100
@@ -141,7 +141,6 @@
 {
struct ucredcreds;  /* Skb credentials  */
__u32   pid;
-   __u32   dst_pid;
__u32   dst_group;
kernel_cap_teff_cap;
__u32   loginuid;   /* Login (audit) uid */
Index: net-2.6.20/net/decnet/dn_route.c
===
--- net-2.6.20.orig/net/decnet/dn_route.c   2006-11-25 15:35:26.0 
+0100
+++ net-2.6.20/net/decnet/dn_route.c2006-11-25 15:59:14.0 +0100
@@ -1592,8 +1592,6 @@
if (rtm->rtm_flags & RTM_F_NOTIFY)
rt->rt_flags |= RTCF_NOTIFY;
 
-   NETLINK_CB(skb).dst_pid = NETLINK_CB(in_skb).pid;
-
err = dn_rt_fill_info(skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq, 
RTM_NEWROUTE, 0, 0);
 
if (err == 0)
Index: net-2.6.20/net/ipv4/fib_frontend.c
===
--- net-2.6.20.orig/net/ipv4/fib_frontend.c 2006-11-25 15:35:26.0 
+0100
+++ net-2.6.20/net/ipv4/fib_frontend.c  2006-11-25 15:59:14.0 +0100
@@ -811,7 +811,6 @@

pid = nlh->nlmsg_pid;   /*pid of sending process */
NETLINK_CB(skb).pid = 0; /* from kernel */
-   NETLINK_CB(skb).dst_pid = pid;
NETLINK_CB(skb).dst_group = 0;  /* unicast */
netlink_unicast(sk, skb, pid, MSG_DONTWAIT);
 }
Index: net-2.6.20/net/netfilter/nf_conntrack_netlink.c
===
--- net-2.6.20.orig/net/netfilter/nf_conntrack_netlink.c2006-11-25 
15:35:26.0 +0100
+++ net-2.6.20/net/netfilter/nf_conntrack_netlink.c 2006-11-25 
15:59:14.0 +0100
@@ -751,7 +751,6 @@
nf_ct_put(ct);
return -ENOMEM;
}
-   NETLINK_CB(skb2).dst_pid = NETLINK_CB(skb).pid;
 
err = ctnetlink_fill_info(skb2, NETLINK_CB(skb).pid, nlh->nlmsg_seq, 
  IPCTNL_MSG_CT_NEW, 1, ct);
@@ -1291,8 +1290,7 @@
skb2 = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
if (!skb2)
goto out;
-   NETLINK_CB(skb2).dst_pid = NETLINK_CB(skb).pid;
-   
+
err = ctnetlink_exp_fill_info(skb2, NETLINK_CB(skb).pid, 
  nlh->nlmsg_seq, IPCTNL_MSG_EXP_NEW,
  1, exp);
Index: net-2.6.20/net/ipv4/netfilter/ip_conntrack_netlink.c
===
--- net-2.6.20.orig/net/ipv4/netfilter/ip_conntrack_netlink.c   2006-11-25 
15:35:26.0 +0100
+++ net-2.6.20/net/ipv4/netfilter/ip_conntrack_netlink.c2006-11-25 
15:59:14.0 +0100
@@ -742,7 +742,6 @@
ip_conntrack_put(ct);
return -ENOMEM;
}
-   NETLINK_CB(skb2).dst_pid = NETLINK_CB(skb).pid;
 
err = ctnetlink_fill_info(skb2, NETLINK_CB(skb).pid, nlh->nlmsg_seq, 
  IPCTNL_MSG_CT_NEW, 1, ct);
@@ -1272,8 +1271,7 @@
skb2 = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
if (!skb2)
goto out;
-   NETLINK_CB(skb2).dst_pid = NETLINK_CB(skb).pid;
-   
+
err = ctnetlink_exp_fill_info(skb2, NETLINK_CB(skb).pid, 
  nlh->nlmsg_seq, IPCTNL_MSG_EXP_NEW,
  1, exp);
Index: net-2.6.20/net/xfrm/xfrm_user.c
===
--- net-2.6.20.orig/net/xfrm/xfrm_user.c2006-11-25 15:35:51.0 
+0100
+++ net-2.6.20/net/xfrm/xfrm_user.c 2006-11-25 15:59:14.0 +0100
@@ -649,7 +649,6 @@
if (!skb)
return ERR_PTR(-ENOMEM);
 
-   NETLINK_CB(skb).dst_pid = NETLINK_CB(in_skb).pid;
info.in_skb = in_skb;
info.out_skb = skb;
info.nlmsg_seq = seq;
@@ -1167,7 +1166,6 @@
if (!skb)
return ERR_PTR(-ENOMEM);
 
-   NETLINK_CB(skb).dst_pid = NETLINK_CB(in_skb).pid;
info.in_skb = in_skb;
info.out_skb = skb;
info.nlmsg_seq = seq;
Index: net-2.6.20/net/netlink/af_netlink.c
===
--- net-2.6.20.orig/net/netlink/af_netlink.c2006-11-25 15:59:23.0 
+0100
+++ net-2.6.20/net/netlink/af_netlink.c 2006-11-25 15:59:43.0 +0100
@@ -1153,7 +1153,6 @@
goto out;
 
NETLINK_CB(skb).pid = nlk->pid;
-   NETLINK_CB(skb).dst_pid = dst

Re: RFC: remove NET_CLS_POLICE?

2006-11-27 Thread Thomas Graf
* Patrick McHardy <[EMAIL PROTECTED]> 2006-11-26 14:21
> One more thing NET_CLS_POLICE affects is CBQ reshape/reclassify
> handling, reshape_fail seems to be completely unhandled without
> NET_CLS_POLICE and reclassification looks like it behaves
> differently with tc actions. I'm not really sure what the
> reshape_fail stuff is used for, but it looks like we would loose
> a feature. Jamal?

Yes, this is the reason why it wasn't removed yet. It always
occured to me as a mystery why NET_ACT_POLICE didn't depend
on the same logic inside the qdiscs. That needs to be resolved
first. Also the compat code for the action variant to handle
old policer configurations is horrible and should be done in
a clear way.

-
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