Netdev List
 help / color / mirror / Atom feed
* Re: [git patches] net driver updates
From: Andreas Kleen @ 2006-05-21 13:24 UTC (permalink / raw)
  To: Manfred Spraul
  Cc: Andrew Morton, Linus Torvalds, jeff, netdev, linux-kernel,
	Ayaz Abdulla
In-Reply-To: <447012B2.9050207@colorfullife.com>


> No idea, but unlikely. The fix removes a duplicate request_irq call.
> Is
> it possible that the both instances run concurrently?

The system has two Forcedeth ports, but only one has a cable connected.
I don't think there is any parallelism. Just one connection with a lot
of data. It didn't happen with 2.6.16.

If you don't have any other good ideas I will try to track it down.

-Andi


^ permalink raw reply

* Re: [PATCH 2/2] ipg: redundancy with mii.h
From: Francois Romieu @ 2006-05-21 10:16 UTC (permalink / raw)
  To: David Vrabel; +Cc: Pekka Enberg, linux-kernel, netdev, david, jesse
In-Reply-To: <446F840E.3020808@cantab.net>

David Vrabel <dvrabel@cantab.net> :
[...]
> 0007-ipg-plug-leaks-in-the-error-path-of-ipg_nic_open.txt broke receive 
> since it was skipping the initialization of the Rx buffers.  Patch attached.

Oops. Applied to branch netdev-ipg of
git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6.git

(please include the '-p' option in future invocation of diff)

I have put an updated patch against 2.6.17-rc4 for the whole driver at
http://www.fr.zoreil.com/people/francois/misc/20060521-2.6.17-rc4-git-ip1000-test.patch

-- 
Ueimor

^ permalink raw reply

* Re: [PATCH 2/2] ipg: redundancy with mii.h
From: Pekka Enberg @ 2006-05-21  7:23 UTC (permalink / raw)
  To: David Vrabel; +Cc: Francois Romieu, linux-kernel, netdev, jesse, david
In-Reply-To: <446F840E.3020808@cantab.net>

Hi David,

On 5/21/06, David Vrabel <dvrabel@cantab.net> wrote:
> Did anyone manage to get a response from IC Plus regarding the required
> Signed-off-by line?

The current IP1000A driver maintainer at IC Plus is
jesse@icplus.com.tw.  I have no received confirmation if he can sign
off or not yet.

                                         Pekka

^ permalink raw reply

* Re: [git patches] net driver updates
From: Manfred Spraul @ 2006-05-21  7:11 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Andrew Morton, Linus Torvalds, jeff, netdev, linux-kernel,
	Ayaz Abdulla
In-Reply-To: <200605210015.15847.ak@suse.de>

Andi Kleen wrote:

>My NF4Pro machine now reliably does
>
>Disconnecting: Bad packet length 3742984839.
>
>when I display a lot of data through ssh.  Apparently it generates some 
>corruption that's not caught by the TCP checksum.
>
The nic does hw checksumming - thus the tcp checksum won't catch driver 
bugs.

> Would that be fixed by this
>change too? 
>
>  
>
No idea, but unlikely. The fix removes a duplicate request_irq call. Is 
it possible that the both instances run concurrently?

--
    Manfred

^ permalink raw reply

* Welcome to TicketMonster!
From: Eloise Ritter @ 2006-05-21  0:46 UTC (permalink / raw)
  To: netdev

-S'ensationall revoolution in m'edicine!

-E'n'l'a'r'g'e your p''enis up to 10 cm or up to 4 inches!

-It's herbal solution what hasn't side effect, but has 100% guaranted results!

-Don't lose your chance and but know wihtout doubts, you will be impressed with results!

 Clisk here: http://thelullabyshop.info










recusant even contralateral uranyl trustful examine despond tnt care simplectic
bisexual conscription manhattan cowboy angles doctrinaire agrarian cyrillic iterate
bandgap charm cocklebur iodinate clotheshorse flippant charon casserole emancipate bandy catalysis
gospel vulcan lawrencium hangar apricot rundown hitachi raspberry
damnation irishmen diffusive inherit doomsday businessman sarcoma coco
galveston appear basalt wily support adept scat prevention

^ permalink raw reply

* Re: [git patches] net driver updates
From: Andi Kleen @ 2006-05-20 22:15 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linus Torvalds, jeff, netdev, linux-kernel, Manfred Spraul,
	Ayaz Abdulla
In-Reply-To: <20060520105547.220f2bea.akpm@osdl.org>

On Saturday 20 May 2006 19:55, Andrew Morton wrote:
> Linus Torvalds <torvalds@osdl.org> wrote:
> >
> > 
> > 
> > On Sat, 20 May 2006, Andrew Morton wrote:
> > > Jeff Garzik <jeff@garzik.org> wrote:
> > > >
> > > > Andrew Morton:
> > > >        revert "forcedeth: fix multi irq issues"
> > > 
> > > Manfred just found the fix for this, so we should no longer need to revert.
> > 
> > Hmm. I already pulled. I guess we can revert the revert and apply 
> > Manfreds fix. Jeff?
> > 
> 
> I can cook up the necessary pieces.

My NF4Pro machine now reliably does

Disconnecting: Bad packet length 3742984839.

when I display a lot of data through ssh.  Apparently it generates some 
corruption that's not caught by the TCP checksum. Would that be fixed by this
change too? 

-Andi


^ permalink raw reply

* Re: Was change to ip_push_pending_frames intended to break udp (more specifically, WCCP?)
From: Andrew Morton @ 2006-05-20 21:04 UTC (permalink / raw)
  To: Paul P Komkoff Jr; +Cc: linux-kernel, netdev
In-Reply-To: <20060520191153.GV3776@stingr.net>

Paul P Komkoff Jr <i@stingr.net> wrote:
>
> Hello!
> 
> I have a userspace application, which talks WCCP2 with cisco routers.
> It sends and receives UDP packets on port 2048. After I've updated my
> server to 2.6.16, it stopped working.
> 
> Examining logs and packet dumps of previous (2.6.15 kernel) vs.
> current, I found, that cisco will not understand packets generated by
> 2.6.16. The only difference in that packets was IP id field, which was
> increasing (1, 2, ...) with old kernel, and always 0 with 2.6.16.
> 
> Looking thru the changelog, I've found a suspect. It was this commit:
> http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a55d57b107c3e06935763905dc0fb235214569d
> 
> Reverting this patch fixes my problems - the router understands
> packets again.
> 
> I took a look through the code and ip_select_ident codepath but still
> don't understand why it setting id to 0.

(netdev cc added)

^ permalink raw reply

* Re: [PATCH 2/2] ipg: redundancy with mii.h
From: David Vrabel @ 2006-05-20 21:03 UTC (permalink / raw)
  To: Francois Romieu; +Cc: Pekka Enberg, linux-kernel, netdev, david
In-Reply-To: <20060504235549.GA9128@electric-eye.fr.zoreil.com>

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

Apologies for the (very) late response.

0007-ipg-plug-leaks-in-the-error-path-of-ipg_nic_open.txt broke receive 
since it was skipping the initialization of the Rx buffers.  Patch attached.

Did anyone manage to get a response from IC Plus regarding the required 
Signed-off-by line?

David Vrabel

[-- Attachment #2: ipg-fix-init_rfdlist --]
[-- Type: text/plain, Size: 1063 bytes --]

ipg: initialize Rx buffers correctly

A previous patch resulted in the initialization of the Rx buffers
being skipped.

Signed-off-by: David Vrabel <dvrabel@cantab.net>

--- linux-source-2.6.16.orig/drivers/net/ipg.c	2006-05-20 21:38:44.604788258 +0100
+++ linux-source-2.6.16/drivers/net/ipg.c	2006-05-20 21:39:14.298898552 +0100
@@ -1298,18 +1298,16 @@
 	sp->RxBuffNotReady = 0;
 
 	for (i = 0; i < IPG_RFDLIST_LENGTH; i++) {
-		if (!sp->RxBuff[i])
-			continue;
-
-		/* Free any allocated receive buffers. */
-		pci_unmap_single(sp->pdev,
-				 sp->RxBuffDMAhandle[i].dmahandle,
-				 sp->RxBuffDMAhandle[i].len,
-				 PCI_DMA_FROMDEVICE);
-
-		IPG_DEV_KFREE_SKB(sp->RxBuff[i]);
-		sp->RxBuff[i] = NULL;
+		if (sp->RxBuff[i]) {
+			/* Free any allocated receive buffers. */
+			pci_unmap_single(sp->pdev,
+					 sp->RxBuffDMAhandle[i].dmahandle,
+					 sp->RxBuffDMAhandle[i].len,
+					 PCI_DMA_FROMDEVICE);
 
+			IPG_DEV_KFREE_SKB(sp->RxBuff[i]);
+			sp->RxBuff[i] = NULL;
+		}
 		/* Clear out the RFS field. */
 		sp->RFDList[i].RFS = 0x0000000000000000;
 

^ permalink raw reply

* Re: [PATCH] Disable multipath cache routing
From: Chris Wedgwood @ 2006-05-20 20:51 UTC (permalink / raw)
  To: pravin b shelar
  Cc: Suresh Bhogavilli, Julian Anastasov, Ilia Sotnikov, netdev,
	Einar Lueck, lkml, Herbert Xu
In-Reply-To: <446EE440.8000808@calsoftinc.com>

(cc' list exploded to include various people who might not be reading
     netdev, sorry about that)

On Sat, May 20, 2006 at 03:11:20PM +0530, pravin b shelar wrote:
> I am working on Linux multipath networking and I will like to fix
> bugs related to equal cost multipath caching support.

My experience here is limited to having been using as and finding it
was creating erroneous routes which DaveM correctly guessed was the
result of CONFIG_IP_MULTIPATH_CACHED being enabled.

Looking over ipv4/route.c there is a fair bit of complex code to audit
(fib_semantics.c also needs to be checked, but it's not very involved)
so perhaps if you or someone else who understand this code well is
interested that would be a good place to start a code audit?

I see also a patch from Herbert Xu about disabling this on the input
path (the patch isn't present in the tree right now, I'm not sure if
it was revert/fixed or just never merged).  Perhaps he can also point
out what wrong here?

  http://oss.sgi.com/archives/netdev/2005-04/msg00232.html

Anyhow, the code as-is hasn't been maintained for a long time except
for a few minor blips (I'm using hg's annotate to find those and have
included those people on the cc' list as presumably there are using
these features and might have useful input).

^ permalink raw reply

* Fwd: Was change to ip_push_pending_frames intended to break udp (more specifically, WCCP?)
From: Alexey Dobriyan @ 2006-05-20 19:39 UTC (permalink / raw)
  To: netdev; +Cc: Paul P Komkoff Jr

----- Forwarded message from Paul P Komkoff Jr <i@stingr.net> -----

From: Paul P Komkoff Jr <i@stingr.net>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Was change to ip_push_pending_frames intended to break udp (more specifically, WCCP?)

Hello!

I have a userspace application, which talks WCCP2 with cisco routers.
It sends and receives UDP packets on port 2048. After I've updated my
server to 2.6.16, it stopped working.

Examining logs and packet dumps of previous (2.6.15 kernel) vs.
current, I found, that cisco will not understand packets generated by
2.6.16. The only difference in that packets was IP id field, which was
increasing (1, 2, ...) with old kernel, and always 0 with 2.6.16.

Looking thru the changelog, I've found a suspect. It was this commit:
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a55d57b107c3e06935763905dc0fb235214569d

Reverting this patch fixes my problems - the router understands
packets again.

I took a look through the code and ip_select_ident codepath but still
don't understand why it setting id to 0.
-- 
Paul P 'Stingray' Komkoff Jr // http://stingr.net/key <- my pgp key
 This message represents the official view of the voices in my head
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

----- End forwarded message -----


^ permalink raw reply

* Re: Linux v2.6.17-rc4
From: Alistair John Strachan @ 2006-05-20 19:11 UTC (permalink / raw)
  To: Ayaz Abdulla
  Cc: Linus Torvalds, Linux Kernel Mailing List, jeff, netdev,
	Manfred Spraul
In-Reply-To: <200605150627.19498.s0348365@sms.ed.ac.uk>

On Monday 15 May 2006 06:27, Alistair John Strachan wrote:
> On Sunday 14 May 2006 08:57, Ayaz Abdulla wrote:
> > Alistair John Strachan wrote:
>
> [snip]
>
> > > There's been just a single commit since -rc3:
> > >
> > > forcedeth: fix multi irq issues
> > > ebf34c9b6fcd22338ef764b039b3ac55ed0e297b
> > >
> > > However, it could have just been hidden since before -rc3, so I'll try
> > > to work backwards if nobody has any immediate ideas..
> >
> > The interrupt handler could be called during the same time (on different
> > cpu) the dev->stop function is clearing out the rings (nv_txrx_reset).
>
> FWIW, I can't reproduce the fault with the commitdiff
> ebf34c9b6fcd22338ef764b039b3ac55ed0e297b reverted.

Manfred located the fault and Andrew's holding a fix for it in -mm. Hopefully 
it'll end up in mainline before 2.6.17.

-- 
Cheers,
Alistair.

Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

^ permalink raw reply

* Re: [git patches] net driver updates
From: Andrew Morton @ 2006-05-20 17:55 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: jeff, netdev, linux-kernel
In-Reply-To: <Pine.LNX.4.64.0605201035510.10823@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> wrote:
>
> 
> 
> On Sat, 20 May 2006, Andrew Morton wrote:
> > Jeff Garzik <jeff@garzik.org> wrote:
> > >
> > > Andrew Morton:
> > >        revert "forcedeth: fix multi irq issues"
> > 
> > Manfred just found the fix for this, so we should no longer need to revert.
> 
> Hmm. I already pulled. I guess we can revert the revert and apply 
> Manfreds fix. Jeff?
> 

I can cook up the necessary pieces.

^ permalink raw reply

* Re: [git patches] net driver updates
From: Linus Torvalds @ 2006-05-20 17:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Jeff Garzik, netdev, linux-kernel
In-Reply-To: <20060520092033.7d404315.akpm@osdl.org>



On Sat, 20 May 2006, Andrew Morton wrote:
> Jeff Garzik <jeff@garzik.org> wrote:
> >
> > Andrew Morton:
> >        revert "forcedeth: fix multi irq issues"
> 
> Manfred just found the fix for this, so we should no longer need to revert.

Hmm. I already pulled. I guess we can revert the revert and apply 
Manfreds fix. Jeff?

		Linus

^ permalink raw reply

* Re: [git patches] net driver updates
From: Andrew Morton @ 2006-05-20 16:20 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: torvalds, netdev, linux-kernel
In-Reply-To: <20060520042856.GA7218@havoc.gtf.org>

Jeff Garzik <jeff@garzik.org> wrote:
>
> Andrew Morton:
>        revert "forcedeth: fix multi irq issues"

Manfred just found the fix for this, so we should no longer need to revert.

^ permalink raw reply

* Re: Netchannel subsystem update.
From: Evgeniy Polyakov @ 2006-05-20 15:52 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, kelly, rusty
In-Reply-To: <20060518103443.GB26183@2ka.mipt.ru>

The more I think about TCP processing in netchannels, the more I get
close to the following ideas:
 
 * map netchannel to socket.
 * implement own TCP (receiving for now) state machine.

So I would like to ask people, what do we want for netchannels
 
 * existing Linux TCP stack
 * fairly simple minimalistic RFC compliant stack

While developing first apporoach I've found that input TCP processing 
sometimes refers to dst_entry which can only be obtained through the input
routing code. You can find appropriate changes in attached incremental patch.
Full netchannel patch can be found at homepage [1].

Implementations is fairly proof-of-concept,
since I do not like the idea to bind netchannel to socket.<br/>
All TCP state machine is handled inside socket code, so userspace
must create listening socket, wait until new connection is created,
accept it and the bind netchannel to the newly created socket for
established connection. All further data flow is handled inside
netchannels, but actually it is not working as expected yet.

So question is how to process TCP state machine for netchannels: bind
them to socket and use existing code, or create small netchannel TCP
state machine?


1. Netchannel homepage.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=netchannel

Initial TCP support for netchannels. Incremental patch.
Proof-of-concept only.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

diff --git a/include/linux/netchannel.h b/include/linux/netchannel.h
index 7ab2fa0..c161809 100644
--- a/include/linux/netchannel.h
+++ b/include/linux/netchannel.h
@@ -55,6 +55,7 @@ struct unetchannel_control
 	__u32			len;
 	__u32			flags;
 	__u32			timeout;
+	unsigned int		fd;
 };
 
 #ifdef __KERNEL__
@@ -77,6 +78,8 @@ struct netchannel
 	unsigned int		qlen;
 
 	void			*priv;
+
+	struct inode 		*inode;
 };
 
 struct netchannel_cache_head
diff --git a/net/core/netchannel.c b/net/core/netchannel.c
index 96e5e5b..a33ed60 100644
--- a/net/core/netchannel.c
+++ b/net/core/netchannel.c
@@ -25,6 +25,7 @@
 #include <linux/notifier.h>
 #include <linux/list.h>
 #include <linux/slab.h>
+#include <linux/file.h>
 #include <linux/skbuff.h>
 #include <linux/errno.h>
 #include <linux/highmem.h>
@@ -114,7 +115,7 @@ static struct netchannel *netchannel_che
 	struct netchannel *nc;
 	struct hlist_node *node;
 	int found = 0;
-	
+
 	hlist_for_each_entry_rcu(nc, node, &bucket->head, node) {
 		if (netchannel_hash_equal_full(&nc->unc, unc)) {
 			found = 1;
@@ -125,6 +126,30 @@ static struct netchannel *netchannel_che
 	return (found)?nc:NULL;
 }
 
+static void netchannel_mmap_cleanup(struct netchannel *nc)
+{
+	unsigned int i;
+	struct netchannel_mmap *m = nc->priv;
+
+	for (i=0; i<m->pnum; ++i)
+		__free_page(m->page[i]);
+
+	kfree(m);
+}
+
+static void netchannel_cleanup(struct netchannel *nc)
+{
+	switch (nc->unc.type) {
+		case NETCHANNEL_COPY_USER:
+			break;
+		case NETCHANNEL_MMAP:
+			netchannel_mmap_cleanup(nc);
+			break;
+		default:
+			break;
+	}
+}
+
 static void netchannel_free_rcu(struct rcu_head *rcu)
 {
 	struct netchannel *nc = container_of(rcu, struct netchannel, rcu_head);
@@ -365,9 +390,11 @@ int netchannel_recv(struct sk_buff *skb)
 
 	skb_queue_tail(&nc->recv_queue, skb);
 	nc->qlen += skb->len;
+	wake_up(&nc->wait);
 
 unlock:
 	rcu_read_unlock();
+	
 	return err;
 }
 
@@ -420,9 +447,68 @@ static struct sk_buff *netchannel_get_sk
 	return skb;
 }
 
-/*
- * Actually it should be something like recvmsg().
- */
+static int netchannel_copy_to_user_tcp(struct netchannel *nc, unsigned int *timeout, unsigned int *len, void *arg)
+{
+	struct tcphdr *th;
+	int err = -ENODEV;
+	struct socket *sock;
+	struct sock *sk;
+	struct sk_buff *skb;
+
+	skb = netchannel_get_skb(nc, timeout, &err);
+	if (!skb)
+		return err;
+
+	if (!nc->inode)
+		goto err_out_free;
+	sock = SOCKET_I(nc->inode);
+	if (!sock || !sock->sk)
+		goto err_out_free;
+
+	sk = sock->sk;
+
+	__skb_pull(skb, skb->nh.iph->ihl*4);
+
+	skb->h.raw = skb->data;
+
+	th = skb->h.th;
+
+	printk("netchannel: TCP: syn: %u, fin: %u, rst: %u, psh: %u, ack: %u, urg: %u, ece: %u, cwr: %u, res1: %u, doff: %u.\n",
+			th->syn, th->fin, th->rst, th->psh, th->ack, th->urg, th->ece, th->cwr, th->res1, th->doff);
+	
+	if (sk->sk_state == TCP_ESTABLISHED) {
+		struct iovec to;
+		unsigned int copied;
+		
+		to.iov_base = arg;
+		to.iov_len = *len;
+
+		copied = skb->len;
+		if (copied > *len)
+			copied = *len;
+
+		if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
+			err = skb_copy_datagram_iovec(skb, 0, &to, copied);
+		} else {
+			err = skb_copy_and_csum_datagram_iovec(skb,0, &to);
+		}
+
+		*len = (err == 0)?copied:0;
+	}
+	
+	nc->qlen -= skb->len;
+
+	err = sk->sk_backlog_rcv(sk, skb);
+	printk("netchannel: TCP: sk_backlog_rcv() ret: %d.\n", err);
+	return err;
+
+err_out_free:
+	nc->qlen -= skb->len;
+	kfree_skb(skb);
+
+	return err;
+}
+
 static int netchannel_copy_to_user(struct netchannel *nc, unsigned int *timeout, unsigned int *len, void *arg)
 {
 	unsigned int copied;
@@ -632,30 +718,6 @@ err_out_free:
 	
 }
 
-static void netchannel_mmap_cleanup(struct netchannel *nc)
-{
-	unsigned int i;
-	struct netchannel_mmap *m = nc->priv;
-
-	for (i=0; i<m->pnum; ++i)
-		__free_page(m->page[i]);
-
-	kfree(m);
-}
-
-static void netchannel_cleanup(struct netchannel *nc)
-{
-	switch (nc->unc.type) {
-		case NETCHANNEL_COPY_USER:
-			break;
-		case NETCHANNEL_MMAP:
-			netchannel_mmap_cleanup(nc);
-			break;
-		default:
-			break;
-	}
-}
-
 static int netchannel_setup(struct netchannel *nc)
 {
 	int ret = 0;
@@ -668,7 +730,17 @@ static int netchannel_setup(struct netch
 	
 	switch (nc->unc.type) {
 		case NETCHANNEL_COPY_USER:
-			nc->nc_read_data = &netchannel_copy_to_user;
+			switch (nc->unc.proto) {
+				case IPPROTO_UDP:
+					nc->nc_read_data = &netchannel_copy_to_user;
+					break;
+				case IPPROTO_TCP:
+					nc->nc_read_data = &netchannel_copy_to_user_tcp;
+					break;
+				default:
+					ret = -EINVAL;
+					break;
+			}
 			break;
 		case NETCHANNEL_MMAP:
 			ret = netchannel_mmap_setup(nc);
@@ -681,15 +753,53 @@ static int netchannel_setup(struct netch
 	return ret;
 }
 
+static int netchannel_bind(struct unetchannel_control *ctl)
+{
+	struct netchannel *nc;
+	int err = -EINVAL, fput_needed;
+	struct netchannel_cache_head *bucket;
+	struct file *file;
+	struct inode *inode;
+
+	file = fget_light(ctl->fd, &fput_needed);
+	if (!file)
+		goto err_out_exit;
+
+	inode = igrab(file->f_dentry->d_inode);
+	if (!inode)
+		goto err_out_fput;
+
+	bucket = netchannel_bucket(&ctl->unc);
+	
+	mutex_lock(&bucket->mutex);
+	
+	nc = netchannel_check_full(&ctl->unc, bucket);
+	if (!nc) {
+		err = -ENODEV;
+		goto err_out_unlock;
+	}
+
+	nc->inode = inode;
+
+	fput_light(file, fput_needed);
+	mutex_unlock(&bucket->mutex);
+
+	return 0;
+
+err_out_unlock:
+	mutex_unlock(&bucket->mutex);
+err_out_fput:
+	fput_light(file, fput_needed);
+err_out_exit:
+	return err;
+}
+
 static int netchannel_create(struct unetchannel *unc)
 {
 	struct netchannel *nc;
 	int err = -ENOMEM;
 	struct netchannel_cache_head *bucket;
 	
-	if (!netchannel_hash_table)
-		return -ENODEV;
-
 	nc = kmem_cache_alloc(netchannel_cache, GFP_KERNEL);
 	if (!nc)
 		return -ENOMEM;
@@ -759,6 +869,11 @@ static int netchannel_remove(struct unet
 	hlist_del_rcu(&nc->node);
 	hit = nc->hit;
 	
+	if (nc->inode) {
+		iput(nc->inode);
+		nc->inode = NULL;
+	}
+	
 	netchannel_put(nc);
 	err = 0;
 
@@ -839,9 +954,11 @@ asmlinkage long sys_netchannel_control(v
 
 	switch (ctl.cmd) {
 		case NETCHANNEL_CREATE:
-		case NETCHANNEL_BIND:
 			ret = netchannel_create(&ctl.unc);
 			break;
+		case NETCHANNEL_BIND:
+			ret = netchannel_bind(&ctl);
+			break;
 		case NETCHANNEL_REMOVE:
 			ret = netchannel_remove(&ctl.unc);
 			break;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 672950e..eb2dc12 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -727,7 +727,10 @@ int tcp_v4_conn_request(struct sock *sk,
 #endif
 
 	/* Never answer to SYNs send to broadcast or multicast */
-	if (((struct rtable *)skb->dst)->rt_flags &
+	if (!skb->dst) {
+		if (MULTICAST(daddr))
+			goto drop;
+	} else if (((struct rtable *)skb->dst)->rt_flags &
 	    (RTCF_BROADCAST | RTCF_MULTICAST))
 		goto drop;
 
@@ -924,15 +927,21 @@ static struct sock *tcp_v4_hnd_req(struc
 	struct iphdr *iph = skb->nh.iph;
 	struct sock *nsk;
 	struct request_sock **prev;
+	int iif;
 	/* Find possible connection requests. */
 	struct request_sock *req = inet_csk_search_req(sk, &prev, th->source,
 						       iph->saddr, iph->daddr);
 	if (req)
 		return tcp_check_req(sk, skb, req, prev);
 
+	if (!skb->dst)
+		iif = 0;
+	else
+		iif = inet_iif(skb);
+
 	nsk = __inet_lookup_established(&tcp_hashinfo, skb->nh.iph->saddr,
 					th->source, skb->nh.iph->daddr,
-					ntohs(th->dest), inet_iif(skb));
+					ntohs(th->dest), iif);
 
 	if (nsk) {
 		if (nsk->sk_state != TCP_TIME_WAIT) {

-- 
	Evgeniy Polyakov

^ permalink raw reply related

* Re: [PATCH] Disable multipath cache routing
From: pravin b shelar @ 2006-05-20  9:41 UTC (permalink / raw)
  To: Chris Wedgwood; +Cc: netdev, Ravikiran G Thirumalai
In-Reply-To: <446ED597.20300@calsoftinc.com>

Chris Wedgwood wrote:
> Apparently IP_ROUTE_MULTIPATH_CACHED isn't entirely safe to use and
> will oops the kernel "sooner or later".  The Kconfig comment says
> EXPERIMENTAL but it's not.
>
> Let's go further and mark it BROKEN for now (leaving the comment as-is
> though).  If nobody steps up to resurrect this code we can discuss
> removing it entirely.
I am working on Linux multipath networking and I will like to fix bugs 
related to equal cost multipath caching support.

So can u send me following information about the oops :-

kernel version
config file
routing table setup ( any multipath setup information. e.g. multipath 
algorithm options)
iptable configuration
forwarding information
what was the oops message & what triggered that?

This will help me understand the problem.

Thanks & Regards,
Pravin.


^ permalink raw reply

* Re: [PATCH 3/4] myri10ge - Driver core
From: Brice Goglin @ 2006-05-20  7:58 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Arnd Bergmann, netdev, gallatin, linux-kernel
In-Reply-To: <446DE8CF.7050603@myri.com>

Brice Goglin wrote:
> Andi Kleen wrote:
>   
>> On Friday 19 May 2006 12:00, Arnd Bergmann wrote:
>>   
>>     
>>> On Friday 19 May 2006 04:25, Brice Goglin wrote:
>>>     
>>>       
>>>> dev_mc_upload() from net/core/dev_mcast.c does
>>>>
>>>> spin_lock_bh(&dev->xmit_lock);
>>>> __dev_mc_upload(dev);
>>>>
>>>> which calls dev->set_multicast_list(), which is
>>>> myri10ge_set_multicast_list()
>>>>
>>>> which calls myri10ge_change_promisc
>>>>
>>>> which calls myri10ge_send_cmd
>>>>       
>>>>         
>>> Hmm, if that is the only path where you call it, it may be
>>> helpful to change myri10ge_change_promisc to call a special
>>> atomic version of myri10ge_send_cmd then, while all others
>>> use the regular version, which you can then convert to
>>> do msleep as well.
>>>     
>>>       
>> Or just drop the xmit lock while you do that. As long as you
>> handle races with ->start_xmit yourself it's ok
>>   
>>     
>
> Looks like we can do that.
>   

Forget what I said. It's not that simple. __dev_mc_upload() is also
called from igmp6_group_added() (through dev_mc_add()). In this path,
there are two spin_lock_bh that are held:

igmp6_group_added(...)
    [...]
    spin_lock_bh(&mc->mca_lock);
    [...]
    dev_mc_add(...)

dev_mv_add(..)
    [...]
    spin_lock_bh(&dev->xmit_lock);
    [...]
    __dev_mc_upload(...)

We have actually seen this path being taken by adding a
    if (in_interrupt()) {
       printk("bad bad bad\n");
       dump_stack();
    }
in our myri10ge_send_cmd(...).

We are going to add a "sleepable" parameter to myri10ge_send_cmd() so
that only set_multicast_list() will use it with our previous udelay loop.

Brice

^ permalink raw reply

* [git patches] net driver updates
From: Jeff Garzik @ 2006-05-20  4:28 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel


Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git

to receive the following updates:

 drivers/net/forcedeth.c                     |  312 +++++++---------------------
 drivers/net/pcmcia/axnet_cs.c               |   13 -
 drivers/net/skge.c                          |    8 
 drivers/net/sky2.c                          |   54 ++--
 drivers/net/sky2.h                          |    2 
 drivers/net/tulip/winbond-840.c             |    4 
 drivers/net/via-rhine.c                     |   34 ---
 drivers/net/wireless/bcm43xx/bcm43xx_main.c |    6 
 8 files changed, 131 insertions(+), 302 deletions(-)

Andrew Morton:
      revert "forcedeth: fix multi irq issues"

David Woodhouse:
      bcm43xx: associate on 'ifconfig up'

Erling A. Jacobsen:
      winbond-840-remove-badness-in-pci_map_single

John W. Linville:
      via-rhine: revert "change mdelay to msleep and remove from ISR path"

Komuro:
      network: axnet_cs: bug fix multicast code (support older ax88190 chipset)

Stephen Hemminger:
      sky2: allow dual port usage
      Subjec: sky2, skge: correct PCI id for DGE-560T
      sky2: more fixes for Yukon Ultra
      sky2: force NAPI repoll if busy
      sky2 version 1.4
      skge: bad checksums on big-endian platforms
      skge: don't allow transmit ring to be too small

diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index f7235c9..7e078b4 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -106,7 +106,6 @@
  *	0.51: 20 Jan 2006: Add 64bit consistent memory allocation for rings.
  *	0.52: 20 Jan 2006: Add MSI/MSIX support.
  *	0.53: 19 Mar 2006: Fix init from low power mode and add hw reset.
- *	0.54: 21 Mar 2006: Fix spin locks for multi irqs and cleanup.
  *
  * Known bugs:
  * We suspect that on some hardware no TX done interrupts are generated.
@@ -118,7 +117,7 @@
  * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few
  * superfluous timer interrupts from the nic.
  */
-#define FORCEDETH_VERSION		"0.54"
+#define FORCEDETH_VERSION		"0.53"
 #define DRV_NAME			"forcedeth"
 
 #include <linux/module.h>
@@ -711,72 +710,6 @@ static void setup_hw_rings(struct net_de
 	}
 }
 
-static int using_multi_irqs(struct net_device *dev)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-
-	if (!(np->msi_flags & NV_MSI_X_ENABLED) ||
-	    ((np->msi_flags & NV_MSI_X_ENABLED) &&
-	     ((np->msi_flags & NV_MSI_X_VECTORS_MASK) == 0x1)))
-		return 0;
-	else
-		return 1;
-}
-
-static void nv_enable_irq(struct net_device *dev)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-
-	if (!using_multi_irqs(dev)) {
-		if (np->msi_flags & NV_MSI_X_ENABLED)
-			enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
-		else
-			enable_irq(dev->irq);
-	} else {
-		enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
-		enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector);
-		enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector);
-	}
-}
-
-static void nv_disable_irq(struct net_device *dev)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-
-	if (!using_multi_irqs(dev)) {
-		if (np->msi_flags & NV_MSI_X_ENABLED)
-			disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
-		else
-			disable_irq(dev->irq);
-	} else {
-		disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
-		disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector);
-		disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector);
-	}
-}
-
-/* In MSIX mode, a write to irqmask behaves as XOR */
-static void nv_enable_hw_interrupts(struct net_device *dev, u32 mask)
-{
-	u8 __iomem *base = get_hwbase(dev);
-
-	writel(mask, base + NvRegIrqMask);
-}
-
-static void nv_disable_hw_interrupts(struct net_device *dev, u32 mask)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-	u8 __iomem *base = get_hwbase(dev);
-
-	if (np->msi_flags & NV_MSI_X_ENABLED) {
-		writel(mask, base + NvRegIrqMask);
-	} else {
-		if (np->msi_flags & NV_MSI_ENABLED)
-			writel(0, base + NvRegMSIIrqMask);
-		writel(0, base + NvRegIrqMask);
-	}
-}
-
 #define MII_READ	(-1)
 /* mii_rw: read/write a register on the PHY.
  *
@@ -1086,25 +1019,24 @@ static void nv_do_rx_refill(unsigned lon
 	struct net_device *dev = (struct net_device *) data;
 	struct fe_priv *np = netdev_priv(dev);
 
-	if (!using_multi_irqs(dev)) {
-		if (np->msi_flags & NV_MSI_X_ENABLED)
-			disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
-		else
-			disable_irq(dev->irq);
+
+	if (!(np->msi_flags & NV_MSI_X_ENABLED) ||
+	    ((np->msi_flags & NV_MSI_X_ENABLED) &&
+	     ((np->msi_flags & NV_MSI_X_VECTORS_MASK) == 0x1))) {
+		disable_irq(dev->irq);
 	} else {
 		disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
 	}
 	if (nv_alloc_rx(dev)) {
-		spin_lock_irq(&np->lock);
+		spin_lock(&np->lock);
 		if (!np->in_shutdown)
 			mod_timer(&np->oom_kick, jiffies + OOM_REFILL);
-		spin_unlock_irq(&np->lock);
+		spin_unlock(&np->lock);
 	}
-	if (!using_multi_irqs(dev)) {
-		if (np->msi_flags & NV_MSI_X_ENABLED)
-			enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
-		else
-			enable_irq(dev->irq);
+	if (!(np->msi_flags & NV_MSI_X_ENABLED) ||
+	    ((np->msi_flags & NV_MSI_X_ENABLED) &&
+	     ((np->msi_flags & NV_MSI_X_VECTORS_MASK) == 0x1))) {
+		enable_irq(dev->irq);
 	} else {
 		enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
 	}
@@ -1736,7 +1668,15 @@ static int nv_change_mtu(struct net_devi
 		 * guessed, there is probably a simpler approach.
 		 * Changing the MTU is a rare event, it shouldn't matter.
 		 */
-		nv_disable_irq(dev);
+		if (!(np->msi_flags & NV_MSI_X_ENABLED) ||
+		    ((np->msi_flags & NV_MSI_X_ENABLED) &&
+		     ((np->msi_flags & NV_MSI_X_VECTORS_MASK) == 0x1))) {
+			disable_irq(dev->irq);
+		} else {
+			disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
+			disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector);
+			disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector);
+		}
 		spin_lock_bh(&dev->xmit_lock);
 		spin_lock(&np->lock);
 		/* stop engines */
@@ -1769,7 +1709,15 @@ static int nv_change_mtu(struct net_devi
 		nv_start_tx(dev);
 		spin_unlock(&np->lock);
 		spin_unlock_bh(&dev->xmit_lock);
-		nv_enable_irq(dev);
+		if (!(np->msi_flags & NV_MSI_X_ENABLED) ||
+		    ((np->msi_flags & NV_MSI_X_ENABLED) &&
+		     ((np->msi_flags & NV_MSI_X_VECTORS_MASK) == 0x1))) {
+			enable_irq(dev->irq);
+		} else {
+			enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
+			enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector);
+			enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector);
+		}
 	}
 	return 0;
 }
@@ -2160,16 +2108,16 @@ static irqreturn_t nv_nic_irq_tx(int foo
 		if (!(events & np->irqmask))
 			break;
 
-		spin_lock_irq(&np->lock);
+		spin_lock(&np->lock);
 		nv_tx_done(dev);
-		spin_unlock_irq(&np->lock);
+		spin_unlock(&np->lock);
 		
 		if (events & (NVREG_IRQ_TX_ERR)) {
 			dprintk(KERN_DEBUG "%s: received irq with events 0x%x. Probably TX fail.\n",
 						dev->name, events);
 		}
 		if (i > max_interrupt_work) {
-			spin_lock_irq(&np->lock);
+			spin_lock(&np->lock);
 			/* disable interrupts on the nic */
 			writel(NVREG_IRQ_TX_ALL, base + NvRegIrqMask);
 			pci_push(base);
@@ -2179,7 +2127,7 @@ static irqreturn_t nv_nic_irq_tx(int foo
 				mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
 			}
 			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i);
-			spin_unlock_irq(&np->lock);
+			spin_unlock(&np->lock);
 			break;
 		}
 
@@ -2209,14 +2157,14 @@ static irqreturn_t nv_nic_irq_rx(int foo
 		
 		nv_rx_process(dev);
 		if (nv_alloc_rx(dev)) {
-			spin_lock_irq(&np->lock);
+			spin_lock(&np->lock);
 			if (!np->in_shutdown)
 				mod_timer(&np->oom_kick, jiffies + OOM_REFILL);
-			spin_unlock_irq(&np->lock);
+			spin_unlock(&np->lock);
 		}
 		
 		if (i > max_interrupt_work) {
-			spin_lock_irq(&np->lock);
+			spin_lock(&np->lock);
 			/* disable interrupts on the nic */
 			writel(NVREG_IRQ_RX_ALL, base + NvRegIrqMask);
 			pci_push(base);
@@ -2226,7 +2174,7 @@ static irqreturn_t nv_nic_irq_rx(int foo
 				mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
 			}
 			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i);
-			spin_unlock_irq(&np->lock);
+			spin_unlock(&np->lock);
 			break;
 		}
 
@@ -2255,14 +2203,14 @@ static irqreturn_t nv_nic_irq_other(int 
 			break;
 		
 		if (events & NVREG_IRQ_LINK) {
-			spin_lock_irq(&np->lock);
+			spin_lock(&np->lock);
 			nv_link_irq(dev);
-			spin_unlock_irq(&np->lock);
+			spin_unlock(&np->lock);
 		}
 		if (np->need_linktimer && time_after(jiffies, np->link_timeout)) {
-			spin_lock_irq(&np->lock);
+			spin_lock(&np->lock);
 			nv_linkchange(dev);
-			spin_unlock_irq(&np->lock);
+			spin_unlock(&np->lock);
 			np->link_timeout = jiffies + LINK_TIMEOUT;
 		}
 		if (events & (NVREG_IRQ_UNKNOWN)) {
@@ -2270,7 +2218,7 @@ static irqreturn_t nv_nic_irq_other(int 
 						dev->name, events);
 		}
 		if (i > max_interrupt_work) {
-			spin_lock_irq(&np->lock);
+			spin_lock(&np->lock);
 			/* disable interrupts on the nic */
 			writel(NVREG_IRQ_OTHER, base + NvRegIrqMask);
 			pci_push(base);
@@ -2280,7 +2228,7 @@ static irqreturn_t nv_nic_irq_other(int 
 				mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
 			}
 			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i);
-			spin_unlock_irq(&np->lock);
+			spin_unlock(&np->lock);
 			break;
 		}
 
@@ -2303,11 +2251,10 @@ static void nv_do_nic_poll(unsigned long
 	 * nv_nic_irq because that may decide to do otherwise
 	 */
 
-	if (!using_multi_irqs(dev)) {
-		if (np->msi_flags & NV_MSI_X_ENABLED)
-			disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
-		else
-			disable_irq(dev->irq);
+	if (!(np->msi_flags & NV_MSI_X_ENABLED) ||
+	    ((np->msi_flags & NV_MSI_X_ENABLED) &&
+	     ((np->msi_flags & NV_MSI_X_VECTORS_MASK) == 0x1))) {
+		disable_irq(dev->irq);
 		mask = np->irqmask;
 	} else {
 		if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) {
@@ -2330,12 +2277,11 @@ static void nv_do_nic_poll(unsigned long
 	writel(mask, base + NvRegIrqMask);
 	pci_push(base);
 
-	if (!using_multi_irqs(dev)) {
+	if (!(np->msi_flags & NV_MSI_X_ENABLED) ||
+	    ((np->msi_flags & NV_MSI_X_ENABLED) &&
+	     ((np->msi_flags & NV_MSI_X_VECTORS_MASK) == 0x1))) {
 		nv_nic_irq((int) 0, (void *) data, (struct pt_regs *) NULL);
-		if (np->msi_flags & NV_MSI_X_ENABLED)
-			enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
-		else
-			enable_irq(dev->irq);
+		enable_irq(dev->irq);
 	} else {
 		if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) {
 			nv_nic_irq_rx((int) 0, (void *) data, (struct pt_regs *) NULL);
@@ -2682,113 +2628,6 @@ static void set_msix_vector_map(struct n
 	writel(readl(base + NvRegMSIXMap1) | msixmap, base + NvRegMSIXMap1);
 }
 
-static int nv_request_irq(struct net_device *dev)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-	u8 __iomem *base = get_hwbase(dev);
-	int ret = 1;
-	int i;
-
-	if (np->msi_flags & NV_MSI_X_CAPABLE) {
-		for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) {
-			np->msi_x_entry[i].entry = i;
-		}
-		if ((ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK))) == 0) {
-			np->msi_flags |= NV_MSI_X_ENABLED;
-			if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT) {
-				/* Request irq for rx handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, SA_SHIRQ, dev->name, dev) != 0) {
-					printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret);
-					pci_disable_msix(np->pci_dev);
-					np->msi_flags &= ~NV_MSI_X_ENABLED;
-					goto out_err;
-				}
-				/* Request irq for tx handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, SA_SHIRQ, dev->name, dev) != 0) {
-					printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret);
-					pci_disable_msix(np->pci_dev);
-					np->msi_flags &= ~NV_MSI_X_ENABLED;
-					goto out_free_rx;
-				}
-				/* Request irq for link and timer handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, SA_SHIRQ, dev->name, dev) != 0) {
-					printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret);
-					pci_disable_msix(np->pci_dev);
-					np->msi_flags &= ~NV_MSI_X_ENABLED;
-					goto out_free_tx;
-				}
-				/* map interrupts to their respective vector */
-				writel(0, base + NvRegMSIXMap0);
-				writel(0, base + NvRegMSIXMap1);
-				set_msix_vector_map(dev, NV_MSI_X_VECTOR_RX, NVREG_IRQ_RX_ALL);
-				set_msix_vector_map(dev, NV_MSI_X_VECTOR_TX, NVREG_IRQ_TX_ALL);
-				set_msix_vector_map(dev, NV_MSI_X_VECTOR_OTHER, NVREG_IRQ_OTHER);
-			} else {
-				/* Request irq for all interrupts */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) {
-					printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
-					pci_disable_msix(np->pci_dev);
-					np->msi_flags &= ~NV_MSI_X_ENABLED;
-					goto out_err;
-				}
-
-				/* map interrupts to vector 0 */
-				writel(0, base + NvRegMSIXMap0);
-				writel(0, base + NvRegMSIXMap1);
-			}
-		}
-	}
-	if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) {
-		if ((ret = pci_enable_msi(np->pci_dev)) == 0) {
-			np->msi_flags |= NV_MSI_ENABLED;
-			if (request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) {
-				printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
-				pci_disable_msi(np->pci_dev);
-				np->msi_flags &= ~NV_MSI_ENABLED;
-				goto out_err;
-			}
-
-			/* map interrupts to vector 0 */
-			writel(0, base + NvRegMSIMap0);
-			writel(0, base + NvRegMSIMap1);
-			/* enable msi vector 0 */
-			writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask);
-		}
-	}
-	if (ret != 0) {
-		if (request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0)
-			goto out_err;
-	}
-
-	return 0;
-out_free_tx:
-	free_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, dev);
-out_free_rx:
-	free_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, dev);
-out_err:
-	return 1;
-}
-
-static void nv_free_irq(struct net_device *dev)
-{
-	struct fe_priv *np = get_nvpriv(dev);
-	int i;
-
-	if (np->msi_flags & NV_MSI_X_ENABLED) {
-		for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) {
-			free_irq(np->msi_x_entry[i].vector, dev);
-		}
-		pci_disable_msix(np->pci_dev);
-		np->msi_flags &= ~NV_MSI_X_ENABLED;
-	} else {
-		free_irq(np->pci_dev->irq, dev);
-		if (np->msi_flags & NV_MSI_ENABLED) {
-			pci_disable_msi(np->pci_dev);
-			np->msi_flags &= ~NV_MSI_ENABLED;
-		}
-	}
-}
-
 static int nv_open(struct net_device *dev)
 {
 	struct fe_priv *np = netdev_priv(dev);
@@ -2881,16 +2720,12 @@ static int nv_open(struct net_device *de
 	udelay(10);
 	writel(readl(base + NvRegPowerState) | NVREG_POWERSTATE_VALID, base + NvRegPowerState);
 
-	nv_disable_hw_interrupts(dev, np->irqmask);
+	writel(0, base + NvRegIrqMask);
 	pci_push(base);
 	writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus);
 	writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus);
 	pci_push(base);
 
-	if (nv_request_irq(dev)) {
-		goto out_drain;
-	}
-
 	if (np->msi_flags & NV_MSI_X_CAPABLE) {
 		for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) {
 			np->msi_x_entry[i].entry = i;
@@ -2964,7 +2799,7 @@ static int nv_open(struct net_device *de
 	}
 
 	/* ask for interrupts */
-	nv_enable_hw_interrupts(dev, np->irqmask);
+	writel(np->irqmask, base + NvRegIrqMask);
 
 	spin_lock_irq(&np->lock);
 	writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA);
@@ -3008,6 +2843,7 @@ static int nv_close(struct net_device *d
 {
 	struct fe_priv *np = netdev_priv(dev);
 	u8 __iomem *base;
+	int i;
 
 	spin_lock_irq(&np->lock);
 	np->in_shutdown = 1;
@@ -3025,13 +2861,31 @@ static int nv_close(struct net_device *d
 
 	/* disable interrupts on the nic or we will lock up */
 	base = get_hwbase(dev);
-	nv_disable_hw_interrupts(dev, np->irqmask);
+	if (np->msi_flags & NV_MSI_X_ENABLED) {
+		writel(np->irqmask, base + NvRegIrqMask);
+	} else {
+		if (np->msi_flags & NV_MSI_ENABLED)
+			writel(0, base + NvRegMSIIrqMask);
+		writel(0, base + NvRegIrqMask);
+	}
 	pci_push(base);
 	dprintk(KERN_INFO "%s: Irqmask is zero again\n", dev->name);
 
 	spin_unlock_irq(&np->lock);
 
-	nv_free_irq(dev);
+	if (np->msi_flags & NV_MSI_X_ENABLED) {
+		for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) {
+			free_irq(np->msi_x_entry[i].vector, dev);
+		}
+		pci_disable_msix(np->pci_dev);
+		np->msi_flags &= ~NV_MSI_X_ENABLED;
+	} else {
+		free_irq(np->pci_dev->irq, dev);
+		if (np->msi_flags & NV_MSI_ENABLED) {
+			pci_disable_msi(np->pci_dev);
+			np->msi_flags &= ~NV_MSI_ENABLED;
+		}
+	}
 
 	drain_ring(dev);
 
@@ -3120,18 +2974,20 @@ static int __devinit nv_probe(struct pci
 	if (id->driver_data & DEV_HAS_HIGH_DMA) {
 		/* packet format 3: supports 40-bit addressing */
 		np->desc_ver = DESC_VER_3;
-		np->txrxctl_bits = NVREG_TXRXCTL_DESC_3;
 		if (pci_set_dma_mask(pci_dev, DMA_39BIT_MASK)) {
 			printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit addressing for device %s.\n",
 					pci_name(pci_dev));
 		} else {
-			dev->features |= NETIF_F_HIGHDMA;
-			printk(KERN_INFO "forcedeth: using HIGHDMA\n");
-		}
-		if (pci_set_consistent_dma_mask(pci_dev, 0x0000007fffffffffULL)) {
-			printk(KERN_INFO "forcedeth: 64-bit DMA (consistent) failed for device %s.\n",
-			       pci_name(pci_dev));
+			if (pci_set_consistent_dma_mask(pci_dev, 0x0000007fffffffffULL)) {
+				printk(KERN_INFO "forcedeth: 64-bit DMA (consistent) failed for device %s.\n",
+					pci_name(pci_dev));
+				goto out_relreg;
+			} else {
+				dev->features |= NETIF_F_HIGHDMA;
+				printk(KERN_INFO "forcedeth: using HIGHDMA\n");
+			}
 		}
+		np->txrxctl_bits = NVREG_TXRXCTL_DESC_3;
 	} else if (id->driver_data & DEV_HAS_LARGEDESC) {
 		/* packet format 2: supports jumbo frames */
 		np->desc_ver = DESC_VER_2;
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 448a094..2ea66ac 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -1691,17 +1691,6 @@ static void do_set_multicast_list(struct
 		memset(ei_local->mcfilter, 0xFF, 8);
 	}
 
-	/* 
-	 * DP8390 manuals don't specify any magic sequence for altering
-	 * the multicast regs on an already running card. To be safe, we
-	 * ensure multicast mode is off prior to loading up the new hash
-	 * table. If this proves to be not enough, we can always resort
-	 * to stopping the NIC, loading the table and then restarting.
-	 */
-	 
-	if (netif_running(dev))
-		outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
-
 	outb_p(E8390_NODMA + E8390_PAGE1, e8390_base + E8390_CMD);
 	for(i = 0; i < 8; i++) 
 	{
@@ -1715,6 +1704,8 @@ static void do_set_multicast_list(struct
   		outb_p(E8390_RXCONFIG | 0x48, e8390_base + EN0_RXCR);
   	else
   		outb_p(E8390_RXCONFIG | 0x40, e8390_base + EN0_RXCR);
+
+	outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, e8390_base+E8390_CMD);
 }
 
 /*
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index a70c2b0..5ca5a1b 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -78,8 +78,7 @@ static const struct pci_device_id skge_i
 	{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_GE) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_YU) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DLINK_DGE510T), },
-	{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) },
-	{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) },	/* DGE-530T */
 	{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */
 	{ PCI_DEVICE(PCI_VENDOR_ID_CNET, PCI_DEVICE_ID_CNET_GIGACARD) },
@@ -402,7 +401,7 @@ static int skge_set_ring_param(struct ne
 	int err;
 
 	if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE ||
-	    p->tx_pending == 0 || p->tx_pending > MAX_TX_RING_SIZE)
+	    p->tx_pending < MAX_SKB_FRAGS+1 || p->tx_pending > MAX_TX_RING_SIZE)
 		return -EINVAL;
 
 	skge->rx_ring.count = p->rx_pending;
@@ -2717,8 +2716,7 @@ static int skge_poll(struct net_device *
 		if (control & BMU_OWN)
 			break;
 
-		skb = skge_rx_get(skge, e, control, rd->status,
-				  le16_to_cpu(rd->csum2));
+		skb = skge_rx_get(skge, e, control, rd->status, rd->csum2);
 		if (likely(skb)) {
 			dev->last_rx = jiffies;
 			netif_receive_skb(skb);
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 62be6d9..60779eb 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -51,7 +51,7 @@ #endif
 #include "sky2.h"
 
 #define DRV_NAME		"sky2"
-#define DRV_VERSION		"1.3"
+#define DRV_VERSION		"1.4"
 #define PFX			DRV_NAME " "
 
 /*
@@ -105,6 +105,7 @@ MODULE_PARM_DESC(idle_timeout, "Idle tim
 static const struct pci_device_id sky2_id_table[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) },	/* DGE-560T */
 	{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4340) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4341) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4342) },
@@ -235,6 +236,7 @@ static int sky2_set_power_state(struct s
 		}
 
 		if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
+			sky2_write16(hw, B0_CTST, Y2_HW_WOL_ON);
 			sky2_pci_write32(hw, PCI_DEV_REG3, 0);
 			reg1 = sky2_pci_read32(hw, PCI_DEV_REG4);
 			reg1 &= P_ASPM_CONTROL_MSK;
@@ -306,7 +308,7 @@ static void sky2_phy_init(struct sky2_hw
 	u16 ctrl, ct1000, adv, pg, ledctrl, ledover;
 
 	if (sky2->autoneg == AUTONEG_ENABLE &&
-	    (hw->chip_id != CHIP_ID_YUKON_XL || hw->chip_id == CHIP_ID_YUKON_EC_U)) {
+	    !(hw->chip_id == CHIP_ID_YUKON_XL || hw->chip_id == CHIP_ID_YUKON_EC_U)) {
 		u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL);
 
 		ectrl &= ~(PHY_M_EC_M_DSC_MSK | PHY_M_EC_S_DSC_MSK |
@@ -1020,19 +1022,26 @@ static int sky2_up(struct net_device *de
 	struct sky2_hw *hw = sky2->hw;
 	unsigned port = sky2->port;
 	u32 ramsize, rxspace, imask;
-	int err;
+	int cap, err = -ENOMEM;
 	struct net_device *otherdev = hw->dev[sky2->port^1];
 
-	/* Block bringing up both ports at the same time on a dual port card.
-	 * There is an unfixed bug where receiver gets confused and picks up
-	 * packets out of order. Until this is fixed, prevent data corruption.
+	/*
+ 	 * On dual port PCI-X card, there is an problem where status
+	 * can be received out of order due to split transactions
 	 */
-	if (otherdev && netif_running(otherdev)) {
-		printk(KERN_INFO PFX "dual port support is disabled.\n");
-		return -EBUSY;
-	}
+	if (otherdev && netif_running(otherdev) &&
+ 	    (cap = pci_find_capability(hw->pdev, PCI_CAP_ID_PCIX))) {
+ 		struct sky2_port *osky2 = netdev_priv(otherdev);
+ 		u16 cmd;
+
+ 		cmd = sky2_pci_read16(hw, cap + PCI_X_CMD);
+ 		cmd &= ~PCI_X_CMD_MAX_SPLIT;
+ 		sky2_pci_write16(hw, cap + PCI_X_CMD, cmd);
+
+ 		sky2->rx_csum = 0;
+ 		osky2->rx_csum = 0;
+ 	}
 
-	err = -ENOMEM;
 	if (netif_msg_ifup(sky2))
 		printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);
 
@@ -1910,6 +1919,12 @@ static inline void sky2_tx_done(struct n
 	}
 }
 
+/* Is status ring empty or is there more to do? */
+static inline int sky2_more_work(const struct sky2_hw *hw)
+{
+	return (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX));
+}
+
 /* Process status response ring */
 static int sky2_status_intr(struct sky2_hw *hw, int to_do)
 {
@@ -2182,19 +2197,19 @@ static int sky2_poll(struct net_device *
 	if (status & Y2_IS_CHK_TXA2)
 		sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2);
 
-	if (status & Y2_IS_STAT_BMU)
-		sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
-
 	work_done = sky2_status_intr(hw, work_limit);
 	*budget -= work_done;
 	dev0->quota -= work_done;
 
-	if (work_done >= work_limit)
+	if (status & Y2_IS_STAT_BMU)
+		sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
+
+	if (sky2_more_work(hw))
 		return 1;
 
 	netif_rx_complete(dev0);
 
-	status = sky2_read32(hw, B0_Y2_SP_LISR);
+	sky2_read32(hw, B0_Y2_SP_LISR);
 	return 0;
 }
 
@@ -3078,12 +3093,7 @@ #endif
 	sky2->duplex = -1;
 	sky2->speed = -1;
 	sky2->advertising = sky2_supported_modes(hw);
-
-	/* Receive checksum disabled for Yukon XL
-	 * because of observed problems with incorrect
-	 * values when multiple packets are received in one interrupt
-	 */
-	sky2->rx_csum = (hw->chip_id != CHIP_ID_YUKON_XL);
+	sky2->rx_csum = 1;
 
 	spin_lock_init(&sky2->phy_lock);
 	sky2->tx_pending = TX_DEF_PENDING;
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index 8012994..8a0bc55 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -214,6 +214,8 @@ #define RAM_BUFFER(port, reg)	(reg | (po
 enum {
 	Y2_VMAIN_AVAIL	= 1<<17,/* VMAIN available (YUKON-2 only) */
 	Y2_VAUX_AVAIL	= 1<<16,/* VAUX available (YUKON-2 only) */
+	Y2_HW_WOL_ON	= 1<<15,/* HW WOL On  (Yukon-EC Ultra A1 only) */
+	Y2_HW_WOL_OFF	= 1<<14,/* HW WOL On  (Yukon-EC Ultra A1 only) */
 	Y2_ASF_ENABLE	= 1<<13,/* ASF Unit Enable (YUKON-2 only) */
 	Y2_ASF_DISABLE	= 1<<12,/* ASF Unit Disable (YUKON-2 only) */
 	Y2_CLK_RUN_ENA	= 1<<11,/* CLK_RUN Enable  (YUKON-2 only) */
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index ba05ded..136a70c 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -850,7 +850,7 @@ static void init_rxtx_rings(struct net_d
 			break;
 		skb->dev = dev;			/* Mark as being used by this device. */
 		np->rx_addr[i] = pci_map_single(np->pci_dev,skb->data,
-					skb->len,PCI_DMA_FROMDEVICE);
+					np->rx_buf_sz,PCI_DMA_FROMDEVICE);
 
 		np->rx_ring[i].buffer1 = np->rx_addr[i];
 		np->rx_ring[i].status = DescOwn;
@@ -1316,7 +1316,7 @@ #endif
 			skb->dev = dev;			/* Mark as being used by this device. */
 			np->rx_addr[entry] = pci_map_single(np->pci_dev,
 							skb->data,
-							skb->len, PCI_DMA_FROMDEVICE);
+							np->rx_buf_sz, PCI_DMA_FROMDEVICE);
 			np->rx_ring[entry].buffer1 = np->rx_addr[entry];
 		}
 		wmb();
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index a6dc53b..fdc2103 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -491,8 +491,6 @@ struct rhine_private {
 	u8 tx_thresh, rx_thresh;
 
 	struct mii_if_info mii_if;
-	struct work_struct tx_timeout_task;
-	struct work_struct check_media_task;
 	void __iomem *base;
 };
 
@@ -500,8 +498,6 @@ static int  mdio_read(struct net_device 
 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
 static int  rhine_open(struct net_device *dev);
 static void rhine_tx_timeout(struct net_device *dev);
-static void rhine_tx_timeout_task(struct net_device *dev);
-static void rhine_check_media_task(struct net_device *dev);
 static int  rhine_start_tx(struct sk_buff *skb, struct net_device *dev);
 static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
 static void rhine_tx(struct net_device *dev);
@@ -856,12 +852,6 @@ #endif
 	if (rp->quirks & rqRhineI)
 		dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM;
 
-	INIT_WORK(&rp->tx_timeout_task,
-		  (void (*)(void *))rhine_tx_timeout_task, dev);
-
-	INIT_WORK(&rp->check_media_task,
-		  (void (*)(void *))rhine_check_media_task, dev);
-
 	/* dev->name not defined before register_netdev()! */
 	rc = register_netdev(dev);
 	if (rc)
@@ -1108,11 +1098,6 @@ static void rhine_set_carrier(struct mii
 		       netif_carrier_ok(mii->dev));
 }
 
-static void rhine_check_media_task(struct net_device *dev)
-{
-	rhine_check_media(dev, 0);
-}
-
 static void init_registers(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
@@ -1166,8 +1151,8 @@ static void rhine_disable_linkmon(void _
 	if (quirks & rqRhineI) {
 		iowrite8(0x01, ioaddr + MIIRegAddr);	// MII_BMSR
 
-		/* Do not call from ISR! */
-		msleep(1);
+		/* Can be called from ISR. Evil. */
+		mdelay(1);
 
 		/* 0x80 must be set immediately before turning it off */
 		iowrite8(0x80, ioaddr + MIICmd);
@@ -1257,16 +1242,6 @@ static int rhine_open(struct net_device 
 static void rhine_tx_timeout(struct net_device *dev)
 {
 	struct rhine_private *rp = netdev_priv(dev);
-
-	/*
-	 * Move bulk of work outside of interrupt context
-	 */
-	schedule_work(&rp->tx_timeout_task);
-}
-
-static void rhine_tx_timeout_task(struct net_device *dev)
-{
-	struct rhine_private *rp = netdev_priv(dev);
 	void __iomem *ioaddr = rp->base;
 
 	printk(KERN_WARNING "%s: Transmit timed out, status %4.4x, PHY status "
@@ -1677,7 +1652,7 @@ static void rhine_error(struct net_devic
 	spin_lock(&rp->lock);
 
 	if (intr_status & IntrLinkChange)
-		schedule_work(&rp->check_media_task);
+		rhine_check_media(dev, 0);
 	if (intr_status & IntrStatsMax) {
 		rp->stats.rx_crc_errors += ioread16(ioaddr + RxCRCErrs);
 		rp->stats.rx_missed_errors += ioread16(ioaddr + RxMissed);
@@ -1927,9 +1902,6 @@ static int rhine_close(struct net_device
 	spin_unlock_irq(&rp->lock);
 
 	free_irq(rp->pdev->irq, dev);
-
-	flush_scheduled_work();
-
 	free_rbufs(dev);
 	free_tbufs(dev);
 	free_ring(dev);
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
index e2982a8..7ed18ca 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3271,6 +3271,9 @@ static int bcm43xx_init_board(struct bcm
 	bcm43xx_sysfs_register(bcm);
 	//FIXME: check for bcm43xx_sysfs_register failure. This function is a bit messy regarding unwinding, though...
 
+	/*FIXME: This should be handled by softmac instead. */
+	schedule_work(&bcm->softmac->associnfo.work);
+
 	assert(err == 0);
 out:
 	return err;
@@ -3946,9 +3949,6 @@ static int bcm43xx_resume(struct pci_dev
 
 	netif_device_attach(net_dev);
 	
-	/*FIXME: This should be handled by softmac instead. */
-	schedule_work(&bcm->softmac->associnfo.work);
-
 	dprintk(KERN_INFO PFX "Device resumed.\n");
 
 	return 0;

^ permalink raw reply related

* Re: [PATCH] MPPE probably doesn't need to be EXPERIMENTAL
From: Matt Domsch @ 2006-05-20  3:54 UTC (permalink / raw)
  To: Chris Wedgwood; +Cc: netdev, David S. Miller
In-Reply-To: <20060520025308.GC9486@taniwha.stupidest.org>

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

On Fri, May 19, 2006 at 07:53:08PM -0700, Chris Wedgwood wrote:
> A lot of people use MPPE and I'm not aware of too many complaints with
> this.  Remove it's EXPERIMENTAL status.
> 
> 
> Signed-off-by: Chris Wedgwood <cw@f00f.org>

Acked-by: Matt Domsch <Matt_Domsch@dell.com>

Thanks Chris!
-Matt

--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* [PATCH] MPPE probably doesn't need to be EXPERIMENTAL
From: Chris Wedgwood @ 2006-05-20  2:53 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Matt Domsch

A lot of people use MPPE and I'm not aware of too many complaints with
this.  Remove it's EXPERIMENTAL status.


Signed-off-by: Chris Wedgwood <cw@f00f.org>

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index aa633fa..2c56a95 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2579,8 +2579,8 @@ config PPP_BSDCOMP
 	  modules once you have said "make modules". If unsure, say N.
 
 config PPP_MPPE
-       tristate "PPP MPPE compression (encryption) (EXPERIMENTAL)"
-       depends on PPP && EXPERIMENTAL
+       tristate "PPP MPPE compression (encryption)"
+       depends on PPP
        select CRYPTO
        select CRYPTO_SHA1
        select CRYPTO_ARC4

^ permalink raw reply related

* [PATCH] Disable multipath cache routing
From: Chris Wedgwood @ 2006-05-20  2:52 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller

Apparently IP_ROUTE_MULTIPATH_CACHED isn't entirely safe to use and
will oops the kernel "sooner or later".  The Kconfig comment says
EXPERIMENTAL but it's not.

Let's go further and mark it BROKEN for now (leaving the comment as-is
though).  If nobody steps up to resurrect this code we can discuss
removing it entirely.


Signed-off-by: Chris Wedgwood <cw@f00f.org>

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 011cca7..3a08b9e 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -124,7 +124,7 @@ config IP_ROUTE_MULTIPATH
 
 config IP_ROUTE_MULTIPATH_CACHED
 	bool "IP: equal cost multipath with caching support (EXPERIMENTAL)"
-	depends on IP_ROUTE_MULTIPATH
+	depends on IP_ROUTE_MULTIPATH && BROKEN
 	help
 	  Normally, equal cost multipath routing is not supported by the
 	  routing cache. If you say Y here, alternative routes are cached

^ permalink raw reply related

* [PATCH] net/atm/: endian annotations
From: Alexey Dobriyan @ 2006-05-20  0:46 UTC (permalink / raw)
  To: netdev; +Cc: Chas Williams, Al Viro, linux-atm-general

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/atmbr2684.h |    4 ++--
 include/linux/atmmpc.h    |    8 ++++----
 net/atm/br2684.c          |    2 +-
 net/atm/clip.c            |    4 ++--
 net/atm/lec.c             |    2 +-
 net/atm/mpc.c             |   20 ++++++++++----------
 net/atm/mpc.h             |    6 +++---
 net/atm/mpoa_caches.c     |   12 ++++++------
 net/atm/mpoa_caches.h     |   14 +++++++-------
 net/atm/mpoa_proc.c       |    6 +++---
 10 files changed, 39 insertions(+), 39 deletions(-)

--- a/include/linux/atmbr2684.h
+++ b/include/linux/atmbr2684.h
@@ -86,8 +86,8 @@ struct atm_backend_br2684 {
  * efficient per-if in/out filters, this support will be removed
  */
 struct br2684_filter {
-	__u32	prefix;		/* network byte order */
-	__u32	netmask;	/* 0 = disable filter */
+	__be32	prefix;
+	__be32	netmask;	/* 0 = disable filter */
 };
 
 struct br2684_filter_set {
--- a/include/linux/atmmpc.h
+++ b/include/linux/atmmpc.h
@@ -13,7 +13,7 @@
 
 struct atmmpc_ioc {
         int dev_num;
-        uint32_t ipaddr;              /* the IP address of the shortcut    */
+        __be32 ipaddr;                /* the IP address of the shortcut    */
         int type;                     /* ingress or egress                 */
 };
 
@@ -22,7 +22,7 @@ typedef struct in_ctrl_info {
         uint8_t   Last_Q2931_cause_value;     
         uint8_t   eg_MPC_ATM_addr[ATM_ESA_LEN];
         uint32_t  tag;
-        uint32_t  in_dst_ip;      /* IP address this ingress MPC sends packets to */
+        __be32    in_dst_ip;      /* IP address this ingress MPC sends packets to */
         uint16_t  holding_time;
         uint32_t  request_id;
 } in_ctrl_info;
@@ -30,7 +30,7 @@ typedef struct in_ctrl_info {
 typedef struct eg_ctrl_info {
         uint8_t   DLL_header[256];
         uint8_t   DH_length;
-        uint32_t  cache_id;
+        __be32    cache_id;
         uint32_t  tag;
         uint32_t  mps_ip;
         uint32_t  eg_dst_ip;      /* IP address to which ingress MPC sends packets */
@@ -49,7 +49,7 @@ struct mpc_parameters {
 
 struct k_message {
         uint16_t type;
-        uint32_t ip_mask;
+        __be32 ip_mask;
         uint8_t  MPS_ctrl[ATM_ESA_LEN];
         union {
                 in_ctrl_info in_info;
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -373,7 +373,7 @@ static int br2684_setfilt(struct atm_vcc
 
 /* Returns 1 if packet should be dropped */
 static inline int
-packet_fails_filter(u16 type, struct br2684_vcc *brvcc, struct sk_buff *skb)
+packet_fails_filter(__be16 type, struct br2684_vcc *brvcc, struct sk_buff *skb)
 {
 	if (brvcc->filter.netmask == 0)
 		return 0;			/* no filter in place */
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -220,7 +220,7 @@ static void clip_push(struct atm_vcc *vc
 	    || memcmp(skb->data, llc_oui, sizeof (llc_oui)))
 		skb->protocol = htons(ETH_P_IP);
 	else {
-		skb->protocol = ((u16 *) skb->data)[3];
+		skb->protocol = ((__be16 *) skb->data)[3];
 		skb_pull(skb, RFC1483LLC_LEN);
 		if (skb->protocol == htons(ETH_P_ARP)) {
 			PRIV(skb->dev)->stats.rx_packets++;
@@ -430,7 +430,7 @@ static int clip_start_xmit(struct sk_buf
 
 		here = skb_push(skb, RFC1483LLC_LEN);
 		memcpy(here, llc_oui, sizeof(llc_oui));
-		((u16 *) here)[3] = skb->protocol;
+		((__be16 *) here)[3] = skb->protocol;
 	}
 	atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
 	ATM_SKB(skb)->atm_options = vcc->atm_options;
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -743,7 +743,7 @@ lec_push(struct atm_vcc *vcc, struct sk_
                 unsigned char *src, *dst;
 
                 atm_return(vcc,skb->truesize);
-                if (*(uint16_t *)skb->data == htons(priv->lecid) ||
+                if (*(__be16 *)skb->data == htons(priv->lecid) ||
                     !priv->lecd ||
                     !(dev->flags & IFF_UP)) { 
                         /* Probably looping back, or if lecd is missing,
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -158,7 +158,7 @@ static struct mpoa_client *find_mpc_by_l
 /*
  * Overwrites the old entry or makes a new one.
  */
-struct atm_mpoa_qos *atm_mpoa_add_qos(uint32_t dst_ip, struct atm_qos *qos)
+struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos)
 {
 	struct atm_mpoa_qos *entry;
 
@@ -183,7 +183,7 @@ struct atm_mpoa_qos *atm_mpoa_add_qos(ui
 	return entry;
 }
 
-struct atm_mpoa_qos *atm_mpoa_search_qos(uint32_t dst_ip)
+struct atm_mpoa_qos *atm_mpoa_search_qos(__be32 dst_ip)
 {
 	struct atm_mpoa_qos *qos;
 
@@ -472,7 +472,7 @@ static int send_via_shortcut(struct sk_b
 	in_cache_entry *entry;
 	struct iphdr *iph;
 	char *buff;
-	uint32_t ipaddr = 0;
+	__be32 ipaddr = 0;
 
 	static struct {
 		struct llc_snap_hdr hdr;
@@ -571,7 +571,7 @@ static int atm_mpoa_vcc_attach(struct at
 	struct mpoa_client *mpc;
 	struct atmmpc_ioc ioc_data;
 	in_cache_entry *in_entry;
-	uint32_t  ipaddr;
+	__be32  ipaddr;
 	unsigned char *ip;
 
 	bytes_left = copy_from_user(&ioc_data, arg, sizeof(struct atmmpc_ioc));
@@ -1045,7 +1045,7 @@ static int mpoa_event_listener(struct no
 
 static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *mpc)
 {
-	uint32_t dst_ip = msg->content.in_info.in_dst_ip;
+	__be32 dst_ip = msg->content.in_info.in_dst_ip;
 	in_cache_entry *entry;
 
 	entry = mpc->in_ops->get(dst_ip, mpc);
@@ -1082,7 +1082,7 @@ static void MPOA_trigger_rcvd(struct k_m
  */
 static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry)
 {
-	uint32_t dst_ip = msg->content.in_info.in_dst_ip;
+	__be32 dst_ip = msg->content.in_info.in_dst_ip;
 	unsigned char *ip __attribute__ ((unused)) = (unsigned char *)&dst_ip;
 	struct atm_mpoa_qos *qos = atm_mpoa_search_qos(dst_ip);
 	eg_cache_entry *eg_entry = client->eg_ops->get_by_src_ip(dst_ip, client);
@@ -1121,7 +1121,7 @@ static void MPOA_res_reply_rcvd(struct k
 {
 	unsigned char *ip;
 
-	uint32_t dst_ip = msg->content.in_info.in_dst_ip;
+	__be32 dst_ip = msg->content.in_info.in_dst_ip;
 	in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc);
 	ip = (unsigned char *)&dst_ip;
 	dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(ip));
@@ -1167,8 +1167,8 @@ static void MPOA_res_reply_rcvd(struct k
 
 static void ingress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
 {
-	uint32_t dst_ip = msg->content.in_info.in_dst_ip;
-	uint32_t mask = msg->ip_mask;
+	__be32 dst_ip = msg->content.in_info.in_dst_ip;
+	__be32 mask = msg->ip_mask;
 	unsigned char *ip = (unsigned char *)&dst_ip;
 	in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask);
 
@@ -1193,7 +1193,7 @@ static void ingress_purge_rcvd(struct k_
 
 static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
 {
-	uint32_t cache_id = msg->content.eg_info.cache_id;
+	__be32 cache_id = msg->content.eg_info.cache_id;
 	eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(cache_id, mpc);
 	
 	if (entry == NULL) {
--- a/net/atm/mpc.h
+++ b/net/atm/mpc.h
@@ -36,14 +36,14 @@ struct mpoa_client {
 
 struct atm_mpoa_qos {
         struct atm_mpoa_qos *next;
-        uint32_t ipaddr;
+        __be32 ipaddr;
         struct atm_qos qos;
 };
 
 
 /* MPOA QoS operations */
-struct atm_mpoa_qos *atm_mpoa_add_qos(uint32_t dst_ip, struct atm_qos *qos);
-struct atm_mpoa_qos *atm_mpoa_search_qos(uint32_t dst_ip);
+struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos);
+struct atm_mpoa_qos *atm_mpoa_search_qos(__be32 dst_ip);
 int atm_mpoa_delete_qos(struct atm_mpoa_qos *qos);
 
 /* Display QoS entries. This is for the procfs */
--- a/net/atm/mpoa_caches.c
+++ b/net/atm/mpoa_caches.c
@@ -22,7 +22,7 @@
 #define ddprintk(format,args...)
 #endif
 
-static in_cache_entry *in_cache_get(uint32_t dst_ip,
+static in_cache_entry *in_cache_get(__be32 dst_ip,
 				    struct mpoa_client *client)
 {
 	in_cache_entry *entry;
@@ -42,9 +42,9 @@ static in_cache_entry *in_cache_get(uint
 	return NULL;
 }
 
-static in_cache_entry *in_cache_get_with_mask(uint32_t dst_ip,
+static in_cache_entry *in_cache_get_with_mask(__be32 dst_ip,
 					      struct mpoa_client *client,
-					      uint32_t mask)
+					      __be32 mask)
 {
 	in_cache_entry *entry;
 
@@ -84,7 +84,7 @@ static in_cache_entry *in_cache_get_by_v
 	return NULL;
 }
 
-static in_cache_entry *in_cache_add_entry(uint32_t dst_ip,
+static in_cache_entry *in_cache_add_entry(__be32 dst_ip,
 					  struct mpoa_client *client)
 {
 	unsigned char *ip __attribute__ ((unused)) = (unsigned char *)&dst_ip;
@@ -327,7 +327,7 @@ static void in_destroy_cache(struct mpoa
 	return;
 }
 
-static eg_cache_entry *eg_cache_get_by_cache_id(uint32_t cache_id, struct mpoa_client *mpc)
+static eg_cache_entry *eg_cache_get_by_cache_id(__be32 cache_id, struct mpoa_client *mpc)
 {
 	eg_cache_entry *entry;
 
@@ -388,7 +388,7 @@ static eg_cache_entry *eg_cache_get_by_v
 	return NULL;
 }
 
-static eg_cache_entry *eg_cache_get_by_src_ip(uint32_t ipaddr, struct mpoa_client *mpc)
+static eg_cache_entry *eg_cache_get_by_src_ip(__be32 ipaddr, struct mpoa_client *mpc)
 {
 	eg_cache_entry *entry;
 
--- a/net/atm/mpoa_caches.h
+++ b/net/atm/mpoa_caches.h
@@ -29,12 +29,12 @@ typedef struct in_cache_entry {
 } in_cache_entry;
 
 struct in_cache_ops{
-        in_cache_entry *(*add_entry)(uint32_t dst_ip,
+        in_cache_entry *(*add_entry)(__be32 dst_ip,
                                       struct mpoa_client *client);
-        in_cache_entry *(*get)(uint32_t dst_ip, struct mpoa_client *client);
-        in_cache_entry *(*get_with_mask)(uint32_t dst_ip, 
+        in_cache_entry *(*get)(__be32 dst_ip, struct mpoa_client *client);
+        in_cache_entry *(*get_with_mask)(__be32 dst_ip, 
 					 struct mpoa_client *client,
-					 uint32_t mask);
+					 __be32 mask);
         in_cache_entry *(*get_by_vcc)(struct atm_vcc *vcc, 
                                       struct mpoa_client *client);
         void            (*put)(in_cache_entry *entry);
@@ -56,17 +56,17 @@ typedef struct eg_cache_entry{
         struct atm_vcc       *shortcut;
         uint32_t             packets_rcvd;
         uint16_t             entry_state;
-        uint32_t             latest_ip_addr;    /* The src IP address of the last packet */
+        __be32               latest_ip_addr;    /* The src IP address of the last packet */
         struct eg_ctrl_info  ctrl_info;
         atomic_t             use;
 } eg_cache_entry;
 
 struct eg_cache_ops{
         eg_cache_entry *(*add_entry)(struct k_message *msg, struct mpoa_client *client);
-        eg_cache_entry *(*get_by_cache_id)(uint32_t cache_id, struct mpoa_client *client);
+        eg_cache_entry *(*get_by_cache_id)(__be32 cache_id, struct mpoa_client *client);
         eg_cache_entry *(*get_by_tag)(uint32_t cache_id, struct mpoa_client *client);
         eg_cache_entry *(*get_by_vcc)(struct atm_vcc *vcc, struct mpoa_client *client);
-        eg_cache_entry *(*get_by_src_ip)(uint32_t ipaddr, struct mpoa_client *client);
+        eg_cache_entry *(*get_by_src_ip)(__be32 ipaddr, struct mpoa_client *client);
         void            (*put)(eg_cache_entry *entry);
         void            (*remove_entry)(eg_cache_entry *entry, struct mpoa_client *client);
         void            (*update)(eg_cache_entry *entry, uint16_t holding_time);
--- a/net/atm/mpoa_proc.c
+++ b/net/atm/mpoa_proc.c
@@ -232,14 +232,14 @@ static int parse_qos(const char *buff)
          */
         unsigned char ip[4]; 
 	int tx_pcr, tx_sdu, rx_pcr, rx_sdu;
-        uint32_t ipaddr;
+        __be32 ipaddr;
 	struct atm_qos qos; 
         
         memset(&qos, 0, sizeof(struct atm_qos));
 
 	if (sscanf(buff, "del %hhu.%hhu.%hhu.%hhu",
 			ip, ip+1, ip+2, ip+3) == 4) {
-		ipaddr = *(uint32_t *)ip;
+		ipaddr = *(__be32 *)ip;
 		return atm_mpoa_delete_qos(atm_mpoa_search_qos(ipaddr));
 	}
 
@@ -251,7 +251,7 @@ static int parse_qos(const char *buff)
 		ip, ip+1, ip+2, ip+3, &tx_pcr, &tx_sdu, &rx_pcr, &rx_sdu) != 8)
 		return 0;
 
-        ipaddr = *(uint32_t *)ip;
+        ipaddr = *(__be32 *)ip;
 	qos.txtp.traffic_class = ATM_CBR;
 	qos.txtp.max_pcr = tx_pcr;
 	qos.txtp.max_sdu = tx_sdu;


^ permalink raw reply

* Re: [PATCH 3/4] myri10ge - Driver core
From: Andi Kleen @ 2006-05-20  0:01 UTC (permalink / raw)
  To: Brice Goglin; +Cc: Arnd Bergmann, netdev, gallatin, linux-kernel
In-Reply-To: <446E51AB.9080703@myri.com>


> We have tried :) But there is no nice way to split this code. So I guess
> we will have to keep it like this.

You could shorten the #define names a bit (s/MYRI10GE_MCP_ETHER_/MCP_/)  Then everything 
will fit better.

-Andi

^ permalink raw reply

* Re: [PATCH 3/4] myri10ge - Driver core
From: Brice Goglin @ 2006-05-19 23:15 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: netdev, gallatin, linux-kernel
In-Reply-To: <200605180108.32949.arnd@arndb.de>

Arnd Bergmann wrote:
>> +static int myri10ge_open(struct net_device *dev)
>>     
>
> This function is too long to read easily.
>   

Ok we have split it a little bit.

>> +	/* allocate the host shadow rings */
>> +
>> +	bytes = 8 + (MYRI10GE_MCP_ETHER_MAX_SEND_DESC_TSO + 4)
>> +	    * sizeof(*mgp->tx.req_list);
>> +	mgp->tx.req_bytes = kmalloc(bytes, GFP_KERNEL);
>> +	if (mgp->tx.req_bytes == NULL)
>> +		goto abort_with_nothing;
>> +	memset(mgp->tx.req_bytes, 0, bytes);
>> +
>> +	/* ensure req_list entries are aligned to 8 bytes */
>> +	mgp->tx.req_list = (struct mcp_kreq_ether_send *)
>> +	    ALIGN((unsigned long)mgp->tx.req_bytes, 8);
>> +
>> +	bytes = rx_ring_entries * sizeof(*mgp->rx_small.shadow);
>> +	mgp->rx_small.shadow = kmalloc(bytes, GFP_KERNEL);
>> +	if (mgp->rx_small.shadow == NULL)
>> +		goto abort_with_tx_req_bytes;
>> +	memset(mgp->rx_small.shadow, 0, bytes);
>> +
>> +	bytes = rx_ring_entries * sizeof(*mgp->rx_big.shadow);
>> +	mgp->rx_big.shadow = kmalloc(bytes, GFP_KERNEL);
>> +	if (mgp->rx_big.shadow == NULL)
>> +		goto abort_with_rx_small_shadow;
>> +	memset(mgp->rx_big.shadow, 0, bytes);
>> +
>> +	/* allocate the host info rings */
>> +
>> +	bytes = tx_ring_entries * sizeof(*mgp->tx.info);
>> +	mgp->tx.info = kmalloc(bytes, GFP_KERNEL);
>> +	if (mgp->tx.info == NULL)
>> +		goto abort_with_rx_big_shadow;
>> +	memset(mgp->tx.info, 0, bytes);
>> +
>> +	bytes = rx_ring_entries * sizeof(*mgp->rx_small.info);
>> +	mgp->rx_small.info = kmalloc(bytes, GFP_KERNEL);
>> +	if (mgp->rx_small.info == NULL)
>> +		goto abort_with_tx_info;
>> +	memset(mgp->rx_small.info, 0, bytes);
>> +
>> +	bytes = rx_ring_entries * sizeof(*mgp->rx_big.info);
>> +	mgp->rx_big.info = kmalloc(bytes, GFP_KERNEL);
>> +	if (mgp->rx_big.info == NULL)
>> +		goto abort_with_rx_small_info;
>> +	memset(mgp->rx_big.info, 0, bytes);
>> +
>>     
>
> Can you do all these allocations at once? Maybe you can even
> move them into the size passed to alloc_etherdev.
>   

They are different things conceptually, so we prefer to allocate
them separately.

> If you need separate allocations, using kzalloc simplifies
> your code.
>   

Right, will do.

>> +		/* Break the SKB or Fragment up into pieces which
>> +		 * do not cross mgp->tx.boundary */
>> +		low = MYRI10GE_LOWPART_TO_U32(bus);
>> +		high_swapped = htonl(MYRI10GE_HIGHPART_TO_U32(bus));
>> +		while (len) {
>> +			u8 flags_next;
>> +			int cum_len_next;
>> +
>> +			if (unlikely(count == max_segments))
>> +				goto abort_linearize;
>> +
>> +			boundary = (low + tx->boundary) & ~(tx->boundary - 1);
>> +			seglen = boundary - low;
>> +			if (seglen > len)
>> +				seglen = len;
>> +			flags_next = flags & ~MYRI10GE_MCP_ETHER_FLAGS_FIRST;
>> +			cum_len_next = cum_len + seglen;
>> +#ifdef NETIF_F_TSO
>> +			if (mss) {	/* TSO */
>> +				(req - rdma_count)->rdma_count = rdma_count + 1;
>> +
>> +				if (likely(cum_len >= 0)) {	/* payload */
>> +					int next_is_first, chop;
>> +
>> +					chop = (cum_len_next > mss);
>> +					cum_len_next = cum_len_next % mss;
>> +					next_is_first = (cum_len_next == 0);
>> +					flags |= chop *
>> +					    MYRI10GE_MCP_ETHER_FLAGS_TSO_CHOP;
>> +					flags_next |= next_is_first *
>> +					    MYRI10GE_MCP_ETHER_FLAGS_FIRST;
>> +					rdma_count |= -(chop | next_is_first);
>> +					rdma_count += chop & !next_is_first;
>> +				} else if (likely(cum_len_next >= 0)) {	/* header ends */
>> +					int small;
>> +
>> +					rdma_count = -1;
>> +					cum_len_next = 0;
>> +					seglen = -cum_len;
>> +					small =
>> +					    (mss <=
>> +					     MYRI10GE_MCP_ETHER_SEND_SMALL_SIZE);
>> +					flags_next =
>> +					    MYRI10GE_MCP_ETHER_FLAGS_TSO_PLD |
>> +					    MYRI10GE_MCP_ETHER_FLAGS_FIRST |
>> +					    (small *
>> +					     MYRI10GE_MCP_ETHER_FLAGS_SMALL);
>> +				}
>> +			}
>>     
>
> 100 characters per line are too much, as are six levels of intentation,
> or the number of lines in this function.
> You should try to split into into smaller ones.
>   

We have tried :) But there is no nice way to split this code. So I guess
we will have to keep it like this.

Thanks,
Brice


^ permalink raw reply

* Re: [GIT PATCH] SCTP updates
From: David S. Miller @ 2006-05-19 23:02 UTC (permalink / raw)
  To: sri; +Cc: netdev, lksctp-developers
In-Reply-To: <1148077498.9764.3.camel@w-sridhar2.beaverton.ibm.com>

From: Sridhar Samudrala <sri@us.ibm.com>
Date: Fri, 19 May 2006 15:24:58 -0700

> Please pull the following SCTP updates from
>    master.kernel.org:/pub/scm/linux/kernel/git/sridhar/lksctp-2.6.git

Pulled, thanks a lot Sridhar.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox