[PATCH] drivers/net/bnx2.c Possible sparse fixes, take two

2005-08-09 Thread Peter Hagervall
This patch contains the following possible cleanups/fixes:

- use C99 struct initializers
- make a few arrays and structs static
- remove a few uses of literal 0 as NULL pointer
- use convenience function instead of cast+dereference in bnx2_ioctl()
- remove superfluous casts to u8 * in calls to readl/writel

I think I got it right this time, just holler if there's something I
missed.

Signed-off-by: Peter Hagervall [EMAIL PROTECTED]
---


diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -52,7 +52,6 @@ static struct {
{ HP NC370i Multifunction Gigabit Server Adapter },
{ Broadcom NetXtreme II BCM5706 1000Base-SX },
{ HP NC370F Multifunction Gigabit Server Adapter },
-   { 0 },
};
 
 static struct pci_device_id bnx2_pci_tbl[] = {
@@ -3507,11 +3506,11 @@ bnx2_test_registers(struct bnx2 *bp)
rw_mask = reg_tbl[i].rw_mask;
ro_mask = reg_tbl[i].ro_mask;
 
-   save_val = readl((u8 *) bp-regview + offset);
+   save_val = readl(bp-regview + offset);
 
-   writel(0, (u8 *) bp-regview + offset);
+   writel(0, bp-regview + offset);
 
-   val = readl((u8 *) bp-regview + offset);
+   val = readl(bp-regview + offset);
if ((val  rw_mask) != 0) {
goto reg_test_err;
}
@@ -3520,9 +3519,9 @@ bnx2_test_registers(struct bnx2 *bp)
goto reg_test_err;
}
 
-   writel(0x, (u8 *) bp-regview + offset);
+   writel(0x, bp-regview + offset);
 
-   val = readl((u8 *) bp-regview + offset);
+   val = readl(bp-regview + offset);
if ((val  rw_mask) != rw_mask) {
goto reg_test_err;
}
@@ -3531,11 +3530,11 @@ bnx2_test_registers(struct bnx2 *bp)
goto reg_test_err;
}
 
-   writel(save_val, (u8 *) bp-regview + offset);
+   writel(save_val, bp-regview + offset);
continue;
 
 reg_test_err:
-   writel(save_val, (u8 *) bp-regview + offset);
+   writel(save_val, bp-regview + offset);
ret = -ENODEV;
break;
}
@@ -4698,7 +4697,7 @@ bnx2_set_rx_csum(struct net_device *dev,
 
 #define BNX2_NUM_STATS 45
 
-struct {
+static struct {
char string[ETH_GSTRING_LEN];
 } bnx2_stats_str_arr[BNX2_NUM_STATS] = {
{ rx_bytes },
@@ -4750,7 +4749,7 @@ struct {
 
 #define STATS_OFFSET32(offset_name) (offsetof(struct statistics_block, 
offset_name) / 4)
 
-unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] = {
+static unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] = {
 STATS_OFFSET32(stat_IfHCInOctets_hi),
 STATS_OFFSET32(stat_IfHCInBadOctets_hi),
 STATS_OFFSET32(stat_IfHCOutOctets_hi),
@@ -4801,7 +4800,7 @@ unsigned long bnx2_stats_offset_arr[BNX2
 /* stat_IfHCInBadOctets and stat_Dot3StatsCarrierSenseErrors are
  * skipped because of errata.
  */   
-u8 bnx2_5706_stats_len_arr[BNX2_NUM_STATS] = {
+static u8 bnx2_5706_stats_len_arr[BNX2_NUM_STATS] = {
8,0,8,8,8,8,8,8,8,8,
4,0,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,
@@ -4811,7 +4810,7 @@ u8 bnx2_5706_stats_len_arr[BNX2_NUM_STAT
 
 #define BNX2_NUM_TESTS 6
 
-struct {
+static struct {
char string[ETH_GSTRING_LEN];
 } bnx2_tests_str_arr[BNX2_NUM_TESTS] = {
{ register_test (offline) },
@@ -4910,7 +4909,7 @@ bnx2_get_ethtool_stats(struct net_device
struct bnx2 *bp = dev-priv;
int i;
u32 *hw_stats = (u32 *) bp-stats_blk;
-   u8 *stats_len_arr = 0;
+   u8 *stats_len_arr = NULL;
 
if (hw_stats == NULL) {
memset(buf, 0, sizeof(u64) * BNX2_NUM_STATS);
@@ -5012,7 +5011,7 @@ static struct ethtool_ops bnx2_ethtool_o
 static int
 bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
-   struct mii_ioctl_data *data = (struct mii_ioctl_data *)ifr-ifr_data;
+   struct mii_ioctl_data *data = if_mii(ifr);
struct bnx2 *bp = dev-priv;
int err;
 
@@ -5505,12 +5504,12 @@ bnx2_resume(struct pci_dev *pdev)
 }
 
 static struct pci_driver bnx2_pci_driver = {
-   name:   DRV_MODULE_NAME,
-   id_table:   bnx2_pci_tbl,
-   probe:  bnx2_init_one,
-   remove: __devexit_p(bnx2_remove_one),
-   suspend:bnx2_suspend,
-   resume: bnx2_resume,
+   .name   = DRV_MODULE_NAME,
+   .id_table   = bnx2_pci_tbl,
+   .probe  = bnx2_init_one,
+   .remove = __devexit_p(bnx2_remove_one),
+   .suspend= bnx2_suspend,
+   .resume = bnx2_resume,
 };
 
 static int __init bnx2_init(void)
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  

[PATCH] untracked fix now in Linus' tree, but not in net-2.6.14

2005-08-09 Thread Harald Welte
Hi Dave, please apply the untracked fix (that has been adopted by Linus
for 2.6.13) to your net-2.6.14 tree.  Thanks!

-- 
- Harald Welte [EMAIL PROTECTED]  http://gnumonks.org/

Privacy in residential applications is a desirable marketing option.
  (ETSI EN 300 175-7 Ch. A6)
[NETFILTER] don't try to do any NAT on untracked connections

With the introduction of 'rustynat' in 2.6.11, the old tricks of preventing
NAT of 'untracked' connections (e.g. NOTRACK target in 'raw' table) are no
longer sufficient.  The ip_conntrack_untracked.status |= IPS_NAT_DONE_MASK
effectively prevents iteration of the 'nat' table, but doesn't prevent
nat_packet() to be executed.  Since nr_manips is gone in 'rustynat',
nat_packet() now implicitly thinks that it has to do NAT on the packet.

This patch fixes that problem by explicitly checking for
ip_conntrack_untracked in ip_nat_fn().

Signed-off-by: Harald Welte [EMAIL PROTECTED]

---
commit c16fd4ffed6349d0888cd97a75d04394dac42021
tree b4f0e73c7c36f3a52b23593c40f1f49353ba67e3
parent 4d08142e287f852db3f4bfd614f2d73521bd7f07
author Harald Welte [EMAIL PROTECTED] Sa, 06 Aug 2005 18:11:00 +0200
committer Harald Welte [EMAIL PROTECTED] Sa, 06 Aug 2005 18:11:00 +0200

 net/ipv4/netfilter/ip_nat_standalone.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/netfilter/ip_nat_standalone.c 
b/net/ipv4/netfilter/ip_nat_standalone.c
--- a/net/ipv4/netfilter/ip_nat_standalone.c
+++ b/net/ipv4/netfilter/ip_nat_standalone.c
@@ -100,6 +100,10 @@ ip_nat_fn(unsigned int hooknum,
return NF_ACCEPT;
}
 
+   /* Don't try to NAT if this packet is not conntracked */
+   if (ct == ip_conntrack_untracked)
+   return NF_ACCEPT;
+
switch (ctinfo) {
case IP_CT_RELATED:
case IP_CT_RELATED+IP_CT_IS_REPLY:


pgpmvn1o00pSV.pgp
Description: PGP signature


Re: [Fwd: [patch 11/15] ppp: handle misaligned accesses]

2005-08-09 Thread Philippe De Muyter
Paul Mackerras wrote :
 Philippe De Muyter writes:
 
   This patch seems a bit strange and/or incomplete.  Are we trying to
   get 2-byte alignment or 4-byte alignment of the payload?  It seems
  
  Actually, we try to get a 4n+2 alignment for skb-data, to get the 
  ip-addresses
  field 4bytes aligned.
  I think the only thing wrong is the old comment that said :
  /* Try to get the payload 4-byte aligned */
  and that I did not change.
 
 Yes, the payload is the part after the protocol field, so the comment
 is still correct.
 
   that if the protocol field is uncompressed, we don't do anything to
   the alignment, but if it is compressed, we do this:
   
/* protocol is compressed */
-   skb_push(skb, 1)[0] = 0;
+   if ((unsigned long)skb-data  1)
+   skb_push(skb, 1)[0] = 0;
+   else { /* Ditto, but realign the payload to 4-byte 
boundary */
+   short len = skb-len;
+
+   skb_put(skb, 3);
+   memmove(skb-data + 3, skb-data, len);
+   skb_pull(skb, 2)[0] = 0;
   
   I'm puzzled that we are not testing ((unsigned long)skb-data  2) if
   we are really trying to achieve 4-byte alignment.  In fact, if the
   skb-data that we get from dev_alloc_skb is 4-byte aligned to start
   with, this will end up with the payload starting at the original
   skb-data + 6, i.e. 2-byte aligned but not 4-byte aligned AFAICS.
   
   Can we assume that dev_alloc_skb will give us a 4-byte aligned
   skb-data?  If we can then I suggest we change 3 to 1 in the skb_put
  
  Are you not forgetting that the alignment of skb-data is changed (by the 
  existing code ! ) :
  if (buf[0] != PPP_ALLSTATIONS)
  skb_reserve(skb, 2 + (buf[0]  1));
 
 No, I'm not forgetting.  If we assume that skb-data starts out 4-byte
 aligned, then the only case in which we will have
 
   ((unsigned long)skb-data  1) == 0
 
 is if we have protocol field compression (and a compressible protocol
 number, i.e. less than 0x100) but not address/control compression
 (which would be a weird combination, but legal).  In that case, with
 your patch we will move the protocol byte to the original skb-data+5
 and have the payload at +6.

Actually, that's probably the case I had, but my fix gets the ip adresses
4byte aligned in my case : I had verified the address of the saddr field,
and I needed to shift the buffer by 3, not 1, to get it 4byte aligned.

 
 If there is any possibility that skb-data is not 4-byte aligned when

No, that's not the problem I had.  skb-data was always 4-byte aligned
at allocation time.

 the skb is first allocated, I think that we should do something like
 
   if ((unsigned long)skb-data  3)
   skb_reserve(skb, 4 - ((unsigned long)skb-data  3));
 
 immediately after allocating it, and then just memmove the stuff up
 one byte (rather than 3) if it isn't aligned as we want.
 
 Paul.
 

Philippe
-
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: [RESEND][PATCH net-drivers-2.6 5/9] ixgb: Fix data output by ethtool -d

2005-08-09 Thread Chilakala, Mallikarjuna
Agreed, we will roll in this in our next build
-Malli

-Original Message-
From: Ingo Oeser [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 09, 2005 3:27 AM
To: Chilakala, Mallikarjuna
Cc: [EMAIL PROTECTED]; netdev
Subject: Re: [RESEND][PATCH net-drivers-2.6 5/9] ixgb: Fix data output
by ethtool -d

Hi Malli,

Malli Chilakala wrote:
 Fix data output by ethtool -d

 Signed-off-by: Mallikarjuna R Chilakala
[EMAIL PROTECTED]
 Signed-off-by: Ganesh Venkatesan [EMAIL PROTECTED]
 Signed-off-by: John Ronciak [EMAIL PROTECTED]

 diff -up netdev-2.6/drivers/net/ixgb/ixgb_ethtool.c
 netdev-2.6/drivers/net/ixgb.new/ixgb_ethtool.c ---
 netdev-2.6/drivers/net/ixgb/ixgb_ethtool.c2005-08-05
09:25:28.0
 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_ethtool.c
2005-08-05
 09:25:38.0 -0700 @@ -301,7 +301,8 @@ ixgb_get_regs(struct
 net_device *netdev,
   *reg++ = IXGB_READ_REG(hw, RAIDC);  /*  19 */
   *reg++ = IXGB_READ_REG(hw, RXCSUM); /*  20 */

 - for (i = 0; i  IXGB_RAR_ENTRIES; i++) {
 + /* there are 16 RAR entries in hardware, we only use 3 */
 + for(i = 0; i  16; i++) {

Please define a symbol for this constant somewhere. Introducing
hardcoded values are a regression in readability.
Suggested symbol: #define IXGB_ALL_RAR_ENTRIES 16


Regards

Ingo Oeser

-
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] net/irda/: possible cleanups

2005-08-09 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make the following needlessly global function static:
  - irnet/irnet_ppp.c: irnet_init
- remove the following unneeded EXPORT_SYMBOL's:
  - irlmp.c: sysctl_discovery_timeout
  - irlmp.c: irlmp_reasons
  - irlmp.c: irlmp_dup
  - irqueue.c: hashbin_find_next

Please review which of these changes do make sense and which conflict 
with pending patches.

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

---

This patch was already sent on:
- 9 Jul 2005
- 30 May 2005
- 7 May 2005

 net/irda/irlmp.c   |3 ---
 net/irda/irnet/irnet.h |3 ---
 net/irda/irnet/irnet_ppp.c |2 +-
 net/irda/irqueue.c |1 -
 4 files changed, 1 insertion(+), 8 deletions(-)

--- linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet.h.old2005-05-05 
22:38:59.0 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet.h2005-05-05 
22:39:12.0 +0200
@@ -517,9 +517,6 @@
irda_irnet_init(void);  /* Initialise IrDA part of IrNET */
 extern void
irda_irnet_cleanup(void);   /* Teardown IrDA part of IrNET */
-/*  MODULE  */
-extern int
-   irnet_init(void);   /* Initialise IrNET module */
 
 / VARIABLES /
 
--- linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet_ppp.c.old2005-05-05 
22:39:21.0 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet_ppp.c2005-05-05 
22:39:29.0 +0200
@@ -1107,7 +1107,7 @@
 /*
  * Module main entry point
  */
-int __init
+static int __init
 irnet_init(void)
 {
   int err;
--- linux-2.6.12-rc3-mm3-full/net/irda/irlmp.c.old  2005-05-05 
22:46:47.0 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irlmp.c  2005-05-05 22:50:52.0 
+0200
@@ -53,7 +53,6 @@
 /* These can be altered by the sysctl interface */
 int  sysctl_discovery = 0;
 int  sysctl_discovery_timeout = 3; /* 3 seconds by default */
-EXPORT_SYMBOL(sysctl_discovery_timeout);
 int  sysctl_discovery_slots   = 6; /* 6 slots by default */
 int  sysctl_lap_keepalive_time = LM_IDLE_TIMEOUT * 1000 / HZ;
 char sysctl_devname[65];
@@ -67,7 +66,6 @@
LM_INIT_DISCONNECT,
ERROR, NOT USED,
 };
-EXPORT_SYMBOL(irlmp_reasons);
 
 /*
  * Function irlmp_init (void)
@@ -675,7 +673,6 @@
 
return new;
 }
-EXPORT_SYMBOL(irlmp_dup);
 
 /*
  * Function irlmp_disconnect_request (handle, userdata)
--- linux-2.6.12-rc3-mm3-full/net/irda/irqueue.c.old2005-05-05 
22:48:55.0 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irqueue.c2005-05-05 
22:49:03.0 +0200
@@ -822,7 +822,6 @@
 
return entry;
 }
-EXPORT_SYMBOL(hashbin_find_next);
 
 /*
  * Function hashbin_get_first (hashbin)

-
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] LSM-IPSec Networking Hooks -- revised flow cache [resend]

2005-08-09 Thread Trent Jaeger
I have a few questions on your comments.  The ones for which I do not have 
questions, I will modify as suggested.

  diff -puN include/net/xfrm.h~lsm-xfrm-nethooks include/net/xfrm.h
 --- linux-2.6.13-rc4-xfrm/include/net/xfrm.h~lsm-xfrm-nethooks  
2005-08-01 16:11:22.0 -0400
 +++ linux-2.6.13-rc4-xfrm-root/include/net/xfrm.h 2005-08-01 
16:11:22.0 -0400
 @@ -510,6 +514,27 @@ xfrm_selector_match(struct xfrm_selector
   return 0;
  }
 
 +/* If neither has a context -- match
 +   Otherwise, both must have a context and the sids, doi, alg must 
match */
 +static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct 
xfrm_sec_ctx *s2)
 +{
 + return ((!s1  !s2) ||
 + (s1  s2 
 +  (s1-ctx_sid == s2-ctx_sid) 
 +  (s1-ctx_doi == s2-ctx_doi) 
 +  (s1-ctx_alg == s2-ctx_alg)));
 +}

 Would it be possible to make this conditional on 
CONFIG_SECURITY_NETWORK?

This is specific to CONFIG_SECURITY_NETWORK_XFRM as contexts will only be 
used in that case.  I will make it conditional on that instead, if that's 
OK.

Regards,
Trent.

Trent Jaeger
IBM T.J. Watson Research Center
19 Skyline Drive, Hawthorne, NY 10532
(914) 784-7225, FAX (914) 784-7225
-
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] LSM-IPSec Networking Hooks -- revised flow cache [resend]

2005-08-09 Thread Trent Jaeger
  @@ -2108,7 +2230,18 @@ static int pfkey_spddelete(struct sock *
   if (sel.dport)
   sel.dport_mask = ~0;
  
  -xp = xfrm_policy_bysel(pol-sadb_x_policy_dir-1, sel, 
1);
  +sec_ctx = (struct sadb_x_sec_ctx *) 
ext_hdrs[SADB_X_EXT_SEC_CTX-1];
  +memset(tmp, 0, sizeof(struct xfrm_policy));
  +
  +if (sec_ctx != NULL) {
  +err = security_xfrm_policy_alloc(
  +tmp, (struct 
xfrm_user_sec_ctx *)sec_ctx);

 What makes spddelete different from spdadd?

spddelete takes a context string as input and we need to retrieve the 
policy that matches the selector (xfrm_policy_bysel) and the security 
context.  The additional code checks the latter.  I think that the 
conversion of the context string to a 'normalized' context struct must be 
done by the LSM before we can do this check as done above. 

I could hide this computation a bit better (it is also done for xfrm_user) 
to clean up the code.

Regards,
Trent.

Trent Jaeger
IBM T.J. Watson Research Center
19 Skyline Drive, Hawthorne, NY 10532
(914) 784-7225, FAX (914) 784-7225
-
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] LSM-IPSec Networking Hooks -- revised flow cache [resend]

2005-08-09 Thread Trent Jaeger
  @@ -2703,10 +2837,22 @@ static struct xfrm_policy *pfkey_compile
   (*dir = parse_ipsecrequests(xp, pol))  0)
   goto out;
  
  +/* security context too */
  +if (len = (pol-sadb_x_policy_len*8 +
  +sizeof(struct sadb_x_sec_ctx))) {
  +char *p = (char *) pol;
  +p += pol-sadb_x_policy_len*8;
  +sec_ctx = (struct sadb_x_sec_ctx *) p;
  +if (security_xfrm_policy_alloc(
  +xp, (struct 
xfrm_user_sec_ctx *)sec_ctx))
  +goto out;
  +}
  +

 Do we really need socket-specific policies with security context?

Security context information is being used by some user-level appls, such 
as XWindows, so I can see that applications may want to set security 
contexts for their sockets based on the principal for whom the code is 
being run.  For example, we may want to prevent leakage of data from a 
window in X to a remote client by setting the security context for a 
socket which limits the receivers of such data.

Regards,
Trent.

PS -- This is all the questions/comments.

Trent Jaeger
IBM T.J. Watson Research Center
19 Skyline Drive, Hawthorne, NY 10532
(914) 784-7225, FAX (914) 784-7225
-
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] untracked fix now in Linus' tree, but not in net-2.6.14

2005-08-09 Thread David S. Miller
From: Harald Welte [EMAIL PROTECTED]
Subject: [PATCH] untracked fix now in Linus' tree, but not in net-2.6.14
Date: Tue, 9 Aug 2005 09:26:12 +0200

 Hi Dave, please apply the untracked fix (that has been adopted by Linus
 for 2.6.13) to your net-2.6.14 tree.  Thanks!

It will show up there when I rebase the net-2.6.14 tree,
which might be later today.

I absolutely do not like applying a patch twice, once in
net-2.6.13 and once in net-2.6.14, just to get it to
show up in both places.  That makes for merge headaches
later.
-
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][INET] Request module protocol strings

2005-08-09 Thread Arnaldo Carvalho de Melo
Em Mon, Aug 08, 2005 at 02:01:48PM -0700, David S. Miller escreveu:
 
 We have an icky situation in this area.  Harald is right,
 I think.
 
 I'd suggest that Arnaldo fixes up his af_inet.c changes
 so that it uses net-pf-* like the rest of the tree
 does.
 
 Arnaldo, I pulled in your net-2.6.14 tree earlier today,
 so please send me a patch on-top of that.

Available at:

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/

On top of your latest net-2.6.14.git tree.

Regards,

- Arnaldo

tree 798b122078678637377e314fc4940401df5d5a45
parent 0c3ac38e9f848b600698e1d660a40aba3838e7b9
author Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123613281 -0300
committer Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123613281 -0300

[INET] Request module protocol strings

Changed the syntax to:

nf-pf-PF-proto-Protocol-type-sock_type

Matching the one in netlink, as pointed out by Harald.

Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED]

--

 dccp/proto.c|6 +++---
 ipv4/af_inet.c  |   16 
 sctp/protocol.c |2 +-
 3 files changed, 16 insertions(+), 8 deletions(-)

--

diff --git a/net/dccp/proto.c b/net/dccp/proto.c
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -814,10 +814,10 @@ module_exit(dccp_fini);
 /*
  * __stringify doesn't likes enums, so use SOCK_DCCP (6) and IPPROTO_DCCP (33)
  * values directly, Also cover the case where the protocol is not specified,
- * i.e. net-proto-PF_INET-0-SOCK_DCCP
+ * i.e. net-pf-PF_INET-proto-0-type-SOCK_DCCP
  */
-MODULE_ALIAS(net-proto- __stringify(PF_INET) -33-6);
-MODULE_ALIAS(net-proto- __stringify(PF_INET) -0-6);
+MODULE_ALIAS(net-pf- __stringify(PF_INET) -proto-33-type-6);
+MODULE_ALIAS(net-pf- __stringify(PF_INET) -proto-0-type-6);
 MODULE_LICENSE(GPL);
 MODULE_AUTHOR(Arnaldo Carvalho de Melo [EMAIL PROTECTED]);
 MODULE_DESCRIPTION(DCCP - Datagram Congestion Controlled Protocol);
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -259,12 +259,20 @@ lookup_protocol:
if (unlikely(answer == NULL)) {
if (try_loading_module  2) {
rcu_read_unlock();
-   /* Be more specific, e.g. net-proto-2-132-1 
(net-proto-PF_INET-IPPROTO_SCTP-SOCK_STREAM) */
+   /*
+* Be more specific, e.g. net-pf-2-proto-132-type-1
+* (net-pf-PF_INET-proto-IPPROTO_SCTP-type-SOCK_STREAM)
+*/
if (++try_loading_module == 1)
-   request_module(net-proto-%d-%d-%d, PF_INET, 
protocol, sock-type);
-   /* Fall back to generic, e.g. net-proto-132-1 
(net-proto-IPPROTO_SCTP) */
+   request_module(net-pf-%d-proto-%d-type-%d,
+  PF_INET, protocol, sock-type);
+   /*
+* Fall back to generic, e.g. net-pf-2-proto-132
+* (net-pf-PF_INET-proto-IPPROTO_SCTP)
+*/
else
-   request_module(net-proto-%d-%d, PF_INET, 
protocol);
+   request_module(net-pf-%d-proto-%d,
+  PF_INET, protocol);
goto lookup_protocol;
} else
goto out_rcu_unlock;
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1245,7 +1245,7 @@ module_exit(sctp_exit);
 /*
  * __stringify doesn't likes enums, so use IPPROTO_SCTP value (132) directly.
  */
-MODULE_ALIAS(net-proto- __stringify(PF_INET) -132);
+MODULE_ALIAS(net-pf- __stringify(PF_INET) -proto-132);
 MODULE_AUTHOR(Linux Kernel SCTP developers [EMAIL PROTECTED]);
 MODULE_DESCRIPTION(Support for the SCTP protocol (RFC2960));
 MODULE_LICENSE(GPL);
-
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][INET] Request module protocol strings

2005-08-09 Thread David S. Miller
From: [EMAIL PROTECTED] (Arnaldo Carvalho de Melo)
Date: Tue, 9 Aug 2005 16:19:52 -0300

 [INET] Request module protocol strings
 
 Changed the syntax to:
 
 nf-pf-PF-proto-Protocol-type-sock_type
 
 Matching the one in netlink, as pointed out by Harald.
 
 Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED]

Pulled, 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] farsync: schedule struct fstioc_info::kernelVersion for removal

2005-08-09 Thread Alexey Dobriyan
Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]
---

 Documentation/feature-removal-schedule.txt |8 
 1 files changed, 8 insertions(+)

--- linux-vanilla/Documentation/feature-removal-schedule.txt
+++ linux-farsync/Documentation/feature-removal-schedule.txt
@@ -121,6 +121,14 @@ Who:   Grant Coady [EMAIL PROTECTED]
 
 ---
 
+What:  struct fstioc_info::kernelVersion used in FSTGETCONF ioctl
+When:  November 2005
+Files: drivers/net/wan/farsync.c, drivers/net/wan/farsync.h
+Why:   Duplicates uname(2).
+Who:   Alexey Dobriyan [EMAIL PROTECTED]
+
+---
+
 What:  PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
 When:  November 2005
 Files: drivers/pcmcia/: pcmcia_ioctl.c

-
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] LSM-IPSec Networking Hooks -- revised flow cache [resend]

2005-08-09 Thread Herbert Xu
Trent Jaeger [EMAIL PROTECTED] wrote:

 This is specific to CONFIG_SECURITY_NETWORK_XFRM as contexts will only be 
 used in that case.  I will make it conditional on that instead, if that's 
 OK.

That sounds good.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3][DCCP] Fix struct sockaddr_dccp definition

2005-08-09 Thread Arnaldo Carvalho de Melo
Hi David,

Please consider pulling from:

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/

Best Regards,

- Arnaldo

tree d25c0dd1db78b1021da8902e8ef0dc37cbb5d892
parent ad7764592bf76533ffe823d7f45d7712c0bacfe2
author Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123625109 -0300
committer Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123625109 -0300

[DCCP] Fix struct sockaddr_dccp definition

Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED]

--

 dccp.h |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)

--

diff --git a/include/linux/dccp.h b/include/linux/dccp.h
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -4,10 +4,14 @@
 #include linux/types.h
 #include asm/byteorder.h
 
-/* FIXME: this is utterly wrong */
+/* Structure describing an Internet (DCCP) socket address. */
 struct sockaddr_dccp {
-   struct sockaddr_in  in;
-   unsigned intservice;
+   __u16   sdccp_family;   /* Address family   */
+   __u16   sdccp_port; /* Port number  */
+   __u32   sdccp_addr; /* Internet address */
+   __u32   sdccp_service;  /* Service  */
+   /* Pad to size of `struct sockaddr': 16 bytes . */
+   __u32   sdccp_pad;
 };
 
 /**
-
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/3][DCCP] make linux/dccp.h include-able from userspace

2005-08-09 Thread David S. Miller
From: [EMAIL PROTECTED] (Arnaldo Carvalho de Melo)
Date: Tue, 9 Aug 2005 19:15:44 -0300

   Please consider pulling from:
 
 rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/

Pulled, thanks Arnaldo.

I took the opportunity to fix up all the u64 printf
format string warnings in the DCCP stack, that changeset
should show up right after these 3 in the net-2.6.14 tree.

Thanks again.
-
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/3][DCCP] make linux/dccp.h include-able from userspace

2005-08-09 Thread Arnaldo Carvalho de Melo
Em Tue, Aug 09, 2005 at 03:41:30PM -0700, David S. Miller escreveu:
 From: [EMAIL PROTECTED] (Arnaldo Carvalho de Melo)
 Date: Tue, 9 Aug 2005 19:15:44 -0300
 
  Please consider pulling from:
  
  rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/
 
 Pulled, thanks Arnaldo.
 
 I took the opportunity to fix up all the u64 printf
 format string warnings in the DCCP stack, that changeset
 should show up right after these 3 in the net-2.6.14 tree.
 
 Thanks again.

Thanks! I'll rebase my tree from there for the upcoming changesets I'll
submit to you.

- 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: [Fwd: [patch 11/15] ppp: handle misaligned accesses]

2005-08-09 Thread Paul Mackerras
Philippe De Muyter writes:

 Actually, that's probably the case I had, but my fix gets the ip adresses
 4byte aligned in my case : I had verified the address of the saddr field,
 and I needed to shift the buffer by 3, not 1, to get it 4byte aligned.

Please outline the code flow that leads to that situation.  AFAICS we
would only need to shift the buffer by 3 if we had a compressed
(1-byte) protocol number at the original skb-data, implying that the
protocol byte was first.  But if the protocol byte was first, then
this code:

if (buf[0] != PPP_ALLSTATIONS)
skb_reserve(skb, 2 + (buf[0]  1));

at line 893 should have moved skb-data up by 3 bytes already, since a
1-byte protocol number is always odd.

If that is not the case then there is something else going on beyond
the data getting misaligned, and I would like to know what it is.

Paul.
-
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


skb-pkt_type

2005-08-09 Thread David S. Miller

I pushed a bunch of bluetooth updates into my net-2.6.14
tree, and in there you will find the change to make
the bluetooth stack not use skb-pkt_type in the funny
way it used to.

This opens up the possibility to shrink it's size.

Just FYI...
-
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/2][DCCP] Introduce dccp_write_xmit from code in dccp_sendmsg

2005-08-09 Thread Arnaldo Carvalho de Melo
Hi David,

Please consider pulling from:

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/

Best Regards,

- Arnaldo

tree cb64f1688f611035ca076d8baed11abf3558361c
parent add709a31388a56411bc19babb8a45552744974e
author Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123631974 -0300
committer Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123631974 -0300

[DCCP] Introduce dccp_write_xmit from code in dccp_sendmsg

This way it gets closer to the TCP flow, where congestion window checks are
done, it seems we can map ccid_hc_tx_send_packet in dccp_write_xmit to
tcp_snd_wnd_test in tcp_write_xmit, a CCID2 decision should just fit in here as
well...

Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

--

 ccid.h|8 ++-
 ccids/ccid3.c |   13 ++-
 dccp.h|5 ++--
 output.c  |   38 +
 proto.c   |   65 ++
 5 files changed, 57 insertions(+), 72 deletions(-)

--

diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -43,8 +43,7 @@ struct ccid {
unsigned char len, u16 idx,
unsigned char* value);
int (*ccid_hc_tx_send_packet)(struct sock *sk,
- struct sk_buff *skb, int len,
- long *delay);
+ struct sk_buff *skb, int len);
void(*ccid_hc_tx_packet_sent)(struct sock *sk, int more, 
int len);
 };
 
@@ -60,12 +59,11 @@ static inline void __ccid_get(struct cci
 }
 
 static inline int ccid_hc_tx_send_packet(struct ccid *ccid, struct sock *sk,
-struct sk_buff *skb, int len,
-long *delay)
+struct sk_buff *skb, int len)
 {
int rc = 0;
if (ccid-ccid_hc_tx_send_packet != NULL)
-   rc = ccid-ccid_hc_tx_send_packet(sk, skb, len, delay);
+   rc = ccid-ccid_hc_tx_send_packet(sk, skb, len);
return rc;
 }
 
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -977,13 +977,14 @@ out:
sock_put(sk);
 }
 
-static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb,
-  int len, long *delay)
+static int ccid3_hc_tx_send_packet(struct sock *sk,
+  struct sk_buff *skb, int len)
 {
struct dccp_sock *dp = dccp_sk(sk);
struct ccid3_hc_tx_sock *hctx = dp-dccps_hc_tx_ccid_private;
struct ccid3_tx_hist_entry *new_packet = NULL;
struct timeval now;
+   long delay;
int rc = -ENOTCONN;
 
 // ccid3_pr_debug(%s, sk=%p, skb=%p, len=%d\n, dccp_role(sk), sk, skb, 
len);
@@ -1037,11 +1038,11 @@ static int ccid3_hc_tx_send_packet(struc
break;
case TFRC_SSTATE_NO_FBACK:
case TFRC_SSTATE_FBACK:
-   *delay = (now_delta(hctx-ccid3hctx_t_nom) - 
hctx-ccid3hctx_delta);
-   ccid3_pr_debug(send_packet delay=%ld\n,*delay);
-   *delay /= -1000;
+   delay = (now_delta(hctx-ccid3hctx_t_nom) - 
hctx-ccid3hctx_delta);
+   ccid3_pr_debug(send_packet delay=%ld\n, delay);
+   delay /= -1000;
/* divide by -1000 is to convert to ms and get sign right */
-   rc = *delay  0 ? -EAGAIN : 0;
+   rc = delay  0 ? -EAGAIN : 0;
break;
default:
printk(KERN_CRIT %s: %s, sk=%p, Illegal state (%d)!\n,
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -122,6 +122,9 @@ extern void dccp_send_ack(struct sock *s
 extern void dccp_send_delayed_ack(struct sock *sk);
 extern void dccp_send_sync(struct sock *sk, u64 seq);
 
+extern int dccp_write_xmit(struct sock *sk, struct sk_buff *skb,
+  const int len);
+
 extern void dccp_init_xmit_timers(struct sock *sk);
 static inline void dccp_clear_xmit_timers(struct sock *sk)
 {
@@ -194,8 +197,6 @@ static inline void dccp_openreq_init(str
req-rcv_wnd = 0;
 }
 
-extern void dccp_v4_send_check(struct sock *sk, struct dccp_hdr *dh, int len, 
-  struct sk_buff *skb);
 extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
 
 extern struct sock *dccp_create_openreq_child(struct sock *sk,
diff --git a/net/dccp/output.c b/net/dccp/output.c
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -148,6 

[PATCH 2/2][DCCP] Initialize icsk_rto in dccp_v4_init_sock

2005-08-09 Thread Arnaldo Carvalho de Melo
Hi David,

Please consider pulling from:

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/

Best Regards,

- Arnaldo

tree 8389bb3fa23d6c8e8db4ba62a0160f4f28938b50
parent 55a364b972cbfbd731f1ae763e9b3818880daed8
author Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123632227 -0300
committer Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123632227 -0300

[DCCP] Initialize icsk_rto in dccp_v4_init_sock

Fixes nasty bug related to the retransmit timer (yeah, DCCP does retransmits)
firing too early.

Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

--

 ipv4.c |1 +
 1 files changed, 1 insertion(+)

--

diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -1219,6 +1219,7 @@ static int dccp_v4_init_sock(struct sock
dccp_ctl_socket_init = 0;
 
dccp_init_xmit_timers(sk);
+   inet_csk(sk)-icsk_rto = DCCP_TIMEOUT_INIT;
sk-sk_state = DCCP_CLOSED;
dp-dccps_mss_cache = 536;
dp-dccps_role = DCCP_ROLE_UNDEFINED;
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][DCCP] Initialize icsk_rto in dccp_v4_init_sock

2005-08-09 Thread David S. Miller
From: [EMAIL PROTECTED] (Arnaldo Carvalho de Melo)
Date: Tue, 9 Aug 2005 21:07:50 -0300

   Please consider pulling from:
 
 rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/

Pulled, 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: skb-pkt_type

2005-08-09 Thread Patrick McHardy
David S. Miller wrote:
 I pushed a bunch of bluetooth updates into my net-2.6.14
 tree, and in there you will find the change to make
 the bluetooth stack not use skb-pkt_type in the funny
 way it used to.
 
 This opens up the possibility to shrink it's size.

BTW, an idea to make room for ipvs_property would be to place the three
nfctinfo bits in the lower three bits of the nfct pointer. I'm not sure
if it guarantees 8 byte alignemnt, which would be required for this to
work ..
-
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][DCCP] Finish the TIMEWAIT minisock support

2005-08-09 Thread Arnaldo Carvalho de Melo
Hi David,

Please consider pulling from:

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/

Best Regards,

- Arnaldo

tree a9cf14e45b536f4920d3168e2961e50b91096a09
parent 7a246e1121146f90a28a935e2a85a23f448b77dc
author Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123639218 -0300
committer Arnaldo Carvalho de Melo [EMAIL PROTECTED] 1123639218 -0300

[DCCP] Finish the TIMEWAIT minisock support

Using most of the infrastructure TCP uses, with a dccp_death_row, etc. As per
my current interpretation of the draft what we have with this changeset seems
to be all we need (or very close to it 8)).

Signed-off-by: Arnaldo Carvalho de Melo [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]

--

 include/linux/dccp.h |3 ++
 net/dccp/ipv4.c  |   15 
 net/dccp/minisocks.c |   60 ++-
 3 files changed, 63 insertions(+), 15 deletions(-)

--

diff --git a/include/linux/dccp.h b/include/linux/dccp.h
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -194,6 +194,7 @@ enum {
 #include linux/workqueue.h
 
 #include net/inet_connection_sock.h
+#include net/inet_timewait_sock.h
 #include net/sock.h
 #include net/tcp_states.h
 #include net/tcp.h
@@ -354,6 +355,8 @@ static inline struct dccp_request_sock *
return (struct dccp_request_sock *)req;
 }
 
+extern struct inet_timewait_death_row dccp_death_row;
+
 /* Read about the ECN nonce to see why it is 253 */
 #define DCCP_MAX_ACK_VECTOR_LEN 253
 
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -97,7 +97,7 @@ static int __dccp_v4_check_established(s
NET_INC_STATS_BH(LINUX_MIB_TIMEWAITRECYCLED);
} else if (tw != NULL) {
/* Silly. Should hash-dance instead... */
-   dccp_tw_deschedule(tw);
+   inet_twsk_deschedule(tw, dccp_death_row);
NET_INC_STATS_BH(LINUX_MIB_TIMEWAITRECYCLED);
 
inet_twsk_put(tw);
@@ -201,7 +201,7 @@ ok:
spin_unlock(head-lock);
 
if (tw != NULL) {
-   dccp_tw_deschedule(tw);
+   inet_twsk_deschedule(tw, dccp_death_row);
inet_twsk_put(tw);
}
 
@@ -1131,8 +1131,9 @@ int dccp_v4_rcv(struct sk_buff *skb)
 */
   
if (sk-sk_state == DCCP_TIME_WAIT) {
-   dccp_pr_debug(sk-sk_state == DCCP_TIME_WAIT: 
discard_and_relse\n);
-goto discard_and_relse;
+   dccp_pr_debug(sk-sk_state == DCCP_TIME_WAIT: 
+ do_time_wait\n);
+goto do_time_wait;
}
 
if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) {
@@ -1179,6 +1180,10 @@ discard_it:
 discard_and_relse:
sock_put(sk);
goto discard_it;
+
+do_time_wait:
+   inet_twsk_put((struct inet_timewait_sock *)sk);
+   goto no_dccp_socket;
 }
 
 static int dccp_v4_init_sock(struct sock *sk)
@@ -1290,5 +1295,5 @@ struct proto dccp_v4_prot = {
.max_header = MAX_DCCP_HEADER,
.obj_size   = sizeof(struct dccp_sock),
.rsk_prot   = dccp_request_sock_ops,
-   .twsk_obj_size  = sizeof(struct inet_timewait_sock), /* FIXME! 
create dccp_timewait_sock */
+   .twsk_obj_size  = sizeof(struct inet_timewait_sock),
 };
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -22,18 +22,58 @@
 #include ccid.h
 #include dccp.h
 
+struct inet_timewait_death_row dccp_death_row = {
+   .sysctl_max_tw_buckets = NR_FILE * 2,
+   .period = DCCP_TIMEWAIT_LEN / INET_TWDR_TWKILL_SLOTS,
+   .death_lock = SPIN_LOCK_UNLOCKED,
+   .hashinfo   = dccp_hashinfo,
+   .tw_timer   = TIMER_INITIALIZER(inet_twdr_hangman, 0,
+   (unsigned long)dccp_death_row),
+   .twkill_work= __WORK_INITIALIZER(dccp_death_row.twkill_work,
+inet_twdr_twkill_work,
+dccp_death_row),
+/* Short-time timewait calendar */
+
+   .twcal_hand = -1,
+   .twcal_timer= TIMER_INITIALIZER(inet_twdr_twcal_tick, 0,
+   (unsigned long)dccp_death_row),
+};
+
 void dccp_time_wait(struct sock *sk, int state, int timeo)
 {
-   /* FIXME: Implement */
-   dccp_pr_debug(Want to help? Start here\n);
-   dccp_set_state(sk, state);
-}
+   struct inet_timewait_sock *tw = NULL;
 
-/* This is for handling early-kills of TIME_WAIT sockets. */
-void dccp_tw_deschedule(struct inet_timewait_sock *tw)
-{
-   dccp_pr_debug(Want to help? Start here\n);
-

Re: [PATCH 3/3][DCCP] Finish the TIMEWAIT minisock support

2005-08-09 Thread Arnaldo Carvalho de Melo
Em Tue, Aug 09, 2005 at 09:29:09PM -0700, David S. Miller escreveu:
 From: [EMAIL PROTECTED] (Arnaldo Carvalho de Melo)
 Date: Tue, 9 Aug 2005 23:12:24 -0300
 
  rsync://rsync.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.14.git/
 
 All 3 patches hand applied into my rebased net-2.6.14 tree.

Thanks! I'll resync right now.

- 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