RE: Ethernet Driver: Transmitted Packets not received by receiver

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

 



Hi,

----Original Message----
From: Mohammad M Molla [mailto:merajul_i@xxxxxxxxx]
Sent: Saturday, November 17, 2007 1:07 AM
To: Rajat Jain; kernelnewbies@xxxxxxxxxxxx
Subject: RE: Ethernet Driver: Transmitted Packets not received by
receiver 

> Actually, I wrote the driver for an embedded OS which still does not
> have any network stack. I actually ported the linux driver. 

Uh, you mean it doesn't even have a TCP/IP yet? Ok, that'll make things difficult.

> 
> Since there is no network stack, there is no higher layer to
> communicate CRC info. I manually create an ARP request packet for
> testing purpose and send it a  particular  remote machine to see
> whether it is working or not.   
> 
> About tcpdump, as far I know tcpdump will get packets if the card
> does not drop it. If the card drops packet due to CRC error or
> something that packet should not go to tcpdump, right?

But you can configure the remote NIC in promiscuous mode, no? 

> I don't have
> tcpdump on remote machine. But since I am not getting any ARP reply
> for my ARP request and I am also not getting any transmission error,
> I am suspecting CRC might be the problem. But is there any way to
> verify?

As I said that the first step is to verify (using tcpdump / ethereal / other network sniffers) whether your packet IS getting transmitted on the wire or not. The mere fact that you don't get any transmission error and do get a transmission complete interrupt, may not be the best criteria to conclude transmission is succefully done on wire.


Thanks,

Rajat

> 
> Thanks,
> Meraj
> 
> Rajat Jain <Rajat.Jain@xxxxxxxxxxxx> wrote:
> 
> 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
>> 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
> 
> 
> 
> 
> 
> Be a better pen pal. Text or chat with friends inside Yahoo! Mail.
> See how. 

--
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