Re: How to setup network connection for initramfs running in QEMU?
Hi Douglas, Do you've /etc/hosts ? Have you tried giving the loopback address in that file? Just check any /etc/hosts file from another distribution and hack on it to at least have loopback address pinged. Then we'll try to fix machine to machine ping. (Tun-tap? Not sure really.) On 26-May-2017 8:34 AM, "Douglas Su"wrote: > Thanks to this mail list, I have already successfully set up a simple > initramfs and booted it in QEMU with busybox tools. > > However, there is no network connection for the initramfs, that makes me > hard to exchange files between qemu and the host. > > Command `ip link show` tells there exists only one 'lo' interface, and I > can't ping 127.0.0.1 successfully. > > So how to boot initramfs in qemu with full network support? > > Best regards. > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
How to setup network connection for initramfs running in QEMU?
Thanks to this mail list, I have already successfully set up a simple initramfs and booted it in QEMU with busybox tools. However, there is no network connection for the initramfs, that makes me hard to exchange files between qemu and the host. Command `ip link show` tells there exists only one 'lo' interface, and I can't ping 127.0.0.1 successfully. So how to boot initramfs in qemu with full network support? Best regards. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the current/ongoing state of userspace access to GPIO?
On Thu, 25 May 2017, valdis.kletni...@vt.edu wrote: > On Thu, 25 May 2017 15:20:06 -0400, "Robert P. J. Day" said: > > On Thu, 25 May 2017, Greg KH wrote: > > > > > On Thu, May 25, 2017 at 03:02:24PM -0400, Robert P. J. Day wrote: > > > > > > > > thoughts? > > > > > > Why not ask on the linux-gpio mailing list? > > > > huh, i didn't even know there was such a thing. > > See http://vger.kernel.org for most of them. Or look in MAINTAINERS: > > GPIO SUBSYSTEM > M: Linus Walleij> M: Alexandre Courbot > L: linux-g...@vger.kernel.org > > :) well, i'm pretty sure i can find it once i know what to look for. :-) rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the current/ongoing state of userspace access to GPIO?
On Thu, 25 May 2017 15:20:06 -0400, "Robert P. J. Day" said: > On Thu, 25 May 2017, Greg KH wrote: > > > On Thu, May 25, 2017 at 03:02:24PM -0400, Robert P. J. Day wrote: > > > > > > thoughts? > > > > Why not ask on the linux-gpio mailing list? > > huh, i didn't even know there was such a thing. See http://vger.kernel.org for most of them. Or look in MAINTAINERS: GPIO SUBSYSTEM M: Linus WalleijM: Alexandre Courbot L: linux-g...@vger.kernel.org :) pgpC8MsUgia65.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the current/ongoing state of userspace access to GPIO?
On Thu, 25 May 2017, Greg KH wrote: > On Thu, May 25, 2017 at 03:02:24PM -0400, Robert P. J. Day wrote: > > > > thoughts? > > Why not ask on the linux-gpio mailing list? huh, i didn't even know there was such a thing. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the current/ongoing state of userspace access to GPIO?
On Thu, May 25, 2017 at 03:02:24PM -0400, Robert P. J. Day wrote: > > thoughts? Why not ask on the linux-gpio mailing list? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Lock contention determination
Hi all If I have a lockstat report showing that some lock has more waiting time than holding time, can I assert that this lock is (one of) the performance bottlenecks? Here performance bottleneck means we could optimize lock usage, e.g. reduce the size of critical section etc. If not, why? Thanks beforehand -- Best regards Chen, Yiqun ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the current/ongoing state of userspace access to GPIO?
On Wed, 24 May 2017, Clemens Gruber wrote: > Hi, > > On Wed, May 24, 2017 at 07:58:19AM -0400, Robert P. J. Day wrote: > > > > ashamed to admit, i haven't been keeping up with this, so AIUI, > > the GPIO sysfs interface is deprecated, replaced with character > > device files (/dev/gpiochip*) to allow access to GPIO. > > > > first, i find it curious that this is a move away from sysfs > > access to using ioctl(), since i had always thought ioctls were > > massively discouraged in new code. is there a document that goes > > through the rationale for this change? > > > > and i notice under Documentation/ABI/ that sysfs-gpio is listed > > under "obsolete", while gpio-cdev is listed under "testing". this > > seems inconsistent -- how can one be obsolete while the other be > > categorized as testing? that just seems strange. > > > > in any event, is the /dev/gpiochip* interface the recommended > > interface now? thanks. > > Linus Walleij described the rationale in the first commit > description. Have a look at 3c702e9987e2. > > Implementing it with netlink sockets would have made it much more > complex, I suppose this is why they chose ioctl? > > By the way, I can recommend accessing the GPIO chardev with > libgpiod: https://github.com/brgl/libgpiod > > This simplifies using it a lot! The tools are also quite nice. thanks, now a couple more (admittedly trivial) questions as i claw my way through the current state of gpio. the doc file "gpio.txt" explains that there are two different ways to access GPIO: - The descriptor-based interface is the preferred way to manipulate GPIOs, and is described by all the files in this directory excepted gpio-legacy.txt. - The legacy integer-based interface which is considered deprecated (but still usable for compatibility reasons) is documented in gpio-legacy.txt. the above *seems* to suggest that one can use the newer, preferred descriptor-based interface and bypass the "legacy" interface, but if i look in drivers/gpio/Makefile, i see: obj-$(CONFIG_GPIOLIB) += devres.o obj-$(CONFIG_GPIOLIB) += gpiolib.o obj-$(CONFIG_GPIOLIB) += gpiolib-legacy.o <--- obj-$(CONFIG_GPIOLIB) += gpiolib-devprop.o suggesting that if i select GPIOLIB, i get the legacy code compiled, anyway. is that correct? it seems to disagree with the documentation, unless that legacy source file is required no matter what, at which point describing it as "legacy" seems misleading. thoughts? rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Multipath support?
On Thu, May 25, 2017 at 12:05 AM, Vasu Mwrote: > I would like to know from which version of Linux, ECMP is supported? I am > trying to add a route with two next hops. Only one path gets added. And for > the other path, the route says "RTNETLINK answers: File exists". I am not > able to understand what's going on. The route prefix is not pointing to > ecmp because metric is not given for static routes? How can I test > multipath for a prefix that goes over 2 links? > > I tried "echo 7 > /proc/sys/kernel/printk" and dmesg but I don't see > anything related to route add events. Just wondering how I should approach > this problem. > > I am running the following versions on two devices running ONL. > > *Linux localhost 3.16.43-OpenNetworkLinux #1 SMP Thu May 11 18:37:48 UTC > 2017 x86_64 GNU/Linux* > I tried the following :- > > root@localhost:~# route -n > > Kernel IP routing table > > Destination Gateway Genmask Flags Metric RefUse > Iface > > 0.0.0.0 192.168.100.1 0.0.0.0 UG0 00 ma1 > > 10.10.10.0 0.0.0.0 255.255.255.0 U 0 00 > fpPort2 > > 20.20.20.0 0.0.0.0 255.255.255.0 U 0 00 > fpPort13 > > 192.168.100.0 0.0.0.0 255.255.255.0 U 0 00 ma1 > > root@localhost:~# arp -a > > ? *(20.20.20.2) at 00:a0:c9:00:00:01 [ether] on fpPort13 * > > ? (192.168.100.100) at f0:7f:06:1d:56:ff [ether] on ma1 > > ? (192.168.100.1) at 18:b1:69:33:88:a4 [ether] on ma1 > > ? (192.168.100.52) at cc:37:ab:7c:ca:16 [ether] on ma1 > > ? (192.168.100.3) at c8:1f:66:f6:ea:07 [ether] on ma1 > > ? *(10.10.10.2) at 00:a0:c9:00:00:01 [ether] on fpPort2* > > > ip route add 100.100.100.0/24 via 10.10.10.2 > > root@localhost:~# route -n > > Kernel IP routing table > > Destination Gateway Genmask Flags Metric RefUse > Iface > > 0.0.0.0 192.168.100.1 0.0.0.0 UG0 00 ma1 > > 10.10.10.0 0.0.0.0 255.255.255.0 U 0 00 > fpPort2 > > 20.20.20.0 0.0.0.0 255.255.255.0 U 0 00 > fpPort13 > > 100.100.100.0 10.10.10.2 255.255.255.0 UG0 00 > fpPort2 > > 192.168.100.0 0.0.0.0 255.255.255.0 U 0 00 ma1 > > root@localhost:~# ip route add 100.100.100.0/24 via 20.20.20.2 > > *RTNETLINK answers: File exists* > Figured "ip route append" is used to add ECMP. I am, however, seeing some ECMP paths getting added to the rt table which seems to be a bug although the behavior is not consistent. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Multipath support?
I would like to know from which version of Linux, ECMP is supported? I am trying to add a route with two next hops. Only one path gets added. And for the other path, the route says "RTNETLINK answers: File exists". I am not able to understand what's going on. The route prefix is not pointing to ecmp because metric is not given for static routes? How can I test multipath for a prefix that goes over 2 links? I tried "echo 7 > /proc/sys/kernel/printk" and dmesg but I don't see anything related to route add events. Just wondering how I should approach this problem. I am running the following versions on two devices running ONL. *Linux localhost 3.16.43-OpenNetworkLinux #1 SMP Thu May 11 18:37:48 UTC 2017 x86_64 GNU/Linux* I tried the following :- root@localhost:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 0.0.0.0 192.168.100.1 0.0.0.0 UG0 00 ma1 10.10.10.0 0.0.0.0 255.255.255.0 U 0 00 fpPort2 20.20.20.0 0.0.0.0 255.255.255.0 U 0 00 fpPort13 192.168.100.0 0.0.0.0 255.255.255.0 U 0 00 ma1 root@localhost:~# arp -a ? *(20.20.20.2) at 00:a0:c9:00:00:01 [ether] on fpPort13 * ? (192.168.100.100) at f0:7f:06:1d:56:ff [ether] on ma1 ? (192.168.100.1) at 18:b1:69:33:88:a4 [ether] on ma1 ? (192.168.100.52) at cc:37:ab:7c:ca:16 [ether] on ma1 ? (192.168.100.3) at c8:1f:66:f6:ea:07 [ether] on ma1 ? *(10.10.10.2) at 00:a0:c9:00:00:01 [ether] on fpPort2* ip route add 100.100.100.0/24 via 10.10.10.2 root@localhost:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 0.0.0.0 192.168.100.1 0.0.0.0 UG0 00 ma1 10.10.10.0 0.0.0.0 255.255.255.0 U 0 00 fpPort2 20.20.20.0 0.0.0.0 255.255.255.0 U 0 00 fpPort13 100.100.100.0 10.10.10.2 255.255.255.0 UG0 00 fpPort2 192.168.100.0 0.0.0.0 255.255.255.0 U 0 00 ma1 root@localhost:~# ip route add 100.100.100.0/24 via 20.20.20.2 *RTNETLINK answers: File exists* ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies