RE: Ethernet Driver: Transmitted Packets not received by receiver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> The way I tested it -
> 
> 1. I pinged from a remote machine. My driver received an ARP request.
> I filled up the response and sent it back. When transmission is done
> I got "Transmit interrupt" (no error). But on the remote machine,
> typing 'arp -a' I get an entry for my driver's machine with all
> <incomplete> written in MAC address field.    
> 
> 2. I also tested the other way. I sent a custom built arp packet to
> the remote machine. After completion of transmittion I got "Transmit
> interrupt" (again no error). But I don't receive any ARP reply and
> there is no entry in receiver's arp table for this either.   


I think the best way to test is to use tcpdump at the remote machine. Try something like "tcpdump -XX ether host 00:0f:30:00:0b:08" and it will give you all packets with the given mac address. Provide MAC address of card for which you are developing the driver. 

1) Ping from your machine to remote machine (This would send an ARP request to remote)
2) You should see something like this on remote machine (on tcpdump):

17:23:55.491398 arp who-has 172.18.80.141 tell 172.18.80.8
        0x0000:  ffff ffff ffff 000f 3000 0b08 0806 0001  ........0.......
        0x0010:  0800 0604 0001 000f 3000 0b08 ac12 5008  ........0.....P.
        0x0020:  0000 0000 0000 ac12 508d 0000 0000 0000  ........P.......
        0x0030:  0000 0000 0000 0000 0000 0000            ............

3) Then the remote machine will send an ARP reply:

17:23:55.493258 arp reply 172.18.80.141 is-at 00:0b:cd:26:ff:00
        0x0000:  000f 3000 0b08 000b cd26 ff00 0806 0001  ..0......&......
        0x0010:  0800 0604 0002 000b cd26 ff00 ac12 508d  .........&....P.
        0x0020:  000f 3000 0b08 ac12 5008                 ..0.....P.

So if you don't see step 2, that means your network card ain't sending anything on wire!

> 
> I am not calculating CRC in software and assuming the NIC card will
> calculate CRC. Is it possible that the CRC value is wrong or the NIC
> card actually does not calculate CRC on this card (the card is bcm
> 4713 on Cisco Lynksys router) and I have to calculate it in software?

Most of the cards are capable of generating CRC, hence that should be okay. However, have you communicated this to higher layer while registering the interface) ? 

Thanks,

Rajat

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux