Re: [RFC][BNX2X] .h files rewrite

2007-11-03 Thread Eliezer Tamir
On Fri, 2007-11-02 at 16:35 -0700, Max Asbock wrote:

> I built the newest bnx2x code against the net-2.6 kernel and ran a
> number of stress tests with netperf and pktgen. I did not encounter
> any
> errors.
> 
> Max
> 
> 
Thanks,
Eliezer


-
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: Add 405EX support to new EMAC driver

2007-11-03 Thread Benjamin Herrenschmidt

On Fri, 2007-11-02 at 11:03 -0500, Olof Johansson wrote:
> On Fri, Nov 02, 2007 at 08:14:43AM +0100, Stefan Roese wrote:
> > This patch adds support for the 405EX to the new EMAC driver. Some as on
> > AXON, the 405EX handles the MDIO via the RGMII bridge.
> 
> Hi,
> 
> This isn't feedback on your patch as much as on "new-emac" in general:
> 
> Isn't this the case where there should really be device tree properties
> instead? If you had an "ibm,emac-has-axon-stacr" property in the device
> node, then you don't have to modify the driver for every new board out
> there. Same for the other device properties, of course.
> 
> I thought this was what having the device tree was all about. :(

Somewhat yeah. There are subtle variations here or there we haven't
totally indenfified... It might be a better option in our case here to
add "has-mdio" to the rgmii nodes indeed.

Part of the problem with those cells is that the chip folks keep
changing things subtly from one rev to another though, it's not even
totally clear to me yet whether the RGMII registers are totally
compatible betwee axon and 405ex, which is why I've pretty much stuck to
"compatible" properties to identify the variants.

The device-tree can do both. It's still better than no device-tree since
at least you know what cell variant is in there.

As for the STACR, Axon isn't the first one to have that bit flipped, I
think we should name the property differently, something like
"stacr-oc-inverted".

We can still use properties that way for new things in fact. As for EMAC
on cell, well, I can always put some fixup somewhere.

Ben. 

-
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: Endianness problem with u32 classifier hash masks

2007-11-03 Thread Jarek Poplawski
Jarek Poplawski wrote, On 11/04/2007 01:30 AM:

> Jarek Poplawski wrote, On 11/04/2007 12:58 AM:
... 
> Other changes seem to be not needed.
> 
>> But it needs more checking...


But not much more: it's a piece of fshit!

So, even if not full ntohl(), some byte moving seems to be
necessary here.

Sorry for this mess, 
Jarek P
-
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 : removes per bucket rwlock in tcp/dccp ehash table

2007-11-03 Thread Andi Kleen

> > Also the EHASH_LOCK_SZ == 0 special case is a little strange. Why did
> > you add that?
> 
> He explained this in another reply, because ifdefs are ugly.

I meant why having it at all? 

> Any use that makes 
> "sense" is a case where the code should be rewritten to decrease the
> lock hold time or convert to RCU.

I don't think RCU would be really needed for single entry buckets (which
are common) if they are special cased. After all it would be just
a single pointer. Perhaps one could distingush this case e.g. by 
setting the low order bit of the hash bucket pointer.

In fact to optimize for this case it might be an interesting
experiment to go towards an closed hash table and allocate the sockets
in page sized objects and then remap them directly into a virtual
continuous table similar to the new vmemmap code (need to try this at some 
point). 

-Andi
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Endianness problem with u32 classifier hash masks

2007-11-03 Thread Jarek Poplawski
Jarek Poplawski wrote, On 11/04/2007 12:58 AM:

> Jarek Poplawski wrote, On 11/04/2007 12:39 AM:
> ...
> 
> OOPS!!! Went too early! I've tried to save not send. Probably my
> bad pronunciation...
> 
> But, it seems this could be something like this (instead of Radu's
> change in u32_classify()). The change of hmask is needed.


OK, not exactly... hmask should be ntohl'ed only for fshift:

u32 mask = ntohl(s->hmask);
...

Other changes seem to be not needed.

> 
> But it needs more checking...

Jarek P.
-
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: Endianness problem with u32 classifier hash masks

2007-11-03 Thread Jarek Poplawski

Jarek Poplawski wrote, On 11/04/2007 12:39 AM:
...

OOPS!!! Went too early! I've tried to save not send. Probably my
bad pronunciation...

But, it seems this could be something like this (instead of Radu's
change in u32_classify()). The change of hmask is needed.

But it needs more checking...

Jarek P.
-
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: Problem accessing a Certain Remote IP with Kernel 2.6.24-rc1

2007-11-03 Thread Stephen Hemminger
On Sat, 3 Nov 2007 15:34:18 -0500
Sparkletone <[EMAIL PROTECTED]> wrote:

> Forwarding this for someone who was getting bounces for some reason.
> 
> Begin forwarded message:
> 
> > From: Shlomi Fish <[EMAIL PROTECTED]>
> > Date: November 3, 2007 3:31:56 PM CDT
> > To: [EMAIL PROTECTED]
> > Subject: Problem accessing a Certain Remote IP with Kernel 2.6.24-rc1
> >
> > Hi all!
> >
> > I hope this mail gets through because last time I checked, I got  
> > bounces
> > whenever I tried to send email to LKML ("not liked source" for mail).
> >
> > I've been having a problem with kernel 2.6.24-rc1 on Mandriva  
> > Cooker. The
> > problem is that after using it for a while connecting through TCP to  
> > the
> > following remote, Internet IP - 212.143.218.31 - takes a very long  
> > time.
> >
> > Here's what I've learned:
> >
> > 1. Kernel 2.6.23 seem to exhibit this problem tooa fter a while.
> >
> > 2. It already happened twice with kernel 2.6.24-rc1.
> >
> > 3. A different computer on the same Home LAN connected via a NAT/ 
> > router has no
> > problem with that IP. (At the same time, the Linux computer exhibits  
> > the
> > problematic behaviour).
> >
> > 4. I could connect using telnet to port 80 eventually, but it took  
> > an awfully
> > long time.
> >
> > 5. I have problem with both HTTP to port 80 and POP.
> >
> > 6. Restarting the network ("/etc/init.d/network restart") does not  
> > help - only
> > a reboot.
> >
> > 7. The network as a whole (Google, etc.) works fine.
> >
> > I need this IP, because it hosts my POP account and my homepage.
> >
> > Per Rik van Riel's advice I prepared Ethereal (libpcap) dumps of the
> > conversations before ("good") and after ("bad") the problem surfaced:
> >
> > http://freehackers.org/~shlomif/files/files/www.sf.org-conn-problem/
> >
> > I'd appreciate if anyone would be able to shed more light on this  
> > problem and
> > hopefully fix it. Please let me know if there's anything else you  
> > need.

Sounds like another instance of the default window scaling causing problems.
Look up TCP window scaling on lwn.net.  There is almost some
stupid middlebox/firewall that doesn't handle window scaling properly.


-- 
Stephen Hemminger <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 11/11] netpoll: rx use RCU

2007-11-03 Thread Stephen Hemminger
Get rid of rx_lock and use Read-Copy-Update to make sure
that netpoll info and rx handle are not used after free.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- a/include/linux/netpoll.h   2007-11-03 11:08:36.0 -0700
+++ b/include/linux/netpoll.h   2007-11-03 11:15:11.0 -0700
@@ -23,7 +23,6 @@ struct netpoll {
 
 struct netpoll_info {
atomic_t refcnt;
-   spinlock_t rx_lock;
struct netpoll *rx_np; /* netpoll that registered an rx_hook */
struct sk_buff_head arp_tx; /* list of arp requests to reply to */
struct sk_buff_head txq;
--- a/net/core/netpoll.c2007-11-03 11:08:36.0 -0700
+++ b/net/core/netpoll.c2007-11-03 11:15:29.0 -0700
@@ -463,15 +463,15 @@ bool __netpoll_rx(struct sk_buff *skb)
int proto, len, ulen;
struct iphdr *iph;
struct udphdr *uh;
-   struct netpoll_info *npi = skb->dev->npinfo;
+   struct netpoll_info *npi;
struct netpoll *np;
-   unsigned long flags;
 
+   rcu_read_lock();
+   npi = rcu_dereference(skb->dev->npinfo);
if (!npi)
-   return false;
+   goto out;
 
-   spin_lock_irqsave(&npi->rx_lock, flags);
-   np = npi->rx_np;
+   np = rcu_dereference(npi->rx_np);
if (!np)
goto out;
 
@@ -535,13 +535,13 @@ bool __netpoll_rx(struct sk_buff *skb)
np->rx_hook(np, ntohs(uh->source),
(char *)(uh+1),
ulen - sizeof(struct udphdr));
-   spin_unlock_irqrestore(&npi->rx_lock, flags);
+   rcu_read_unlock();
 
kfree_skb(skb);
return true;
 
 out:
-   spin_unlock_irqrestore(&npi->rx_lock, flags);
+   rcu_read_unlock();
/* If packet received while already in poll then just
 * silently drop.
 */
@@ -678,7 +678,6 @@ int netpoll_setup(struct netpoll *np, st
 
npinfo->rx_np = NULL;
 
-   spin_lock_init(&npinfo->rx_lock);
skb_queue_head_init(&npinfo->arp_tx);
skb_queue_head_init(&npinfo->txq);
INIT_DELAYED_WORK(&npinfo->tx_work, queue_process);
@@ -755,11 +754,8 @@ int netpoll_setup(struct netpoll *np, st
   HIPQUAD(np->local_ip));
}
 
-   if (np->rx_hook) {
-   spin_lock_irqsave(&npinfo->rx_lock, flags);
-   npinfo->rx_np = np;
-   spin_unlock_irqrestore(&npinfo->rx_lock, flags);
-   }
+   if (np->rx_hook)
+   rcu_assign_pointer(npinfo->rx_np, np);
 
/* fill up the skb queue */
refill_skbs();
@@ -794,21 +790,21 @@ void netpoll_cleanup(struct netpoll *np)
if (np->dev) {
npinfo = np->dev->npinfo;
if (npinfo) {
-   if (npinfo->rx_np == np) {
-   spin_lock_irqsave(&npinfo->rx_lock, flags);
-   npinfo->rx_np = NULL;
-   spin_unlock_irqrestore(&npinfo->rx_lock, flags);
-   }
+   if (npinfo->rx_np == np)
+   rcu_assign_pointer(npinfo->rx_np, NULL);
 
if (atomic_dec_and_test(&npinfo->refcnt)) {
+
skb_queue_purge(&npinfo->arp_tx);
skb_queue_purge(&npinfo->txq);
cancel_rearming_delayed_work(&npinfo->tx_work);
 
/* clean after last, unfinished work */
__skb_queue_purge(&npinfo->txq);
+
+   rcu_assign_pointer(np->dev->npinfo, NULL);
+   synchronize_net();
kfree(npinfo);
-   np->dev->npinfo = NULL;
}
}
 

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 10/11] netpoll: rx optimization

2007-11-03 Thread Stephen Hemminger
This patch makes netpoll work for non-NAPI devices that call
netif_receive_skb. Devices are allowed to call netif_receive_skb
if they are receiving packets in softirq (ie in tasklet).
One side effect of this is that received packets will be looked
at twice for the non-NAPI case, but this is harmless.

Move the locking out of the inline hook and into the internal
function.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- a/include/linux/netpoll.h   2007-11-03 11:05:33.0 -0700
+++ b/include/linux/netpoll.h   2007-11-03 11:08:36.0 -0700
@@ -30,6 +30,9 @@ struct netpoll_info {
struct delayed_work tx_work;
 };
 
+
+#ifdef CONFIG_NETPOLL
+
 void netpoll_poll(struct netpoll *np);
 void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
 void netpoll_print_options(const char *prefix, struct netpoll *np);
@@ -38,32 +41,18 @@ int netpoll_setup(struct netpoll *np, st
 int netpoll_trap(void);
 void netpoll_set_trap(int trap);
 void netpoll_cleanup(struct netpoll *np);
-int __netpoll_rx(struct sk_buff *skb);
+bool __netpoll_rx(struct sk_buff *skb);
 
 
-#ifdef CONFIG_NETPOLL
-static inline int netpoll_rx(struct sk_buff *skb)
+/* Hijack incoming packet for use by netpoll.
+ * NB: may be called twice for NAPI case
+ */
+static inline bool netpoll_rx(struct sk_buff *skb)
 {
-   struct netpoll_info *npinfo = skb->dev->npinfo;
-   unsigned long flags;
-   int ret = 0;
-
-   if (!npinfo || !npinfo->rx_np)
-   return 0;
-
-   spin_lock_irqsave(&npinfo->rx_lock, flags);
-   if (__netpoll_rx(skb))
-   ret = 1;
-   spin_unlock_irqrestore(&npinfo->rx_lock, flags);
+   if (unlikely(skb->dev->npinfo))
+   return __netpoll_rx(skb);
 
-   return ret;
-}
-
-static inline int netpoll_receive_skb(struct sk_buff *skb)
-{
-   if (!list_empty(&skb->dev->napi_list))
-   return netpoll_rx(skb);
-   return 0;
+   return false;
 }
 
 static inline void *netpoll_poll_lock(struct napi_struct *napi)
--- a/net/core/dev.c2007-11-03 11:05:33.0 -0700
+++ b/net/core/dev.c2007-11-03 11:08:36.0 -0700
@@ -2020,8 +2020,7 @@ int netif_receive_skb(struct sk_buff *sk
int ret = NET_RX_DROP;
__be16 type;
 
-   /* if we've gotten here through NAPI, check netpoll */
-   if (netpoll_receive_skb(skb))
+   if (netpoll_rx(skb))
return NET_RX_DROP;
 
if (!skb->tstamp.tv64)
--- a/net/core/netpoll.c2007-11-03 11:08:23.0 -0700
+++ b/net/core/netpoll.c2007-11-03 11:08:36.0 -0700
@@ -458,16 +458,23 @@ static void arp_reply(struct sk_buff *sk
netpoll_send_skb(np, send_skb);
 }
 
-int __netpoll_rx(struct sk_buff *skb)
+bool __netpoll_rx(struct sk_buff *skb)
 {
int proto, len, ulen;
struct iphdr *iph;
struct udphdr *uh;
struct netpoll_info *npi = skb->dev->npinfo;
-   struct netpoll *np = npi->rx_np;
+   struct netpoll *np;
+   unsigned long flags;
+
+   if (!npi)
+   return false;
 
+   spin_lock_irqsave(&npi->rx_lock, flags);
+   np = npi->rx_np;
if (!np)
goto out;
+
if (skb->dev->type != ARPHRD_ETHER)
goto out;
 
@@ -528,20 +535,22 @@ int __netpoll_rx(struct sk_buff *skb)
np->rx_hook(np, ntohs(uh->source),
(char *)(uh+1),
ulen - sizeof(struct udphdr));
+   spin_unlock_irqrestore(&npi->rx_lock, flags);
 
kfree_skb(skb);
-   return 1;
+   return true;
 
 out:
+   spin_unlock_irqrestore(&npi->rx_lock, flags);
/* If packet received while already in poll then just
 * silently drop.
 */
if (atomic_read(&trapped)) {
kfree_skb(skb);
-   return 1;
+   return true;
}
 
-   return 0;
+   return false;
 }
 
 void netpoll_print_options(const char *name, struct netpoll *np)

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/11] netpoll: dont need rx_flags

2007-11-03 Thread Stephen Hemminger
The rx_flags variable is redundant. Turning rx on/off is done
via setting the rx_np pointer.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- a/include/linux/netpoll.h   2007-11-03 09:32:54.0 -0700
+++ b/include/linux/netpoll.h   2007-11-03 09:35:45.0 -0700
@@ -25,7 +25,6 @@ struct netpoll {
 
 struct netpoll_info {
atomic_t refcnt;
-   int rx_flags;
spinlock_t rx_lock;
struct netpoll *rx_np; /* netpoll that registered an rx_hook */
struct sk_buff_head arp_tx; /* list of arp requests to reply to */
@@ -51,12 +50,11 @@ static inline int netpoll_rx(struct sk_b
unsigned long flags;
int ret = 0;
 
-   if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags))
+   if (!npinfo || !npinfo->rx_np)
return 0;
 
spin_lock_irqsave(&npinfo->rx_lock, flags);
-   /* check rx_flags again with the lock held */
-   if (npinfo->rx_flags && __netpoll_rx(skb))
+   if (__netpoll_rx(skb))
ret = 1;
spin_unlock_irqrestore(&npinfo->rx_lock, flags);
 
--- a/net/core/netpoll.c2007-11-03 09:33:31.0 -0700
+++ b/net/core/netpoll.c2007-11-03 09:35:45.0 -0700
@@ -39,7 +39,6 @@ static struct sk_buff_head skb_pool;
 static atomic_t trapped;
 
 #define USEC_PER_POLL  50
-#define NETPOLL_RX_ENABLED  1
 
 #define MAX_SKB_SIZE \
(MAX_UDP_CHUNK + sizeof(struct udphdr) + \
@@ -675,7 +674,6 @@ int netpoll_setup(struct netpoll *np)
goto release;
}
 
-   npinfo->rx_flags = 0;
npinfo->rx_np = NULL;
 
spin_lock_init(&npinfo->rx_lock);
@@ -757,7 +755,6 @@ int netpoll_setup(struct netpoll *np)
 
if (np->rx_hook) {
spin_lock_irqsave(&npinfo->rx_lock, flags);
-   npinfo->rx_flags |= NETPOLL_RX_ENABLED;
npinfo->rx_np = np;
spin_unlock_irqrestore(&npinfo->rx_lock, flags);
}
@@ -799,7 +796,6 @@ void netpoll_cleanup(struct netpoll *np)
if (npinfo->rx_np == np) {
spin_lock_irqsave(&npinfo->rx_lock, flags);
npinfo->rx_np = NULL;
-   npinfo->rx_flags &= ~NETPOLL_RX_ENABLED;
spin_unlock_irqrestore(&npinfo->rx_lock, flags);
}
 

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 07/11] netpoll: get rid of name parameter

2007-11-03 Thread Stephen Hemminger
The name was being stored and used only for error messages.
The same effect can be had by just passing it in where needed during
config.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- a/drivers/net/netconsole.c  2007-11-03 10:03:40.0 -0700
+++ b/drivers/net/netconsole.c  2007-11-03 10:12:35.0 -0700
@@ -170,7 +170,6 @@ static struct netconsole_target *new_tar
 
nt = kzalloc(sizeof(*nt), GFP_KERNEL);
if (nt) {
-   nt->np.name = "netconsole";
strlcpy(nt->dev_name, "eth0", IFNAMSIZ);
nt->np.local_port = 6665;
nt->np.remote_port = ;
@@ -186,8 +185,13 @@ static int start_target(struct netconsol
int err;
 
dev = dev_get_by_name(&init_net, nt->dev_name);
-   if (!dev)
+   if (!dev) {
+   printk(KERN_ERR "netconsole: device '%s' does not exist.\n",
+  nt->dev_name);
return -ENODEV;
+   }
+
+   netpoll_print_options("netconsole", &nt->np);
 
err = netpoll_setup(&nt->np, dev);
if (err)
@@ -212,13 +216,16 @@ static struct netconsole_target *alloc_p
 
/* Parse parameters and setup netpoll */
err = netpoll_parse_options(&nt->np, target_config, nt->dev_name);
-   if (err)
+   if (err) {
+   printk(KERN_ERR "netconsole: parse options '%s' failed %d\n",
+  target_config, err);
goto fail;
-
+   }
 
err = start_target(nt);
if (err)
goto fail;
+
return nt;
 
 fail:
@@ -369,12 +376,6 @@ static ssize_t store_enabled(struct netc
return enabled;
 
if (enabled) {  /* 1 */
-   /*
-* Skip netpoll_parse_options() -- all the attributes are
-* already configured via configfs. Just print them out.
-*/
-   netpoll_print_options(&nt->np);
-
err = start_target(nt);
if (err)
return err;
--- a/include/linux/netpoll.h   2007-11-03 10:03:40.0 -0700
+++ b/include/linux/netpoll.h   2007-11-03 10:10:00.0 -0700
@@ -14,7 +14,6 @@
 
 struct netpoll {
struct net_device *dev;
-   const char *name;
void (*rx_hook)(struct netpoll *, int, char *, int);
 
u32 local_ip, remote_ip;
@@ -33,7 +32,7 @@ struct netpoll_info {
 
 void netpoll_poll(struct netpoll *np);
 void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
-void netpoll_print_options(struct netpoll *np);
+void netpoll_print_options(const char *prefix, struct netpoll *np);
 int netpoll_parse_options(struct netpoll *np, char *opt, char *name);
 int netpoll_setup(struct netpoll *np, struct net_device *dev);
 int netpoll_trap(void);
--- a/net/core/netpoll.c2007-11-03 10:03:40.0 -0700
+++ b/net/core/netpoll.c2007-11-03 10:22:44.0 -0700
@@ -544,21 +544,21 @@ out:
return 0;
 }
 
-void netpoll_print_options(struct netpoll *np)
+void netpoll_print_options(const char *name, struct netpoll *np)
 {
DECLARE_MAC_BUF(mac);
printk(KERN_INFO "%s: local port %d\n",
-np->name, np->local_port);
+name, np->local_port);
printk(KERN_INFO "%s: local IP %d.%d.%d.%d\n",
-np->name, HIPQUAD(np->local_ip));
+name, HIPQUAD(np->local_ip));
printk(KERN_INFO "%s: interface %s\n",
-np->name, np->dev->name);
+name, np->dev->name);
printk(KERN_INFO "%s: remote port %d\n",
-np->name, np->remote_port);
+name, np->remote_port);
printk(KERN_INFO "%s: remote IP %d.%d.%d.%d\n",
-np->name, HIPQUAD(np->remote_ip));
+name, HIPQUAD(np->remote_ip));
printk(KERN_INFO "%s: remote ethernet address %s\n",
-np->name, print_mac(mac, np->remote_mac));
+name, print_mac(mac, np->remote_mac));
 }
 
 int netpoll_parse_options(struct netpoll *np, char *opt, char *dev_name)
@@ -640,13 +640,9 @@ int netpoll_parse_options(struct netpoll
np->remote_mac[5] = simple_strtol(cur, NULL, 16);
}
 
-   netpoll_print_options(np);
-
return 0;
 
  parse_failed:
-   printk(KERN_INFO "%s: couldn't parse config at %s!\n",
-  np->name, cur);
return -1;
 }
 
@@ -679,8 +675,8 @@ int netpoll_setup(struct netpoll *np, st
}
 
if (!ndev->poll_controller) {
-   printk(KERN_ERR "%s: %s doesn't support polling, aborting.\n",
-  np->name, ndev->name);
+   printk(KERN_ERR "netpoll: %s doesn't support polling, 
aborting.\n",
+  ndev->name);
err = -ENOTSUPP;
goto release;
}
@@ -688,16 +684,16 @@ int netpoll_setu

[PATCH 09/11] netpoll: ethernet devices only

2007-11-03 Thread Stephen Hemminger
Netpoll only works on Ethernet devices, so check during setup
rather than just failing silently later.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- a/net/core/netpoll.c2007-11-03 11:05:33.0 -0700
+++ b/net/core/netpoll.c2007-11-03 11:08:23.0 -0700
@@ -653,6 +653,12 @@ int netpoll_setup(struct netpoll *np, st
unsigned long flags;
int err;
 
+   if (ndev->type != ARPHRD_ETHER) {
+   printk(KERN_ERR "netpoll: %s is not an ethernet device\n",
+  ndev->name);
+   return -EINVAL;
+   }
+
np->dev = ndev;
if (!ndev->npinfo) {
npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL);

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 02/11] netpoll: netpoll_poll cleanup

2007-11-03 Thread Stephen Hemminger
Restructure code slightly to improve readability:
  * dereference device once
  * change obvious while() loop
  * let poll_napi() handle null list itself

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- a/net/core/netpoll.c2007-11-03 10:02:50.0 -0700
+++ b/net/core/netpoll.c2007-11-03 11:40:27.0 -0700
@@ -139,16 +139,15 @@ static int poll_one_napi(struct netpoll_
return budget - work;
 }
 
-static void poll_napi(struct netpoll *np)
+static void poll_napi(struct net_device *dev)
 {
-   struct netpoll_info *npinfo = np->dev->npinfo;
-   struct napi_struct *napi;
int budget = 16;
+   struct napi_struct *napi;
 
-   list_for_each_entry(napi, &np->dev->napi_list, dev_list) {
+   list_for_each_entry(napi, &dev->napi_list, dev_list) {
if (napi->poll_owner != smp_processor_id() &&
spin_trylock(&napi->poll_lock)) {
-   budget = poll_one_napi(npinfo, napi, budget);
+   budget = poll_one_napi(dev->npinfo, napi, budget);
spin_unlock(&napi->poll_lock);
 
if (!budget)
@@ -159,30 +158,27 @@ static void poll_napi(struct netpoll *np
 
 static void service_arp_queue(struct netpoll_info *npi)
 {
-   struct sk_buff *skb;
+   if (npi) {
+   struct sk_buff *skb;
 
-   if (unlikely(!npi))
-   return;
-
-   skb = skb_dequeue(&npi->arp_tx);
-
-   while (skb != NULL) {
-   arp_reply(skb);
-   skb = skb_dequeue(&npi->arp_tx);
+   while ( (skb = skb_dequeue(&npi->arp_tx)) )
+   arp_reply(skb);
}
 }
 
 void netpoll_poll(struct netpoll *np)
 {
-   if (!np->dev || !netif_running(np->dev) || !np->dev->poll_controller)
+   struct net_device *dev = np->dev;
+
+   if (!dev || !netif_running(dev) || !dev->poll_controller)
return;
 
/* Process pending work on NIC */
-   np->dev->poll_controller(np->dev);
-   if (!list_empty(&np->dev->napi_list))
-   poll_napi(np);
+   dev->poll_controller(dev);
+
+   poll_napi(dev);
 
-   service_arp_queue(np->dev->npinfo);
+   service_arp_queue(dev->npinfo);
 
zap_completion_queue();
 }

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 06/11] netpoll: remove dev_name for npinfo

2007-11-03 Thread Stephen Hemminger
The device name was only in npinfo for netconsole target
configuration, so move it to netconsole.  Netconsole only
needs the value during config, so no need to do all
the device name tracking etc.. 

Make functions for common code for instantiation and 
start up.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- a/drivers/net/netconsole.c  2007-11-03 09:26:27.0 -0700
+++ b/drivers/net/netconsole.c  2007-11-03 10:02:18.0 -0700
@@ -96,6 +96,7 @@ struct netconsole_target {
struct config_item  item;
 #endif
int enabled;
+   chardev_name[IFNAMSIZ];
struct netpoll  np;
 };
 
@@ -157,39 +158,67 @@ static void netconsole_target_put(struct
 
 #endif /* CONFIG_NETCONSOLE_DYNAMIC */
 
+
+
+/*
+ * Allocate and initialize with defaults.
+ * Note that these targets get their config_item fields zeroed-out.
+ */
+static struct netconsole_target *new_target(void)
+{
+   struct netconsole_target *nt;
+
+   nt = kzalloc(sizeof(*nt), GFP_KERNEL);
+   if (nt) {
+   nt->np.name = "netconsole";
+   strlcpy(nt->dev_name, "eth0", IFNAMSIZ);
+   nt->np.local_port = 6665;
+   nt->np.remote_port = ;
+   memset(nt->np.remote_mac, 0xff, ETH_ALEN);
+   }
+
+   return nt;
+}
+
+static int start_target(struct netconsole_target *nt)
+{
+   struct net_device *dev;
+   int err;
+
+   dev = dev_get_by_name(&init_net, nt->dev_name);
+   if (!dev)
+   return -ENODEV;
+
+   err = netpoll_setup(&nt->np, dev);
+   if (err)
+   dev_put(dev);
+   else
+   nt->enabled = 1;
+   return err;
+}
+
+
 /* Allocate new target (from boot/module param) and setup netpoll for it */
 static struct netconsole_target *alloc_param_target(char *target_config)
 {
int err = -ENOMEM;
struct netconsole_target *nt;
 
-   /*
-* Allocate and initialize with defaults.
-* Note that these targets get their config_item fields zeroed-out.
-*/
-   nt = kzalloc(sizeof(*nt), GFP_KERNEL);
+   nt = new_target();
if (!nt) {
printk(KERN_ERR "netconsole: failed to allocate memory\n");
goto fail;
}
 
-   nt->np.name = "netconsole";
-   strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ);
-   nt->np.local_port = 6665;
-   nt->np.remote_port = ;
-   memset(nt->np.remote_mac, 0xff, ETH_ALEN);
-
/* Parse parameters and setup netpoll */
-   err = netpoll_parse_options(&nt->np, target_config);
+   err = netpoll_parse_options(&nt->np, target_config, nt->dev_name);
if (err)
goto fail;
 
-   err = netpoll_setup(&nt->np);
+
+   err = start_target(nt);
if (err)
goto fail;
-
-   nt->enabled = 1;
-
return nt;
 
 fail:
@@ -279,7 +308,8 @@ static ssize_t show_enabled(struct netco
 
 static ssize_t show_dev_name(struct netconsole_target *nt, char *buf)
 {
-   return snprintf(buf, PAGE_SIZE, "%s\n", nt->np.dev_name);
+   return snprintf(buf, PAGE_SIZE, "%s\n",
+   nt->enabled ? nt->np.dev->name : nt->dev_name);
 }
 
 static ssize_t show_local_port(struct netconsole_target *nt, char *buf)
@@ -339,14 +369,13 @@ static ssize_t store_enabled(struct netc
return enabled;
 
if (enabled) {  /* 1 */
-
/*
 * Skip netpoll_parse_options() -- all the attributes are
 * already configured via configfs. Just print them out.
 */
netpoll_print_options(&nt->np);
 
-   err = netpoll_setup(&nt->np);
+   err = start_target(nt);
if (err)
return err;
 
@@ -365,7 +394,7 @@ static ssize_t store_dev_name(struct net
  const char *buf,
  size_t count)
 {
-   size_t len;
+   char *cp;
 
if (nt->enabled) {
printk(KERN_ERR "netconsole: target (%s) is enabled, "
@@ -374,12 +403,12 @@ static ssize_t store_dev_name(struct net
return -EINVAL;
}
 
-   strlcpy(nt->np.dev_name, buf, IFNAMSIZ);
+   strlcpy(nt->dev_name, buf, IFNAMSIZ);
 
/* Get rid of possible trailing newline from echo(1) */
-   len = strnlen(nt->np.dev_name, IFNAMSIZ);
-   if (nt->np.dev_name[len - 1] == '\n')
-   nt->np.dev_name[len - 1] = '\0';
+   cp = strnchr(nt->dev_name, '\n', IFNAMSIZ);
+   if (cp)
+   *cp = '\0';
 
return strnlen(buf, count);
 }
@@ -591,21 +620,7 @@ static struct config_item *make_netconso
unsigned long flags;
struct netconsole_target *nt;
 
-   /*
-* Allocate and initialize with defaults.
-* Target is disabled at creation (enabled == 0).
-*/
-   nt = kzalloc(sizeof(*nt), GFP_KERNEL);
-   

[PATCH 03/11] netpoll: no need to store local_mac

2007-11-03 Thread Stephen Hemminger
The local_mac is managed by the network device, no need to
keep a spare copy and all the management problems that could
cause.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- a/include/linux/netpoll.h   2007-11-03 09:12:48.0 -0700
+++ b/include/linux/netpoll.h   2007-11-03 09:18:34.0 -0700
@@ -20,7 +20,7 @@ struct netpoll {
 
u32 local_ip, remote_ip;
u16 local_port, remote_port;
-   u8 local_mac[ETH_ALEN], remote_mac[ETH_ALEN];
+   u8 remote_mac[ETH_ALEN];
 };
 
 struct netpoll_info {
--- a/net/core/netpoll.c2007-11-03 09:18:30.0 -0700
+++ b/net/core/netpoll.c2007-11-03 09:19:34.0 -0700
@@ -360,8 +360,8 @@ void netpoll_send_udp(struct netpoll *np
eth = (struct ethhdr *) skb_push(skb, ETH_HLEN);
skb_reset_mac_header(skb);
skb->protocol = eth->h_proto = htons(ETH_P_IP);
-   memcpy(eth->h_source, np->local_mac, 6);
-   memcpy(eth->h_dest, np->remote_mac, 6);
+   memcpy(eth->h_source, np->dev->dev_addr, ETH_ALEN);
+   memcpy(eth->h_dest, np->remote_mac, ETH_ALEN);
 
skb->dev = np->dev;
 
@@ -431,7 +431,7 @@ static void arp_reply(struct sk_buff *sk
 
/* Fill the device header for the ARP frame */
if (dev_hard_header(send_skb, skb->dev, ptype,
-   sha, np->local_mac,
+   sha, np->dev->dev_addr,
send_skb->len) < 0) {
kfree_skb(send_skb);
return;
@@ -737,9 +737,6 @@ int netpoll_setup(struct netpoll *np)
}
}
 
-   if (is_zero_ether_addr(np->local_mac) && ndev->dev_addr)
-   memcpy(np->local_mac, ndev->dev_addr, 6);
-
if (!np->local_ip) {
rcu_read_lock();
in_dev = __in_dev_get_rcu(ndev);
--- a/drivers/net/netconsole.c  2007-10-17 15:25:31.0 -0700
+++ b/drivers/net/netconsole.c  2007-11-03 09:26:27.0 -0700
@@ -306,9 +306,11 @@ static ssize_t show_remote_ip(struct net
 
 static ssize_t show_local_mac(struct netconsole_target *nt, char *buf)
 {
+   struct net_device *dev = nt->np.dev;
+
DECLARE_MAC_BUF(mac);
return snprintf(buf, PAGE_SIZE, "%s\n",
-   print_mac(mac, nt->np.local_mac));
+   print_mac(mac, dev->dev_addr));
 }
 
 static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf)
@@ -667,7 +669,7 @@ static int netconsole_netdev_event(struc
struct netconsole_target *nt;
struct net_device *dev = ptr;
 
-   if (!(event == NETDEV_CHANGEADDR || event == NETDEV_CHANGENAME))
+   if (!(event == NETDEV_CHANGENAME))
goto done;
 
spin_lock_irqsave(&target_list_lock, flags);
@@ -675,10 +677,6 @@ static int netconsole_netdev_event(struc
netconsole_target_get(nt);
if (nt->np.dev == dev) {
switch (event) {
-   case NETDEV_CHANGEADDR:
-   memcpy(nt->np.local_mac, dev->dev_addr, 
ETH_ALEN);
-   break;
-
case NETDEV_CHANGENAME:
strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ);
break;

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 08/11] netpoll: NETPOLL_TRAP configuration change

2007-11-03 Thread Stephen Hemminger
NETPOLL_TRAP is actually not used by any in-tree code.
Rather than exposing it in kernel configuration, make it a selectable
option and make sure API is stubbed properly. I.e: if not configured
then netpoll_set_trap is not available.


Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

---
P.s: netpoll stuff should really be EXPORT_SYMBOL_GPL??


--- a/include/linux/netdevice.h 2007-11-03 11:30:57.0 -0700
+++ b/include/linux/netdevice.h 2007-11-03 11:30:59.0 -0700
@@ -837,8 +837,14 @@ extern int call_netdevice_notifiers(unsi
 extern struct net_device   *dev_get_by_index(struct net *net, int ifindex);
 extern struct net_device   *__dev_get_by_index(struct net *net, int 
ifindex);
 extern int dev_restart(struct net_device *dev);
+
 #ifdef CONFIG_NETPOLL_TRAP
 extern int netpoll_trap(void);
+extern voidnetpoll_set_trap(int trap);
+#else
+static inline int netpoll_trap(void) {
+   return 0;
+}
 #endif
 
 static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
@@ -918,12 +924,11 @@ static inline void netif_start_queue(str
  */
 static inline void netif_wake_queue(struct net_device *dev)
 {
-#ifdef CONFIG_NETPOLL_TRAP
if (netpoll_trap()) {
clear_bit(__LINK_STATE_XOFF, &dev->state);
return;
}
-#endif
+
if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
__netif_schedule(dev);
 }
@@ -993,10 +998,8 @@ static inline void netif_start_subqueue(
 static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index)
 {
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
-#ifdef CONFIG_NETPOLL_TRAP
if (netpoll_trap())
return;
-#endif
set_bit(__LINK_STATE_XOFF, &dev->egress_subqueue[queue_index].state);
 #endif
 }
@@ -1035,10 +1038,8 @@ static inline int netif_subqueue_stopped
 static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
 {
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
-#ifdef CONFIG_NETPOLL_TRAP
if (netpoll_trap())
return;
-#endif
if (test_and_clear_bit(__LINK_STATE_XOFF,
   &dev->egress_subqueue[queue_index].state))
__netif_schedule(dev);
--- a/drivers/net/Kconfig   2007-11-03 11:30:57.0 -0700
+++ b/drivers/net/Kconfig   2007-11-03 11:30:59.0 -0700
@@ -3118,8 +3118,8 @@ config NETCONSOLE_DYNAMIC
 config NETPOLL
def_bool NETCONSOLE
 
+# If needed use select to enable
 config NETPOLL_TRAP
-   bool "Netpoll traffic trapping"
default n
depends on NETPOLL
 
--- a/net/core/netpoll.c2007-11-03 11:30:57.0 -0700
+++ b/net/core/netpoll.c2007-11-03 11:31:45.0 -0700
@@ -803,6 +803,7 @@ void netpoll_cleanup(struct netpoll *np)
np->dev = NULL;
 }
 
+#ifdef CONFIG_NETPOLL_TRAP
 int netpoll_trap(void)
 {
return atomic_read(&trapped);
@@ -818,6 +819,8 @@ void netpoll_set_trap(int trap)
 
 EXPORT_SYMBOL(netpoll_set_trap);
 EXPORT_SYMBOL(netpoll_trap);
+#endif
+
 EXPORT_SYMBOL(netpoll_print_options);
 EXPORT_SYMBOL(netpoll_parse_options);
 EXPORT_SYMBOL(netpoll_setup);

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/11] netpoll cleanups

2007-11-03 Thread Stephen Hemminger
These patches simplify netpoll by better locking,
reorganizing code etc.

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 04/11] netpoll: alternative implementation of dropping

2007-11-03 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- a/net/core/netpoll.c2007-11-03 09:19:34.0 -0700
+++ b/net/core/netpoll.c2007-11-03 09:33:31.0 -0700
@@ -40,7 +40,6 @@ static atomic_t trapped;
 
 #define USEC_PER_POLL  50
 #define NETPOLL_RX_ENABLED  1
-#define NETPOLL_RX_DROP 2
 
 #define MAX_SKB_SIZE \
(MAX_UDP_CHUNK + sizeof(struct udphdr) + \
@@ -128,13 +127,11 @@ static int poll_one_napi(struct netpoll_
if (!test_bit(NAPI_STATE_SCHED, &napi->state))
return budget;
 
-   npinfo->rx_flags |= NETPOLL_RX_DROP;
atomic_inc(&trapped);
 
work = napi->poll(napi, budget);
 
atomic_dec(&trapped);
-   npinfo->rx_flags &= ~NETPOLL_RX_DROP;
 
return budget - work;
 }
@@ -475,7 +472,7 @@ int __netpoll_rx(struct sk_buff *skb)
if (skb->dev->type != ARPHRD_ETHER)
goto out;
 
-   /* check if netpoll clients need ARP */
+   /* if receive ARP during middle of NAPI poll, then queue */
if (skb->protocol == htons(ETH_P_ARP) &&
atomic_read(&trapped)) {
skb_queue_tail(&npi->arp_tx, skb);
@@ -537,6 +534,9 @@ int __netpoll_rx(struct sk_buff *skb)
return 1;
 
 out:
+   /* If packet received while already in poll then just
+* silently drop.
+*/
if (atomic_read(&trapped)) {
kfree_skb(skb);
return 1;

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/11] netpoll: use skb_queue_purge

2007-11-03 Thread Stephen Hemminger
Use standard route for flushing queue.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- a/net/core/netpoll.c2007-11-03 09:13:16.0 -0700
+++ b/net/core/netpoll.c2007-11-03 09:14:05.0 -0700
@@ -816,11 +812,7 @@ void netpoll_cleanup(struct netpoll *np)
cancel_rearming_delayed_work(&npinfo->tx_work);
 
/* clean after last, unfinished work */
-   if (!skb_queue_empty(&npinfo->txq)) {
-   struct sk_buff *skb;
-   skb = __skb_dequeue(&npinfo->txq);
-   kfree_skb(skb);
-   }
+   __skb_queue_purge(&npinfo->txq);
kfree(npinfo);
np->dev->npinfo = NULL;
}

-- 
Stephen Hemminger <[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: Endianness problem with u32 classifier hash masks

2007-11-03 Thread Jarek Poplawski
jamal wrote, On 11/03/2007 12:23 AM:

> On Fri, 2007-02-11 at 18:31 +0100, Jarek Poplawski wrote:
>> Radu Rendec wrote:
>>
>>> Hi,
>>>
>>> While trying to implement u32 hashes in my shaping machine I ran into a
>>> possible bug in the u32 hash/bucket computing algorithm
>>> (net/sched/cls_u32.c).
>>>
>>> The problem occurs only with hash masks that extend over the octet
>>> boundary, on little endian machines (where htonl() actually does
>>> something).
>>>
>>> I'm not 100% sure this is a problem with u32 itself, but at least I'm
>>> sure u32 with the same configuration would behave differently on little
>>> endian and big endian machines. Detailed description of the problem and
>>> proposed patch follow.
>>
>> I think you are right about this different behavior, so it looks like a bug.
>> And since little endian way is uncontrollable in such a case, your proposal
>> should be right.
>>
>> But, since there is a maintainer for this, let's check what is he not payed
>> for?! (Cc: Jamal Hadi Salim)
>>
> 
> Thanks for the CC Jarek - and i promise to share the loot with you when
> i lay my hands on it;->
> 
> I see that given the mask described (the 0 bits bounding the two
> nibbles), the same packet in that network will hit two different buckets
> depending on endianness. In other words there is lack of consistency. So
> good catch.
> The patch would certainly resolve it.
> The only thing that bothers me with the patch approach is the extra
> conversion in the fast path. Radu, since this is not a show stopper -
> can you give me a short time to sip on it? I am thinking it is probably
> resolvable by using the right tuning at config time - one knob that
> looks usable is fshift and that all this can be done at config time; but
> i may need more than one coffee to get it right, but if you see it just
> send a patch. I will try to use the data you used to see if i am making
> any sense.
> 
> cheers,
> jamal
> 
> -
> 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
> 


static __inline__ unsigned u32_hash_fold(u32 key, struct tc_u32_sel *sel, u8 
fshift)
{
#ifdef __LITTLE_ENDIAN
/*
 * It's a hack/optimization to avoid ntohl(). Since
 * it's only used in u32_classify(), and masked with
 * divisor (1 byte), one, least signinificant byte
 * of selection is enough.
 */
fshift = 32 - 8 - fshift;
#endif
unsigned h = (key & sel->hmask) >> fshift;

return h;
}




> --- linux-2.6.22.9/net/sched/cls_u32.c.orig   2007-10-30 17:08:03.0 
> +0200
> +++ linux-2.6.22.9/net/sched/cls_u32.c2007-10-30 17:04:49.0 
> +0200
> @@ -198,7 +198,7 @@
>   ht = n->ht_down;
>   sel = 0;
>   if (ht->divisor)
> - sel = 
> ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift);
> + sel = 
> ht->divisor&u32_hash_fold(ntohl(*(u32*)(ptr+n->sel.hoff)), &n->sel,n->fshift);
>  
>   if (!(n->sel.flags&(TC_U32_VAROFFSET|TC_U32_OFFSET|TC_U32_EAT)))
>   goto next_ht;
> @@ -626,6 +626,10 @@
>   }
>  #endif
>  
> + /* userspace tc tool sends us the hmask in network order, but we
> +  * need host order, so change it here */
> + s->hmask = ntohl(s->hmask);
> +
>   memcpy(&n->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key));
>   n->ht_up = ht;
>   n->handle = handle;
> @@ -735,9 +739,14 @@
>   u32 divisor = ht->divisor+1;
>   RTA_PUT(skb, TCA_U32_DIVISOR, 4, &divisor);
>   } else {
> + /* get the address where the selector will be put, then
> +  * change the hmask after it is put there */
> + struct tc_u32_sel *s =
> + (struct tc_u32_sel *)RTA_DATA(skb_tail_pointer(skb));
>   RTA_PUT(skb, TCA_U32_SEL,
>   sizeof(n->sel) + n->sel.nkeys*sizeof(struct tc_u32_key),
>   &n->sel);
> + s->hmask = htonl(s->hmask);
>   if (n->ht_up) {
>   u32 htid = n->handle & 0xF000;
>   RTA_PUT(skb, TCA_U32_HASH, 4, &htid);
> 
> 
> -
-
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 : removes per bucket rwlock in tcp/dccp ehash table

2007-11-03 Thread David Miller
From: Andi Kleen <[EMAIL PROTECTED]>
Date: Sun, 4 Nov 2007 00:18:14 +0100

> On Thursday 01 November 2007 11:16:20 Eric Dumazet wrote:
> 
> Some quick comments:
> 
> > +#if defined(CONFIG_SMP) || defined(CONFIG_PROVE_LOCKING)
> > +/*
> > + * Instead of using one rwlock for each inet_ehash_bucket, we use a table 
> > of locks
> > + * The size of this table is a power of two and depends on the number of 
> > CPUS.
> > + */
> 
> This shouldn't be hard coded based on NR_CPUS, but be done on runtime
> based on num_possible_cpus(). This is better for kernels with a large
> NR_CPUS, but which typically run on much smaller systems (like 
> distribution kernels) 

I think this is a good idea.  Eric, could you make this change?

> Also the EHASH_LOCK_SZ == 0 special case is a little strange. Why did
> you add that?

He explained this in another reply, because ifdefs are ugly.

> And as a unrelated node have you tried converting the rwlocks 
> into normal spinlocks? spinlocks should be somewhat cheaper
> because they have less cache protocol overhead and with
> the huge thash tables in Linux the chain walks should be short
> anyways so not doing this in parallel is probably not a big issue.
> At some point I also had a crazy idea of using a special locking
> scheme that special cases the common case that a hash chain
> has only one member and doesn't take a look for that at all. 

I agree.

There was movement at one point to get rid of all rwlock's in the
kernel, I personally think they are pointless.  Any use that makes
"sense" is a case where the code should be rewritten to decrease the
lock hold time or convert to RCU.
-
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: Problem accessing a Certain Remote IP with Kernel 2.6.24-rc1

2007-11-03 Thread Sparkletone

On Nov 3, 2007, at 6:05 PM, David Miller wrote:


Please do not forward his postings here, thank you.


I kind of figured something like that was the case, but decided to  
take the chance it was legit.


Don't worry about it happening 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] INET : removes per bucket rwlock in tcp/dccp ehash table

2007-11-03 Thread Andi Kleen
On Thursday 01 November 2007 11:16:20 Eric Dumazet wrote:

Looks good from a quick look. Thanks for doing that work.

Some quick comments:

> +#if defined(CONFIG_SMP) || defined(CONFIG_PROVE_LOCKING)
> +/*
> + * Instead of using one rwlock for each inet_ehash_bucket, we use a table of 
> locks
> + * The size of this table is a power of two and depends on the number of 
> CPUS.
> + */

This shouldn't be hard coded based on NR_CPUS, but be done on runtime
based on num_possible_cpus(). This is better for kernels with a large
NR_CPUS, but which typically run on much smaller systems (like 
distribution kernels) 

Also the EHASH_LOCK_SZ == 0 special case is a little strange. Why did
you add that?

And as a unrelated node have you tried converting the rwlocks 
into normal spinlocks? spinlocks should be somewhat cheaper
because they have less cache protocol overhead and with
the huge thash tables in Linux the chain walks should be short
anyways so not doing this in parallel is probably not a big issue.
At some point I also had a crazy idea of using a special locking
scheme that special cases the common case that a hash chain
has only one member and doesn't take a look for that at all. 

-Andi

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Problem accessing a Certain Remote IP with Kernel 2.6.24-rc1

2007-11-03 Thread David Miller
From: Sparkletone <[EMAIL PROTECTED]>
Date: Sat, 3 Nov 2007 15:34:18 -0500

> Forwarding this for someone who was getting bounces for some reason.

He's permanently banned from vger.kernel.org for some absurd trolling
behavior he exhibited some time ago.

Now he's trying to make some bug reports or whatnot in order to appear
legitimate.  Often this technique can be very effective if his
previous actions are not fresh in everyone's mind.  I'd like to ask
people to no assist him with this.

Please do not forward his postings here, thank you.
-
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] [POWERPC] Fix fs_enet module build

2007-11-03 Thread Jochen Friedrich

If fs_enet is build as module, mii-fec/mii-bitbang should be build as
module, as well. Otherwise some symbols remain undefined.

 Building modules, stage 2.
 MODPOST 5 modules
ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]>
---

This can be pulled from git://git.bocc.de/dbox2.git for-2.6.24

drivers/net/fs_enet/Makefile |   12 ++--
1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
index 02d4dc1..2f7563a 100644
--- a/drivers/net/fs_enet/Makefile
+++ b/drivers/net/fs_enet/Makefile
@@ -4,7 +4,15 @@

obj-$(CONFIG_FS_ENET) += fs_enet.o

-obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o
-obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o
+fs_enet-$(CONFIG_8xx) += mac-fec.o mac-scc.o
+fs_enet-$(CONFIG_CPM2) += mac-fcc.o
+
+ifeq ($(CONFIG_8xx),y)
+obj-$(CONFIG_FS_ENET) += mii-fec.o
+endif
+
+ifeq ($(CONFIG_CPM2),y)
+obj-$(CONFIG_FS_ENET) += mii-bitbang.o
+endif

fs_enet-objs := fs_enet-main.o
--
1.5.3.4

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fwd: Problem accessing a Certain Remote IP with Kernel 2.6.24-rc1

2007-11-03 Thread Sparkletone

Forwarding this for someone who was getting bounces for some reason.

Begin forwarded message:


From: Shlomi Fish <[EMAIL PROTECTED]>
Date: November 3, 2007 3:31:56 PM CDT
To: [EMAIL PROTECTED]
Subject: Problem accessing a Certain Remote IP with Kernel 2.6.24-rc1

Hi all!

I hope this mail gets through because last time I checked, I got  
bounces

whenever I tried to send email to LKML ("not liked source" for mail).

I've been having a problem with kernel 2.6.24-rc1 on Mandriva  
Cooker. The
problem is that after using it for a while connecting through TCP to  
the
following remote, Internet IP - 212.143.218.31 - takes a very long  
time.


Here's what I've learned:

1. Kernel 2.6.23 seem to exhibit this problem tooa fter a while.

2. It already happened twice with kernel 2.6.24-rc1.

3. A different computer on the same Home LAN connected via a NAT/ 
router has no
problem with that IP. (At the same time, the Linux computer exhibits  
the

problematic behaviour).

4. I could connect using telnet to port 80 eventually, but it took  
an awfully

long time.

5. I have problem with both HTTP to port 80 and POP.

6. Restarting the network ("/etc/init.d/network restart") does not  
help - only

a reboot.

7. The network as a whole (Google, etc.) works fine.

I need this IP, because it hosts my POP account and my homepage.

Per Rik van Riel's advice I prepared Ethereal (libpcap) dumps of the
conversations before ("good") and after ("bad") the problem surfaced:

http://freehackers.org/~shlomif/files/files/www.sf.org-conn-problem/

I'd appreciate if anyone would be able to shed more light on this  
problem and
hopefully fix it. Please let me know if there's anything else you  
need.


Regards,

Shlomi Fish

-
Shlomi Fish  [EMAIL PROTECTED]
Homepage:http://www.shlomifish.org/

I'm not an actor - I just play one on T.V.


-
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: RFC: Reproducible oops with lockdep on count_matching_names()

2007-11-03 Thread Michael Buesch
On Saturday 03 November 2007 20:58:09 Luis R. Rodriguez wrote:
> I was using SLAB and ran into other strange oops, as the one below,
> but after switching to SLUB, after Michael Buesch's suggestion that
> one went away... The lockdep segfault is still present, however.

Who is responsible for slab btw?
I mean, someone should be interested in getting this bug fixed. :)
When using slab I see random corruptions. I think related to rmmod, but
I'm not sure. I don't see this with slub.

-- 
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: RFC: Reproducible oops with lockdep on count_matching_names()

2007-11-03 Thread Luis R. Rodriguez
On 11/2/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-11-01 at 19:26 -0400, Michael Wu wrote:
> > On Thursday 01 November 2007 15:17:16 Luis R. Rodriguez wrote:
> > > [EMAIL PROTECTED]:~/devel/wireless-2.6$ git-describe
> > > v2.6.24-rc1-146-g2280253
> > >
> > > So I hit segfault with lockdep on count_matching_names() on the
> > > strcmp() multiple times now. This is reproducible and with different
> > > wireless drivers.
> > >
> > I've found the problem. It appears to be in lockdep. struct lock_class has a
> > const char *name field which points to a statically allocated string that
> > comes from the code which uses the lock. If that code/string is in a module
> > and gets unloaded, the pointer in |name| is no longer valid. Next time this
> > field is dereferenced (count_matching_names, in this case), we crash.
> >
> > The following patch fixes the issue but there's probably a better way.
>
> Thanks, and indeed. From my understanding lockdep_free_key_range()
> should destroy all classes of a module on module unload.
>
> So I'm not quite sure what has gone wrong here..

I've tried digging more and just am still not sure what caused this.
At first I thought perhaps all_lock_classes list had some element not
yet removed as lockdep_free_key_range() iterates over the hash tables
but this doesn't seem to be the case.

I was using SLAB and ran into other strange oops, as the one below,
but after switching to SLUB, after Michael Buesch's suggestion that
one went away... The lockdep segfault is still present, however.

Just not sure what's going on. Any ideas?

- oops with slab, not reproducible with slub:

[EMAIL PROTECTED]:~$ sudo rmmod tg3
[EMAIL PROTECTED]:~$ sudo rmmod sr_mod

*** dmesg -c

ACPI: PCI interrupt for device :02:00.0 disabled
BUG: unable to handle kernel paging request at virtual address f88a4a05
printing eip: f88a4a05 *pde = 0267 *pte = 
Oops:  [#1]
Modules linked in: sr_mod uinput thinkpad_acpi hwmon backlight nvram
ipv6 acpi_cpufreq cpufreq_userspace cpufreq_powersave cpufreq_ondemand
cpufreq_conservative dock arc4 ecb blkcipher cryptomgr crypto_algapi
rc80211_simple ath5k mac80211 cfg80211 pcmcia crc32 snd_hda_intel
snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_hwdep snd_seq_oss
ipw2200 snd_seq_midi_event ieee80211 ieee80211_crypt sg ehci_hcd
uhci_hcd yenta_socket rsrc_nonstatic snd_seq snd_timer snd_seq_device
firmware_class cdrom pcmcia_core usbcore evdev rng_core rtc snd
soundcore

Pid: 2908, comm: modprobe Not tainted (2.6.24-rc1 #18)
EIP: 0060:[] EFLAGS: 00010086 CPU: 0
EIP is at 0xf88a4a05
EAX: c20b75c8 EBX: c2f86f38 ECX: f88a4a05 EDX: c2f86f38
ESI: c20b75c8 EDI: c2f89c00 EBP: c3897bfc ESP: c3897be0
 DS: 007b ES: 007b FS:  GS: 0033 SS: 0068
Process modprobe (pid: 2908, ti=c3896000 task=c3935150 task.ti=c3896000)
Stack: c01b2afc c2f82d98 c3897bf4 c01ba8b6 c2f86f38 c20b75c8 c2f82c00 c3897c24
   c02186dd c2f86f38 c3897c24 c01b54c0 c20b75c8 0001 c20b75c8 c2f86f38
   c20b75c8 c3897c30 c01b54ed 0001 c3897c54 c01b556c 0001 c3897cd4
Call Trace:
 [] show_trace_log_lvl+0x1a/0x2f
 [] show_stack_log_lvl+0x9d/0xa5
 [] show_registers+0xad/0x17c
 [] die+0xf5/0x1c6
 [] do_page_fault+0x450/0x537
 [] error_code+0x6a/0x70
 [] scsi_request_fn+0x5f/0x2ec
 [] __generic_unplug_device+0x20/0x23
 [] blk_execute_rq_nowait+0x7c/0x8f
 [] blk_execute_rq+0xb1/0xcf
 [] scsi_execute+0xc4/0xd7
 [] scsi_execute_req+0xae/0xcb
 [] sr_probe+0x1d5/0x557 [sr_mod]
 [] driver_probe_device+0xe8/0x168
 [] __driver_attach+0x6a/0xa1
 [] bus_for_each_dev+0x36/0x5b
 [] driver_attach+0x19/0x1b
 [] bus_add_driver+0x73/0x1aa
 [] driver_register+0x67/0x6c
 [] scsi_register_driver+0xf/0x11
 [] init_sr+0x23/0x3d [sr_mod]
 [] sys_init_module+0x1142/0x1262
 [] sysenter_past_esp+0x5f/0xa5
 ===
Code:  Bad EIP value.
EIP: [] 0xf88a4a05 SS:ESP 0068:c3897be0

  Luis
-
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] [POWERPC] Fix typo #ifdef -> #ifndef

2007-11-03 Thread Jochen Friedrich

fpi->cp_command should be overwritten only if CONFIG_PPC_CPM_NEW_BINDING
is NOT set. Otherwise it is already set from the device tree.

Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]>
---

This can be pulled from git://git.bocc.de/dbox2.git for-2.6.24

drivers/net/fs_enet/mac-scc.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index 03134f4..48f2f30 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -158,7 +158,7 @@ static int setup_data(struct net_device *dev)
{
struct fs_enet_private *fep = netdev_priv(dev);

-#ifdef CONFIG_PPC_CPM_NEW_BINDING
+#ifndef CONFIG_PPC_CPM_NEW_BINDING
struct fs_platform_info *fpi = fep->fpi;

fep->scc.idx = fs_get_scc_index(fpi->fs_no);
--
1.5.3.4

-
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


[PATCH2/2] [POWERPC] fs_enet: select PHYLIB as the driver needs it.

2007-11-03 Thread Jochen Friedrich

Add a select PHYLIB to config FS_ENET as the driver uses functions of
libphy.

LD  .tmp_vmlinux1
drivers/built-in.o: In function `fs_ioctl':
drivers/net/fs_enet/fs_enet-main.c:952: undefined reference to `phy_mii_ioctl'
[...]
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]>
---
drivers/net/fs_enet/Kconfig |1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/fs_enet/Kconfig b/drivers/net/fs_enet/Kconfig
index 2765e49..24502d2 100644
--- a/drivers/net/fs_enet/Kconfig
+++ b/drivers/net/fs_enet/Kconfig
@@ -2,6 +2,7 @@ config FS_ENET
tristate "Freescale Ethernet Driver"
depends on CPM1 || CPM2
select MII
+   select PHYLIB

config FS_ENET_HAS_SCC
bool "Chip has an SCC usable for ethernet"
--
1.5.3.4




-
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


[PATCH0/2] [POWERPC] Two bug fixes for 2.6.24

2007-11-03 Thread Jochen Friedrich

Here is a series fixing some bugs for 8xx powerpc CPUs.

1. [POWERPC] Kill non-existant symbols from ksyms and commproc.h
2. [POWERPC] fs_enet: select PHYLIB as the driver needs it

This series can be pulled from git://git.bocc.de/dbox2.git for-2.6.24

Thanks,
Jochen


-
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


via-rhine driver stalls with: PHY status 786d, resetting...

2007-11-03 Thread Martin J. Bligh

Linux 2.6.23

http://bugzilla.kernel.org/show_bug.cgi?id=9300

Under any sort of traffic load (recursive scp from another box of a 
bunch of mp3s, for instance), I get continuous stalls. Recovers every

time, but is dog slow.

NETDEV WATCHDOG: eth2: transmit timed out
eth2: Transmit timed out, status , PHY status 786d, resetting...
eth2: link up, 100Mbps, full-duplex, lpa 0xCDE1

driver is via-rhine.

Google search indicates this has been a problem since at least 2.4.19 
and 2002 ... can we not fix this somehow? I have an e1000 card in this

box too, but that has similar issues ;-(
-
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: urgent! linux 2.6.16 network bridge crash

2007-11-03 Thread Jarek Poplawski
auther_bin wrote, On 11/03/2007 12:11 PM:

> Hello friends, I have config my linux box works as a network bridge. and
> up/down switch is both cisco 35xx works with vlan. but when i connect it
> into the network the box crashed right now. Puzzled!
> 
> btw, in the down(intranet) switch we connect 8 wireless AP.
> 
> tcpdump gives many many broadcast package like:
> 
> time serial M SRC_MAC > 1:0:0:0:0:0 sap aa ui/C
> 
> what's it?
> flood? or the AP package or the cisco vlan? but whatever it is, the box
> should not be crashed by it, right?
> 
> if the box do not use bridge, it will not crash at all.


Hi friend,

There is not much information (crash is more crash or more lockup?), so you
can only guess. Looks like a multicast problem (vs. vlan or bridge). Maybe
because of wrong MAC like here:

http://lkml.org/lkml/2007/5/12/83

Otherwise you should try to enable and send more debbugging.

Regards,
Jarek P.
-
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


[VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl

2007-11-03 Thread Patrick McHardy

Fix a regression in 2.6.23. Candidate for -stable IMO.

[VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl

Based on report and patch by Doug Kehn <[EMAIL PROTECTED]>:

vconfig returns the following error when attempting to execute the
set_ingress_map command:

vconfig: socket or ioctl error for set_ingress_map: Operation not permitted

In vlan.c, vlan_ioctl_handler for SET_VLAN_INGRESS_PRIORITY_CMD
sets err = -EPERM and calls vlan_dev_set_ingress_priority.
vlan_dev_set_ingress_priority is a void function so err remains
at -EPERM and results in the vconfig error (even though the ingress
map was set).

Fix by setting err = 0 after the vlan_dev_set_ingress_priority call.

Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>

---
commit db0d1d928ecdbd1a0c3f6d806c84b4f28a7af0e4
tree 4103b5a3a2dfa353cc4f1617729983650cfdd61a
parent 3743b5898464963ad2b169e3f487205b12fef472
author Patrick McHardy <[EMAIL PROTECTED]> Fri, 02 Nov 2007 18:59:39 +0100
committer Patrick McHardy <[EMAIL PROTECTED]> Fri, 02 Nov 2007 18:59:39 +0100

 net/8021q/vlan.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 3fe4fc8..1037748 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -747,6 +747,7 @@ static int vlan_ioctl_handler(struct net *net, void __user 
*arg)
vlan_dev_set_ingress_priority(dev,
  args.u.skb_priority,
  args.vlan_qos);
+   err = 0;
break;
 
case SET_VLAN_EGRESS_PRIORITY_CMD:


urgent! linux 2.6.16 network bridge crash

2007-11-03 Thread auther_bin
Hello friends, I have config my linux box works as a network bridge. and
up/down switch is both cisco 35xx works with vlan. but when i connect it
into the network the box crashed right now. Puzzled!

btw, in the down(intranet) switch we connect 8 wireless AP.

tcpdump gives many many broadcast package like:

time serial M SRC_MAC > 1:0:0:0:0:0 sap aa ui/C

what's it?
flood? or the AP package or the cisco vlan? but whatever it is, the box
should not be crashed by it, right?

if the box do not use bridge, it will not crash at all.


-
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