Bug 8279
Summary: | PS3: ipv6 causes ethernet hang | ||
---|---|---|---|
Product: | Platform Specific/Hardware | Reporter: | Geoff Levand (geoffrey.levand) |
Component: | PS3 | Assignee: | Olaf Kirch (okir) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | dwmw2, okir |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.21-rc5-ps3-linux-dev-g07b2d645 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Geoff Levand
2007-03-28 17:03:25 UTC
Note that icmp6 and udp6 seem to work just fine -- it's just tcp6 which kills it. A checksum problem, perhaps? Likely. I don't know if this is the latest driver, but the patch I found claims that the device supports arbitrary checksumming (NETIF_F_HW_CSUM) but really just supports NETIF_F_IP_CSUM: +static void +gelic_net_set_txdescr_cmdstat(struct gelic_net_descr *descr, + struct sk_buff *skb, int middle) +{ + uint32_t nocs, tcpcs, udpcs; + + if (middle) { + nocs = GELIC_NET_DMAC_CMDSTAT_NOCS; + tcpcs = GELIC_NET_DMAC_CMDSTAT_TCPCS; + udpcs = GELIC_NET_DMAC_CMDSTAT_UDPCS; + }else { + nocs = GELIC_NET_DMAC_CMDSTAT_NOCS + | GELIC_NET_DMAC_CMDSTAT_END_FRAME; + tcpcs = GELIC_NET_DMAC_CMDSTAT_TCPCS + | GELIC_NET_DMAC_CMDSTAT_END_FRAME; + udpcs = GELIC_NET_DMAC_CMDSTAT_UDPCS + | GELIC_NET_DMAC_CMDSTAT_END_FRAME; + } + + if (skb->ip_summed != CHECKSUM_HW) { + descr->dmac_cmd_status = nocs; + } else { + /* is packet ip? + * if yes: tcp? udp? */ + if (skb->protocol == htons(ETH_P_IP)) { + if (skb->nh.iph->protocol == IPPROTO_TCP) { + descr->dmac_cmd_status = tcpcs; + } else if (skb->nh.iph->protocol == IPPROTO_UDP) { + descr->dmac_cmd_status = udpcs; + } else { /* the stack should checksum non-tcp and non-udp + packets on his own: NETIF_F_IP_CSUM */ + descr->dmac_cmd_status = nocs; + } + } + } +} This means if tx checksums are enabled, and a non-IP packet is sent, descr->dmac_cmd_status will potentially contain garbage. Simple fix: s/NETIF_F_HW_CSUM/NETIF_F_IP_CSUM/ If the card indeed supports any kind of checksum, gelic_net_set_txdescr_cmdstat needs to be fixed to do the right thing. s/NETIF_F_HW_CSUM/NETIF_F_IP_CSUM/ works fine here; thanks. Okay, whom do I talk to to get this patch included? The driver isn't in mainline. They're aware of this issue already but for future reference I suppose cbe-oss-dev@ozlabs.org Patch submitted to Geoff + cbe-oss-dev@ozlabs.org Closing as fixed |