2006-11-16 00:12:56

by Divy Le ray

[permalink] [raw]
Subject: [PATCH] cxgb3: Chelsio T3 1G/10G ethernet device driver

Hi,

This patch adds support for the latest Chelsio adapter, T3.

Since some files are bigger than the 40kB advertized in the submit
guidelines, a monolithic patch against 2.6.19-rc5 is posted at the
following URL: http://service.chelsio.com/kernel.org/cxgb3.patch.bz2

Please advise on any other form you would like to see the code.

We wish this patch to be considered for inclusion in 2.6.20. This driver
will be required by the Chelsio T3 RDMA driver which will be posted for
review asap.

Cheers,
Divy


2006-11-16 00:34:52

by Stephen Hemminger

[permalink] [raw]
Subject: Re: [PATCH] cxgb3: Chelsio T3 1G/10G ethernet device driver

On Wed, 15 Nov 2006 16:11:36 -0800
divy <[email protected]> wrote:

> Hi,
>
> This patch adds support for the latest Chelsio adapter, T3.
>
> Since some files are bigger than the 40kB advertized in the submit
> guidelines, a monolithic patch against 2.6.19-rc5 is posted at the
> following URL: http://service.chelsio.com/kernel.org/cxgb3.patch.bz2
>
> Please advise on any other form you would like to see the code.
>
> We wish this patch to be considered for inclusion in 2.6.20. This driver
> will be required by the Chelsio T3 RDMA driver which will be posted for
> review asap.
>
> Cheers,
> Divy
> -
> 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


This took me an afternoon, so I don't see why Chelsio didn't do it.

Port of Chelsio's 2.2.0 version driver from:
http://service.chelsio.com/drivers/linux/t210/cxgb2toe-2.2.0.tar.gz

De-vendorized:
- removed all TCP Offload Engine support because those changes
will not be accepted in mainline kernel.
- new files run through Lindent
- removed code that was '#ifdef' for older kernel versions
- fix for 2.6.19 irq
- replace usage of TSC with ktime
- remove /proc trace debug stuff
- remove dead code
- incorporate GSO, etc.
- get rid of FILE_IDENT() macro
- fix sparse warnings by adding __iomem and __user

Also, I kept as many of the filenames and device names the same since
it is really just an extension of existing driver.

I'm testing it now.

--
Stephen Hemminger <[email protected]>

2006-11-16 00:47:17

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] cxgb3: Chelsio T3 1G/10G ethernet device driver

On Thursday 16 November 2006 01:11, divy wrote:
> This patch adds support for the latest Chelsio adapter, T3.
>
> Since some files are bigger than the 40kB advertized in the submit
> guidelines, a monolithic patch against 2.6.19-rc5 is posted at the
> following URL: http://service.chelsio.com/kernel.org/cxgb3.patch.bz2
>
> Please advise on any other form you would like to see the code.

You should still attempt to post it as inline email for better review.
The hard limit on mails is 100kb right now, IIRC, so it should be
possible to split it up into smaller chunks for review.

> We wish this patch to be considered for inclusion in 2.6.20. This driver
> will be required by the Chelsio T3 RDMA driver which will be posted for
> review asap.

Two things I noticed on a very brief review:

- The driver is _huge_. Even if your hardware is terribly complicated,
the fact that you need 600kb to drive it is a hint that you do
something wrong. In particular, the header files contain hundreds
of macros that are completely unused. You should get rid of them.

- You define a driver specific multiplexing ioctl method. This is
something you really shouldn't do in a network driver, since the
ioctl number will conflict with other drivers. In order to get
the rest of your code merged, I'd suggest you split out the
private ioctl handling into a separate patch that you don't submit
for now, and then we can think of how to replace the interfaces
with something better, e.g. new driver-independent calls like ioctl
or ethtool or sysfs, or get rid of them if they turn out to be
not required.

Arnd <><

2006-11-16 04:29:52

by Steve Wise

[permalink] [raw]
Subject: Re: [PATCH] cxgb3: Chelsio T3 1G/10G ethernet device driver

On Wed, 2006-11-15 at 16:33 -0800, Stephen Hemminger wrote:
> On Wed, 15 Nov 2006 16:11:36 -0800
> divy <[email protected]> wrote:
>
> > Hi,
> >
> > This patch adds support for the latest Chelsio adapter, T3.
> >
> > Since some files are bigger than the 40kB advertized in the submit
> > guidelines, a monolithic patch against 2.6.19-rc5 is posted at the
> > following URL: http://service.chelsio.com/kernel.org/cxgb3.patch.bz2
> >
> > Please advise on any other form you would like to see the code.
> >
> > We wish this patch to be considered for inclusion in 2.6.20. This driver
> > will be required by the Chelsio T3 RDMA driver which will be posted for
> > review asap.
> >
> > Cheers,
> > Divy
> > -
> > 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
>
>
> This took me an afternoon, so I don't see why Chelsio didn't do it.
>
> Port of Chelsio's 2.2.0 version driver from:
> http://service.chelsio.com/drivers/linux/t210/cxgb2toe-2.2.0.tar.gz
>
> De-vendorized:
> - removed all TCP Offload Engine support because those changes
> will not be accepted in mainline kernel.
> - new files run through Lindent
> - removed code that was '#ifdef' for older kernel versions
> - fix for 2.6.19 irq
> - replace usage of TSC with ktime
> - remove /proc trace debug stuff
> - remove dead code
> - incorporate GSO, etc.
> - get rid of FILE_IDENT() macro
> - fix sparse warnings by adding __iomem and __user
>
> Also, I kept as many of the filenames and device names the same since
> it is really just an extension of existing driver.
>
> I'm testing it now.
>

Stephen,

Divy posted a new driver to support the new Chelsio T3 hardware, not the
210 hardware.

Steve.