public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Udit Kumar <udit.kumar@nxp.com>
To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "feng.tian@intel.com" <feng.tian@intel.com>,
	"star.zeng@intel.com" <star.zeng@intel.com>
Subject: Re: SNP transmit print
Date: Fri, 22 Sep 2017 11:03:43 +0000	[thread overview]
Message-ID: <AM6PR0402MB33341DEFB324A123B5E6DC5791670@AM6PR0402MB3334.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <DB5PR04MB0998D79C149D179BE83E7C9A8E670@DB5PR04MB0998.eurprd04.prod.outlook.com>

Thanks Meenakshi for digging a bit more 

If we have use like below 
Library/DxeNetLib/DxeNetLib.c
Status = Snp->Transmit (Snp, 0, Length, Packet, NULL, NULL, NULL);
    if ((Status != EFI_SUCCESS) && (Status != EFI_NOT_READY)) {
      Status = EFI_DEVICE_ERROR;
      break;
    }
Then, we can simple put print when Status is EFI_DEVICE_ERROR;

But with below We are retrying once ☹ ,  What I think if first time if you got error 
EFI_NOT_READY, then after MnpRecycleTxBuf we likely not to get this error. 
I am not 100% sure here. 

What I think, in MdeModulePkg/Universal/Network/SnpDxe/Transmit.c 
Have print only for EFI_NOT_READY. 
And in MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c, print error as well 
for second case. 
Hope this helps 

Thanks
Udit

> -----Original Message-----
> From: Meenakshi Aggarwal
> Sent: Friday, September 22, 2017 3:56 PM
> To: Udit Kumar <udit.kumar@nxp.com>; edk2-devel@lists.01.org
> Cc: feng.tian@intel.com; star.zeng@intel.com
> Subject: RE: SNP transmit print
> 
> Hi Udit,
> 
> Yes, I think we should print this message is Status is EFI_DEVICE_ERROR because
> in case of EFI_NOT_READY, we are retrying:
> 
>   //
>   // Transmit the packet through SNP.
>   //
>   Status = Snp->Transmit (
>                   Snp,
>                   HeaderSize,
>                   Length,
>                   Packet,
>                   TxData->SourceAddress,
>                   TxData->DestinationAddress,
>                   &ProtocolType
>                   );
>   if (Status == EFI_NOT_READY) {
>     Status = MnpRecycleTxBuf (MnpDeviceData);
>     if (EFI_ERROR (Status)) {
>       Token->Status = EFI_DEVICE_ERROR;
>       goto SIGNAL_TOKEN;
>     }
> 
>     DEBUG ((EFI_D_ERROR, "Snp->Transmit  retry\n"));
>     Status = Snp->Transmit (
>                     Snp,
>                     HeaderSize,
>                     Length,
>                     Packet,
>                     TxData->SourceAddress,
>                     TxData->DestinationAddress,
>                     &ProtocolType
>                     );
>   }
> 
> (MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c)
> 
> 
> Please suggest if we can remove this print in case of BUSY status.
> 
> Thanks,
> Meenakshi
> 
> > -----Original Message-----
> > From: Udit Kumar
> > Sent: Thursday, September 21, 2017 5:21 PM
> > To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>; edk2-
> > devel@lists.01.org
> > Subject: RE: SNP transmit print
> >
> > I think these error prints should be check against Status
> >
> > Regards
> > Udit
> >
> > > -----Original Message-----
> > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf
> > > Of Meenakshi Aggarwal
> > > Sent: Thursday, September 21, 2017 3:36 PM
> > > To: edk2-devel@lists.01.org
> > > Subject: [edk2] SNP transmit print
> > >
> > > Hi,
> > >
> > >
> > > While performing tftp using PCI interface, below message is coming
> > > continuously:
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > > [======================================> ]   34812 Kb
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > >
> > > It is coming from file
> > "MdeModulePkg/Universal/Network/SnpDxe/Transmit.c"
> > >
> > >   DEBUG (
> > >     (EFI_D_ERROR,
> > >     "\nSnp->undi.transmit()  %xh:%xh\n",
> > >     Snp->Cdb.StatFlags,
> > >     Snp->Cdb.StatCode)
> > >     );
> > >
> > >
> > > I want to know if it is really an error message because tftp and
> > > ping are working perfectly, but this error message is coming.
> > >
> > >
> > > Thanks,
> > > Meenakshi
> > >
> > >
> > >
> > > _______________________________________________
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel

  reply	other threads:[~2017-09-22 11:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 10:06 SNP transmit print Meenakshi Aggarwal
2017-09-21 11:50 ` Udit Kumar
2017-09-22 10:25   ` Meenakshi Aggarwal
2017-09-22 11:03     ` Udit Kumar [this message]
2017-09-22 13:27       ` Zeng, Star
2017-09-25  0:58       ` Fu, Siyuan
2017-09-25  5:44         ` Meenakshi Aggarwal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR0402MB33341DEFB324A123B5E6DC5791670@AM6PR0402MB3334.eurprd04.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox