[if !mso]> [if !mso]> [if gte mso 9]>

Re: [edk2] Regarding FillHeader UNDI command for network driver.

Subject: Re: [edk2] Regarding FillHeader UNDI command for network driver.

From: "Sivakumar Subramani" <Sivakumar.Subramani@exar.com>

To: <edk2-devel@lists.sourceforge.net>

Date: 2010-07-08 22:19:14

Hi Richard,

 

Sorry for the delay in response.

 

I am dumping the frame in UNDI transmit function only.

 

pkt_1 = (PXE_CPB_TRANSMIT *) (UINTN)cpb;

pkt_f = (PXE_CPB_TRANSMIT_FRAGMENTS *) (UINTN)cpb;

 

        DEBUGPRINT(INIT, ("Initially the packet dump is : "));

        pd = (unsigned char *) pkt_1->FrameAddr;

        for (i = 0; i <32; i++) {

                DEBUGPRINT(INIT, ("%02x", *pd));

                pd++;

        }

        DEBUGPRINT(INIT, ("\n"));

 

One thing, I noticed is that, if comment out the RecFilter UNDI entry point function, transmit is working fine. I mean, I am getting correct Gratuitous ARP and ARP packets from stack and it is getting transmitted to remote system as well. I have attached the screen shot of the same.

 

But, if I have RecFilter, where I enable/disable bcast and promisc, the frame from the stack itself is corrupted in UNDI transmit function. If I have RecFilter implemented, the Receive is getting called. Since no packets are received before these ARP transaction, I am exiting receive with PXE_STATFLAGS_COMMAND_FAILED.

 

Still I could not get the reason why pkt_1->FrameAddr ptr is getting corrupt in UNDI transmit function when I have RecFilter. I am printing the frame as first steps in UNDI transmit function.

 

Thanks,

~Siva

 


From: Du, Xiong [mailto:xiong.du@intel.com]
Sent: Sunday, July 04, 2010 8:12 PM
To: edk2-devel@lists.sourceforge.net
Cc: Leonid Grossman; Ramkrishna Vepa
Subject: Re: [edk2] Regarding FillHeader UNDI command for network driver.

 

Hi Siva,

 

From the packet dump and console log, seems the packet content is incorrect, it looks like a dump of data structure or stack: the upper 4-bytes are all zeros and there are values like pointers (e.g. 0x7b7d2660, 0x7f4ddbc8) which are close to “txdl_v->list[0].buffer_pointer: 7F4DDB20”.

 

So, maybe you could check the TX buffer pointer in UNDI transmit function.

 

Thanks,

Richard

 

From: Sivakumar Subramani [mailto:Sivakumar.Subramani@exar.com]
Sent: Saturday, July 03, 2010 20:50
To: edk2-devel@lists.sourceforge.net
Cc: Leonid Grossman; Ramkrishna Vepa
Subject: Re: [edk2] Regarding FillHeader UNDI command for network driver.

 

Hi Richard,

 

Thanks for the clarification.

 

Actually the packet was supposed to be Gratuitous ARP which will be sent out when I do ifconfig up. So it make sense fillheader is not getting called. Also I have check that StationAddress and Permanent Address by calling ifconfig –a after loading the driver.

 

The mac address of the card is 00:0c:fc:00:b6:82.

 

I am facing two problems,

 

1) The mac header of first packet that I am getting from stack when I do ifconfig up contains some corrupted values. I am dumping first 32 bytes of the packet in the transmit function. This corrupted packet is getting transmitted on to the remote side. The packet analyzer on the remote system decodes it as FC packet. I have attached the screen shot of the console and the packet analyzer.

 

2) After transmit, resetting happens. I have verified that transmit is completing successfully and I am returning back PXE_STATFLAGS_COMMAND_COMPLETE and PXE_STATCODE_SUCCESS. When I do ifconfig up Sni_ifstart function in efi_netiface.c is getting called and the transmit call fails, which trigger the reset. You can search for Sni_ifstart in the attached efi_netiface.c file.

 

Thanks,

~Siva

 


From: Du, Xiong [mailto:xiong.du@intel.com]
Sent: Friday, July 02, 2010 12:10 AM
To: edk2-devel@lists.sourceforge.net
Cc: Ramkrishna Vepa
Subject: Re: [edk2] Regarding FillHeader UNDI command for network driver.

 

Hi Siva,

 

Can you provide more information on the frame sent out: What’s the content in MAC header’s Source Address? Is it a ARP or IP packet? EDK II network stack will prepare MAC header for ARP packet, so FillHeader will not be invoked when sending ARP packet. While, no MAC header is prepared for IP packet, so FillHeader will be invoked for IP packet sending.

BTW, whether your UNDI driver report both StationAddress and PermanentAddress from PXE_OPCODE_STATION_ADDRESS command?

 

Thanks,

Richard

 

From: Sivakumar Subramani [mailto:Sivakumar.Subramani@exar.com]
Sent: Friday, July 02, 2010 1:18
To: edk2-devel@lists.sourceforge.net
Cc: Ramkrishna Vepa
Subject: [edk2] Regarding FillHeader UNDI command for network driver.

 

Hi,

 

I am using EDK framework to develop my network driver. Currently, working on porting driver to build with EDK2 as well. Mean while when I do ifconfig of my network interface, I could see frames transmitted to the remote system. But the mac header’s source address is not getting updated with interface mac address. I have implemented Fillheader function, but it is not getting called during transmit. Any idea why FillHeader is not getting called?

 

Thanks,

~Siva