Re: Ethernet Checksum

From: sai narasimhamurthy
Date: Wed May 04 2005 - 14:30:22 EST


In e1000_main.c , I changed ,

skb_put(skb, length - ETHERNET_FCS_SIZE); , to

skb_put(skb, length);

In effect I caprured the last four bytes.
I was also able to see the "TRAILER"
field on ethereal.

Thanks a lot!
Sai






--- warrier@xxxxxxxxxxx wrote:
> Well yes. I prefer to call them buffer descriptors.
> I haven't looked at
> your chip's details . However some chips may not
> tell you the amount of
> data transferred. In that case you would be better
> off looking at the
> length field which would be 12 bytes from the
> begining of the buffer (DA(6
> bytes) + SA( 6 bytes). The last driver I modified
> wrote the number of
> bytes transferred including the four bytes of CRC,
> into the Rxbd, after
> the DMA was complete.
> I don't know what your chip does, but the manual
> should have the details.
>
>
> S
>
>
>
>
> sai narasimhamurthy <sai_narasi@xxxxxxxxx>
> Sent by: linux-net-owner@xxxxxxxxxxxxxxx
> 05/03/2005 11:37 PM
>
>
> To: warrier@xxxxxxxxxxx
> cc: linux-net@xxxxxxxxxxxxxxx
> Subject: Re: Ethernet Checksum
>
>
> I am thinking that you are referring to the RX ring
> buffers(given below) ...when you said rx buffer
> descriptor .....
> Thanks
> Sai
>
>
> 161 struct e1000_desc_ring {
> 162 /* pointer to the descriptor ring memory
> */
> 163 void *desc;
> 164 /* physical address of the descriptor
> ring
> */
> 165 dma_addr_t dma;
> 166 /* length of descriptor ring in bytes */
> 167 unsigned int size;
> 168 /* number of descriptors in the ring */
> 169 unsigned int count;
> 170 /* next descriptor to associate a buffer
> with */
> 171 unsigned int next_to_use;
> 172 /* next descriptor to check for DD
> status
> bit */
> 173 unsigned int next_to_clean;
> 174 /* array of buffer information structs
> */
> 175 struct e1000_buffer *buffer_info;
> 176 };
>
>
>
>
================================================================
>
>
>
> --- warrier@xxxxxxxxxxx wrote:
> > I'm not too sure about this but most chipsets
> write
> > the received CRC at
> > the end of the data buffer. You may want to dump
> the
> > data as soon as you
> > get an rx interrupt. The length in the rx buffer
> > descriptor should tell
> > you where the data ends. The next four bytes
> should
> > be the CRC. I think
> > ethereal may ignore this and only look at the data
> > length.
> >
> > S
> >
> >
> >
> >
> > sai narasimhamurthy <sai_narasi@xxxxxxxxx>
> > Sent by: linux-net-owner@xxxxxxxxxxxxxxx
> > 05/03/2005 05:52 PM
> >
> >
> > To:
> > cc:
> > Subject: Ethernet Checksum
> >
> >
> > I have an application which requires the recieved
> > ethernet checksum. To begin with, I need to see if
> > the
> > ethernet checksum can be accessed at all. I was
> not
> > able to view it in ethereal.
> >
> > How can I get access(or atleast get to see) the
> > ethernet checksum at the reciever?
> >
> > I am in linux 2.4.29 , am using intel 82546 GBE.
> >
> > Sai
> >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources
> site!
> > http://smallbusiness.yahoo.com/resources/
> > -
> > To unsubscribe from this list: send the line
> > "unsubscribe linux-net" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
> >
> >
> >
> >
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-net" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>
>
>
>



__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html