On Tue, Sep 16, 2003 at 12:27:21PM +0100, Jamie Lokier wrote: > Nick Patavalis wrote: > > How should the kernel be notified if the calculation of a checksum > > failed (checksum does not match). Reading the e100 source, I see that > > if the checksums (any of the checksums, I presume) of a packet are > > invalid, then the driver sets "skb->ip_summed" to CHECKSUM_NONE; but > > I'm reading the 2.6.0-test5 e100 source, and I don't see anywhere > where it's set to CHECKSUM_NONE if the checksum is known to be > invalid. I see CHECKSUM_UNNECESSARY in those cases. > Reading e100_main.c, from 2.6.0-test2 (the latest version I have readily available), I see (sory for the ugly line-numbers): 2052 /* set the checksum info */ 2053 if (bdp->flags & DF_CSUM_OFFLOAD) { 2054 if (bdp->rev_id >= D102_REV_ID) { 2055 skb->ip_summed = e100_D102_check_checksum(rfd); 2056 } else { 2057 skb->ip_summed = e100_D101M_checksum(bdp, skb); 2058 } 2059 } else { 2060 skb->ip_summed = CHECKSUM_NONE; 2061 } 2914 e100_D102_check_checksum(rfd_t *rfd) 2915 { 2916 if (((le16_to_cpu(rfd->rfd_header.cb_status)) & RFD_PARSE_BIT) 2917 && (((rfd->rcvparserstatus & CHECKSUM_PROTOCOL_MASK) == 2918 RFD_TCP_PACKET) 2919 || ((rfd->rcvparserstatus & CHECKSUM_PROTOCOL_MASK) == 2920 RFD_UDP_PACKET)) 2921 && (rfd->checksumstatus & TCPUDP_CHECKSUM_BIT_VALID) 2922 && (rfd->checksumstatus & TCPUDP_CHECKSUM_VALID)) { 2923 return CHECKSUM_UNNECESSARY; 2924 } 2925 return CHECKSUM_NONE; 2926 } the function "e100_D101M_checksum(bdp, skb)" is similar. Am I wrong to interpret this as: if HW checksuming supported, then if checksum is valid skb->ip_summed = CHECKSUM_UNNECESSARY else skb->ip_summed = CHECKSUM_NONE else skb->ip_summed = CHECKSUM_NONE I don't know if sommething changed from test2 to test5 /npat -- Perilous to us all are the devices of an art deeper than we possess ourselves. -- Gandalf, in J.R.R. Tolkien's The Lord of the Rings - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html