* e100-3.0.0_dev8 "Minneapolis Moline" release
@ 2003-06-18 2:48 Feldman, Scott
2003-06-18 15:33 ` Jason Lunz
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Feldman, Scott @ 2003-06-18 2:48 UTC (permalink / raw)
To: netdev, linux-net
[Someone once suggested e100 as the first nominee into the driver hall
of shame. I'd like to revoke that nomination with this rewrite of
e100].
DON'T USE THIS DRIVER ON A PRODUCTION SYSTEM!
http://sf.net/projects/e1000, download e100-3.0.0_dev8 (tar file or
kernel patches).
Your help in testing would be greatly appreciated. There are many 8255x
devices supported by e100, so hopefully we'll get good coverage from the
community.
Also, any feedback on the code correctness, maintainability, credits,
etc. would help. We're really motivated in getting this driver as
perfect as possible. It's about 2200 lines, down from about 9000
before, so hopefully that helps. :)
It does NAPI, ethtool (probably the most ethtool-compliant driver out
there), and MII ioctl. The only module parameter is "debug", used to
set the initial message level. All other driver settings must be done
via ethtool.
DON'T USE THIS DRIVER ON A PRODUCTION SYSTEM!
Thanks to Jeff and Arjan for great feedback and encouragement.
-scott
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: e100-3.0.0_dev8 "Minneapolis Moline" release
2003-06-18 2:48 e100-3.0.0_dev8 "Minneapolis Moline" release Feldman, Scott
@ 2003-06-18 15:33 ` Jason Lunz
2003-06-18 17:26 ` David S. Miller
2003-06-18 15:54 ` Jason Lunz
2003-06-23 17:45 ` Udo A. Steinberg
2 siblings, 1 reply; 7+ messages in thread
From: Jason Lunz @ 2003-06-18 15:33 UTC (permalink / raw)
To: netdev
scott.feldman@intel.com said:
> Also, any feedback on the code correctness, maintainability, credits,
> etc. would help.
Is the anonymous union in struct cb some kind of gcc3-only thing? It
doesn't compile for my debian woody gcc 2.95 unless I name the union
member.
--
Jason Lunz Reflex Security
lunz@reflexsecurity.com http://www.reflexsecurity.com/
--- e100.c Tue Jun 17 08:51:45 2003
+++ e100.c.union Wed Jun 18 11:27:45 2003
@@ -434,7 +434,7 @@
u16 eol;
} tbd;
} tcb;
- };
+ } data;
struct cb *next, *prev;
dma_addr_t dma_addr;
struct sk_buff *skb;
@@ -867,7 +867,7 @@
static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
{
- struct config *config = &cb->config;
+ struct config *config = &cb->data.config;
u8 *c = (u8 *)config;
cb->command = cpu_to_le16(cb_config);
@@ -942,7 +942,7 @@
dev_addr[3], dev_addr[4], dev_addr[5]);
cb->command = cpu_to_le16(cb_iaaddr);
- memcpy(cb->iaaddr, dev_addr, ETH_ALEN);
+ memcpy(cb->data.iaaddr, dev_addr, ETH_ALEN);
}
#define NCONFIG_AUTO_SWITCH 0x0080
@@ -1051,9 +1051,9 @@
u16 i, count = min(netdev->mc_count, E100_MAX_MULTICAST_ADDRS);
cb->command = cpu_to_le16(cb_multi);
- cb->multi.count = cpu_to_le16(count * ETH_ALEN);
+ cb->data.multi.count = cpu_to_le16(count * ETH_ALEN);
for(i = 0; list && i < count; i++, list = list->next)
- memcpy(&cb->multi.addr[i*ETH_ALEN], &list->dmi_addr, ETH_ALEN);
+ memcpy(&cb->data.multi.addr[i*ETH_ALEN], &list->dmi_addr, ETH_ALEN);
}
static void e100_set_multicast_list(struct net_device *netdev)
@@ -1175,13 +1175,13 @@
struct sk_buff *skb)
{
cb->command = nic->tx_command;
- cb->tcb.tbd_array = cb->dma_addr + offsetof(struct cb, tcb.tbd);
- cb->tcb.tcb_byte_count = 0;
- cb->tcb.threshold = nic->tx_threshold;
- cb->tcb.tbd_count = 1;
- cb->tcb.tbd.buf_addr = cpu_to_le32(pci_map_single(nic->pdev,
+ cb->data.tcb.tbd_array = cb->dma_addr + offsetof(struct cb, data.tcb.tbd);
+ cb->data.tcb.tcb_byte_count = 0;
+ cb->data.tcb.threshold = nic->tx_threshold;
+ cb->data.tcb.tbd_count = 1;
+ cb->data.tcb.tbd.buf_addr = cpu_to_le32(pci_map_single(nic->pdev,
skb->data, skb->len, PCI_DMA_TODEVICE));
- cb->tcb.tbd.size = cpu_to_le16(skb->len);
+ cb->data.tcb.tbd.size = cpu_to_le16(skb->len);
}
static int e100_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
@@ -1217,8 +1217,8 @@
nic->net_stats.tx_bytes += cb->skb->len;
pci_unmap_single(nic->pdev,
- le32_to_cpu(cb->tcb.tbd.buf_addr),
- le16_to_cpu(cb->tcb.tbd.size),
+ le32_to_cpu(cb->data.tcb.tbd.buf_addr),
+ le16_to_cpu(cb->data.tcb.tbd.size),
PCI_DMA_TODEVICE);
dev_kfree_skb_irq(cb->skb);
tx_cleaned = 1;
@@ -1241,8 +1241,8 @@
struct cb *cb = nic->cb_to_clean;
if(cb->skb) {
pci_unmap_single(nic->pdev,
- le32_to_cpu(cb->tcb.tbd.buf_addr),
- le16_to_cpu(cb->tcb.tbd.size),
+ le32_to_cpu(cb->data.tcb.tbd.buf_addr),
+ le16_to_cpu(cb->data.tcb.tbd.size),
PCI_DMA_TODEVICE);
dev_kfree_skb_irq(cb->skb);
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: e100-3.0.0_dev8 "Minneapolis Moline" release
2003-06-18 2:48 e100-3.0.0_dev8 "Minneapolis Moline" release Feldman, Scott
2003-06-18 15:33 ` Jason Lunz
@ 2003-06-18 15:54 ` Jason Lunz
2003-06-23 17:45 ` Udo A. Steinberg
2 siblings, 0 replies; 7+ messages in thread
From: Jason Lunz @ 2003-06-18 15:54 UTC (permalink / raw)
To: netdev
scott.feldman@intel.com said:
> Your help in testing would be greatly appreciated. There are many 8255x
> devices supported by e100, so hopefully we'll get good coverage from the
> community.
It's running on my workstation with no problems. passes the "ping -qf"
load test. lspci says I have:
00:0b.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 08)
Subsystem: Intel Corp. EtherExpress PRO/100+ Management Adapter
Flags: bus master, medium devsel, latency 32, IRQ 11
Memory at d8100000 (32-bit, non-prefetchable) [size=4K]
I/O ports at e800 [size=64]
Memory at d8000000 (32-bit, non-prefetchable) [size=1M]
Expansion ROM at <unassigned> [disabled] [size=1M]
Capabilities: [dc] Power Management version 2
ethtool output seems normal, but what's with the rx-mini and rx-jumbo
max settings in the -g output?
[stoli](0) # ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Half
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
[stoli](0) # ethtool -a eth0
Pause parameters for eth0:
Cannot get device pause settings: Operation not supported
[stoli](76) # ethtool -c eth0
Coalesce parameters for eth0:
Cannot get device coalesce settings: Operation not supported
[stoli](82) # ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX: 256
RX Mini: 134512692
RX Jumbo: 134512692
TX: 256
Current hardware settings:
RX: 64
RX Mini: 5
RX Jumbo: 4
TX: 64
[stoli](0) # ethtool -i eth0
driver: e100
version: 3.0.0_dev8
firmware-version: N/A
bus-info: 00:0b.0
[stoli](0) # ethtool -d eth0
SCB Status and Command Word
-------------
SCB Status Word (Lower Word) 0x0050
RU Status: Ready
CU Status: Suspended
---- Interrupts Pending ----
Flow Control Pause: no
Early Receive: no
Software Generated Interrupt: no
MDI Done: no
RU Not In Ready State: no
CU Not in Active State: no
RU Received Frame: no
CU Completed Command: no
SCB Command Word (Upper Word) 0x0000
RU Command: No Command
CU Command: No Command
Software Generated Interrupt: no
---- Interrupts Masked ----
ALL Interrupts: no
Flow Control Pause: no
Early Receive: no
RU Not In Ready State: no
CU Not in Active State: no
RU Received Frame: no
CU Completed Command: no
[stoli](0) # ethtool -e eth0
Offset Values
------ ------
0x0000 00 02 b3 11 b9 e0 03 02 00 00 01 02 01 47 00 00
0x0010 13 72 10 83 a2 40 0c 00 86 80 00 00 00 00 00 00
0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0060 a8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4a c3
[stoli](0) # ethtool -k eth0
RX/TX checksumming parameters for eth0:
Cannot get device rx csum settings: Operation not supported
Cannot get device tx csum settings: Operation not supported
Cannot get device scatter-gather settings: Operation not supported
no checksumming/SG info available
[stoli](83) # ethtool -p eth0
[stoli](130) # ethtool -r eth0
[stoli](0) # ethtool -S eth0
NIC statistics:
rx_packets: 1410143
tx_packets: 1410029
rx_bytes: 138271433
tx_bytes: 138179379
rx_errors: 41
tx_errors: 0
rx_dropped: 0
tx_dropped: 0
multicast: 0
collisions: 136914
rx_length_errors: 41
rx_over_errors: 0
rx_crc_errors: 0
rx_frame_errors: 0
rx_fifo_errors: 0
rx_missed_errors: 0
tx_aborted_errors: 0
tx_carrier_errors: 0
tx_fifo_errors: 0
tx_heartbeat_errors: 0
tx_window_errors: 0
[stoli](0) # ethtool -t eth0 online
The test result is PASS
The test extra info:
Link test (on/offline) 0
Eeprom test (on/offline) 0
Self test (offline) 0
Mac loopback (offline) 0
Phy loopback (offline) 0
[stoli](0) # ethtool -t eth0 offline
The test result is PASS
The test extra info:
Link test (on/offline) 0
Eeprom test (on/offline) 0
Self test (offline) 0
Mac loopback (offline) 0
Phy loopback (offline) 0
--
Jason Lunz Reflex Security
lunz@reflexsecurity.com http://www.reflexsecurity.com/
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: e100-3.0.0_dev8 "Minneapolis Moline" release
@ 2003-06-18 16:39 Feldman, Scott
0 siblings, 0 replies; 7+ messages in thread
From: Feldman, Scott @ 2003-06-18 16:39 UTC (permalink / raw)
To: Jason Lunz, netdev
> Is the anonymous union in struct cb some kind of gcc3-only
> thing? It doesn't compile for my debian woody gcc 2.95 unless
> I name the union member.
I'm not sure, but it's easy enough to make it known to avoid the issue.
I'll do that.
-scott
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: e100-3.0.0_dev8 "Minneapolis Moline" release
@ 2003-06-18 16:52 Feldman, Scott
0 siblings, 0 replies; 7+ messages in thread
From: Feldman, Scott @ 2003-06-18 16:52 UTC (permalink / raw)
To: Jason Lunz, netdev
> It's running on my workstation with no problems. passes the
> "ping -qf" load test.
Do you have any other tests you can through at it?
> ethtool output seems normal, but what's with the rx-mini and
> rx-jumbo max settings in the -g output?
Good catch. Needs this:
@@ -1848,8 +1848,12 @@ static int e100_ethtool(struct net_devic
case ETHTOOL_GRINGPARAM:
ecmd->ring.rx_max_pending = rfds->max;
ecmd->ring.tx_max_pending = cbs->max;
+ ecmd->ring.rx_mini_max_pending = 0;
+ ecmd->ring.rx_jumbo_max_pending = 0;
ecmd->ring.rx_pending = rfds->count;
ecmd->ring.tx_pending = cbs->count;
+ ecmd->ring.rx_mini_pending = 0;
+ ecmd->ring.rx_jumbo_pending = 0;
if(copy_to_user(useraddr, ecmd, sizeof(ecmd->ring)))
err = -EFAULT;
break;
-scott
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: e100-3.0.0_dev8 "Minneapolis Moline" release
2003-06-18 15:33 ` Jason Lunz
@ 2003-06-18 17:26 ` David S. Miller
0 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2003-06-18 17:26 UTC (permalink / raw)
To: lunz; +Cc: netdev
From: Jason Lunz <lunz@falooley.org>
Date: Wed, 18 Jun 2003 15:33:25 +0000 (UTC)
Is the anonymous union in struct cb some kind of gcc3-only thing? It
doesn't compile for my debian woody gcc 2.95 unless I name the union
member.
Yes, please don't use anonymous unions in kernel code that
you expect to compile anything other than the most recent
versions of gcc.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: e100-3.0.0_dev8 "Minneapolis Moline" release
2003-06-18 2:48 e100-3.0.0_dev8 "Minneapolis Moline" release Feldman, Scott
2003-06-18 15:33 ` Jason Lunz
2003-06-18 15:54 ` Jason Lunz
@ 2003-06-23 17:45 ` Udo A. Steinberg
2 siblings, 0 replies; 7+ messages in thread
From: Udo A. Steinberg @ 2003-06-23 17:45 UTC (permalink / raw)
To: Feldman, Scott; +Cc: netdev, linux-net
[-- Attachment #1: Type: text/plain, Size: 605 bytes --]
On Tue, 17 Jun 2003 19:48:02 -0700 Feldman, Scott (FS) wrote:
FS> http://sf.net/projects/e1000, download e100-3.0.0_dev8 (tar file or
FS> kernel patches).
FS>
FS> Your help in testing would be greatly appreciated. There are many 8255x
FS> devices supported by e100, so hopefully we'll get good coverage from the
FS> community.
Hi Scott,
Good work! I've been using the driver non-stop for about a week now and
there have been exactly zero problems. I think, if possible, the driver
should be merged into the mainstream kernels to get even wider testing.
It certainly seems stable enough to me.
-Udo.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-06-23 17:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-18 2:48 e100-3.0.0_dev8 "Minneapolis Moline" release Feldman, Scott
2003-06-18 15:33 ` Jason Lunz
2003-06-18 17:26 ` David S. Miller
2003-06-18 15:54 ` Jason Lunz
2003-06-23 17:45 ` Udo A. Steinberg
-- strict thread matches above, loose matches on Subject: below --
2003-06-18 16:39 Feldman, Scott
2003-06-18 16:52 Feldman, Scott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).