Hi Laszlo and Conen, Thanks for your reply, I have double checked the ShellBinPkg and ShellPkg in UDK2015 release version, Both of them have included my patch for Ip4Config Protocol deprecated work. I'm also confused by the test result below, seems only time appeared abnormal.
Conen: Are you using the shell binary released in UDK2015? Thanks. Jiaxin -----Original Message----- From: Laszlo Ersek [mailto:[email protected]] Sent: Tuesday, November 10, 2015 4:30 AM To: Conen, Johannes; [email protected] Cc: Leif Lindholm (Linaro address); Wu, Jiaxin Subject: Re: [edk2] ShellPkg: Network commands (ifconfig/ping) broken On 11/09/15 16:52, Conen, Johannes wrote: > Hello everyone, > > after switching from UDK2014 to UDK2015, I noticed that the network > commands (ifconfig / ping) don't work anymore. ifconfig just exits > with no feedback and ping says "Config no mapping" (logical, as it is > not possible to get an IP address via ifconfig). In UDK2014 everything > worked fine. > > With the help of unixsmurf (thanks a lot) Argh. Can we stop using these "funny" nicks on IRC? "unixsmurf" is Leif. What do you think, Leif? :) > I went on bughunting and > found out that commit r17869 / git sha > 7c25b7ea5b2c029a9e7a0be57f7c20f31d720c7d broke it. Wild guess: it has > something to do with the new protocol. That's close, but my take is not that exact commit. Instead, what about this: https://github.com/tianocore/edk2/commit/2aa0eb5df61e == SVN rev 17917. (I reviewed that commit.) But, it works for me: > Shell> ifconfig -s eth0 dhcp > Shell> ifconfig -l eth0 > > ----------------------------------------------------------------- > > name : eth0 > Media State : Media present > policy : dhcp > mac addr : 52:54:00:29:80:AE > > ipv4 address : 192.168.122.182 > > subnet mask : 255.255.255.0 > > default gateway: 192.168.122.1 > > Routes (2 entries): > Entry[0] > Subnet : 192.168.122.0 > Netmask: 255.255.255.0 > Gateway: 0.0.0.0 > Entry[1] > Subnet : 0.0.0.0 > Netmask: 0.0.0.0 > Gateway: 192.168.122.1 > > DNS server : > 192.168.122.1 > > > ----------------------------------------------------------------- > Shell> ping 8.8.8.8 > Ping 8.8.8.8 16 data bytes. > 16 bytes from 8.8.8.8 : icmp_seq=1 ttl=0 time=30640ms > 16 bytes from 8.8.8.8 : icmp_seq=2 ttl=0 time=31249ms > 16 bytes from 8.8.8.8 : icmp_seq=3 ttl=0 time=33280ms > 16 bytes from 8.8.8.8 : icmp_seq=4 ttl=0 time=38577ms > 16 bytes from 8.8.8.8 : icmp_seq=5 ttl=0 time=28432ms > 16 bytes from 8.8.8.8 : icmp_seq=6 ttl=0 time=31275ms > 16 bytes from 8.8.8.8 : icmp_seq=7 ttl=0 time=26576ms > 16 bytes from 8.8.8.8 : icmp_seq=8 ttl=0 time=33192ms > 16 bytes from 8.8.8.8 : icmp_seq=9 ttl=0 time=31112ms > 16 bytes from 8.8.8.8 : icmp_seq=10 ttl=0 time=28237ms > > 10 packets transmitted, 10 received, 0% packet loss, time 312570ms > > Rtt(round trip time) min=26576ms max=38577ms avg=31257ms This on OVMF just built from edk2 at SVN rev18759. (Note that in OVMF the shell is built from source as well.) > Personally I think this is a critical issue - it practically makes it > impossible to use any network related stuff in the UEFI shell. I suspect that you are using an old (UDK2014) shell binary on top of a new (UDK2015) network stack, or vice-versa. If you check the commit message of SVN rev 17917 / git 2aa0eb5df61e, it said that it was safe to remove the Ip4Config protocol *because* SVN rev 17869 / git 7c25b7e [that you have found] had already moved ping / ifconfig to the new protocol. And at the time of SVN rev 17869 / git 7c25b7e, the new protocol existed (see SVN rev 17853 / git 1f6729ffe980). In chronological order: - SVN rev 17853 / git 1f6729ff: implements the Ip4Config2 protocol, - SVN rev 17869 / git 7c25b7ea: migrates ping & ifconfig to Ip4Config2, - SVN rev 17917 / git 2aa0eb5d: removes Ip4Config (no more users) So, assuming you build *all* of your firmware from edk2, from source, including the shell, you should end up with working ping & ifconfig at any stage. I don't know at what stage UDK2015 was packaged. If it happened after SVN rev 17917 / git 2aa0eb5d, then I guess the message of that commit applies: "Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol" -- please use a conformant shell I guess. I'm still a bit confused, because ShellBinPkg was also updated in SVN rev 18187 / git 1fe76acc, which was about a month after SVN rev 17917 / git 2aa0eb5d above. So unless Intel released UDK2015 exactly within that one month, I cannot see how you can encounter this problem. Are you using a shell binary whose source is still based on UDK2014 (or older)? Thanks, Laszlo > With best regards, > Johannes Conen > > Siemens AG > Process Industries and Drives Division Process Automation > Manufacturing Karlsruhe PD PA MF-K IPC 2 Oestliche Rheinbrueckenstr. > 50 > 76187 Karlsruhe, Germany > mailto:[email protected] > > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

