Re: How to alloc memory in kernel on a specific numa node

2018-08-27 Thread Rami Rosen
on a specified NUMA node. This contributes to boost performance. Regards, Rami Rosen בתאריך יום ב׳, 27 באוג׳ 2018, 11:30, מאת s.v.krishna reddy ‏< svkr...@gmail.com>: > How does it matter to allocate on specific node? > > Thanks, > Krishna. > > On Tue, Aug 21, 2018 at

Re: Linux Networking Internals Question

2018-06-16 Thread Rami Rosen
to which socket it will go. Regards, Rami Rosen http://ramirose.wixsite.com/ramirosen On 16 June 2018 at 20:16, V.Ravikumar wrote: > Hi All, > > I wanted to know how a packet received will be handovered to a correct user > process. > Basically I want to understand what are the

Re: Importance of kobject

2017-05-17 Thread Rami Rosen
in account that things change a bit since then in terms of implementation details. The principles are for a large extent quite the same, though. Regards, Rami Rosen On 17 May 2017 at 10:21, Alexander Kapshuk <alexander.kaps...@gmail.com> wrote: > -- Forwarded message

Re: pls help in veth

2016-12-06 Thread Rami Rosen
t do you get when running, from the root of this tree: more .config | grep VETH And finally - which distro is running on this device ? Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 6 December 2016 at 18:25, Er Krishna <erkris...@gmail.com> wrote: > Hi Rami, > > Thanks,

Re: pls help in veth

2016-12-06 Thread Rami Rosen
t a kernel you built from source, or a kernel which is part of a distro? Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 6 December 2016 at 15:15, Er Krishna <erkris...@gmail.com> wrote: > Hi All, > > Can some one pls let me know for below command to run on linux

Re: an advise how to start

2016-11-26 Thread Rami Rosen
Hi Limor, Regarding your question about bugs: The Linux kernel has a Bugzilla: You can browse it by a subsystem. https://bugzilla.kernel.org/describecomponents.cgi Regards, Rami Rosen http://ramirose.wixsite.com/ramirosen Hi all, i am a senior c,c++ engineer which is used to complex MT systems

Re: ip_hdr vs ipip_hdr

2016-08-18 Thread Rami Rosen
ternal IP header. Hope this helps, Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 18 August 2016 at 11:47, Ricky <zhangchaow...@gmail.com> wrote: > > In include/linux/ip.h, > > 23 static inline struct iphdr *ip_hdr(const struct sk_buff *skb) > 24 { >

Re: Is there a way to force probe to be called (etherned driver) ?

2016-07-24 Thread Rami Rosen
://lxr.free-electrons.com/source/include/linux/platform_device.h#L180 In this case, maybe something is missing/wrong in platform_driver_register(). Regards, Rami Rosen http://ramirose.wix.com/ramirosen In case you do, probably something is missing in your platform_device_register() method

Re: Are these books outdated?

2016-07-14 Thread Rami Rosen
Hi Andrey, >Here is link to Jessica McKellar's (LDD4 co-author) repo with examples >for the next book. >https://github.com/jesstess/ldd4 Thanks for the link, I was not aware of it ! Rami Rosen ___ Kernelnewbies mailing list Kern

Re: Are these books outdated?

2016-07-14 Thread Rami Rosen
ublication date of LDD4 by Oreilly,, since indeed the publication date was postponed in the past (at least once but maybe more, I am unsure about that) Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 14 July 2016 at 15:26, Robert P. J. Day <rpj...@crashcourse.ca> wrote: >

Re: OS Error: 105

2016-07-13 Thread Rami Rosen
Hi, Shilpa, Can you send the code/put it in pastebin and send the link ? Rami Rosen On 13 July 2016 at 15:20, Shilpa Yellapragada <yshilpa.1...@gmail.com> wrote: > Hi, > > Can someone explain me why I am encountering an OS error 105, while > trying to write to a socket? >

Re: Is there any good literature explaining Linux's file system ?

2016-07-10 Thread Rami Rosen
e is also a book titled "Linux Filesystems Paperback" by William Von Hagen. I did not read it. However, it is really old (2002!); 14 years are significant in Linux development. Good luck! Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 10 July 2016 at 15:23, Yubin Ruan <ablackt

Re: boot param to change tick

2016-06-21 Thread Rami Rosen
Hi, >You have to rebuild the kernel to change the HZ value. +1 Rami Rosen ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Adding new protocol to linux.

2016-03-28 Thread Rami Rosen
Hi, Header files under include/net are for kernel internal use. Header files under include/uapi are for exposure to userspace: http://lxr.free-electrons.com/source/include/uapi/ Regards, Rami Rosen http://ramirose.wix.com/ramirosen בתאריך 28 במרץ 2016 18:04, "Manoj Nayak" &l

Re: Adding new protocol to linux.

2016-03-26 Thread Rami Rosen
, and more. Hope this helps! Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 26 March 2016 at 05:00, Daniel. <danielhi...@gmail.com> wrote: > Hi everybody, > > I'm planing to write a socket API for Nordic's nRF24L01+ and I was > digging on socket code and find all s

Re: kexec not working

2016-03-05 Thread Rami Rosen
Hi Ronit, Can you please tell what happens when you ran the "kexec -p" that you mentioned ? Do you see any message on screen ? Does it hang immediately ? Regards, Rami Rosen בתאריך 6 במרץ 2016 05:23, "Ronit Halder" <ronit.li...@gmail.com> כתב: > When I am doing norm

Re: Reading network connections for processes in a separate net namespaces from /proc/[pid]/net/tcp|tcp6

2016-01-25 Thread Rami Rosen
Hi, Darek, cat /proc/[pid]/net/tcp is handled by http://lxr.free-electrons.com/source/net/ipv4/tcp_ipv4.c#L2230 and cat /proc/[pid]/net/tcp6 is handled by: http://lxr.free-electrons.com/source/net/ipv6/tcp_ipv6.c#L1782 Hope it helps! Regards, Rami Rosen http://ramirose.wix.com/ramirosen

Re: How to statically build kernel module?

2016-01-22 Thread Rami Rosen
Hi, Assuming that you are talking about a kernel module which is part of the Kernel tree, you simply need to run make menuconfig, navigate to that module, and instead "M" you should choose "Y". The build and install the kernel image. Regards, Rami Rosen http://ramirose.wix.com

Re: Reading network connections for processes in a separate net namespaces from /proc/[pid]/net/tcp|tcp6

2016-01-22 Thread Rami Rosen
called nsproxy, which includes pointers to 4 other namesapces (uts, mnt, pid and ipc). >and there is no information about network >namespaces at all (google, stackoverflow, man pages, kernel docs) This is not really so. Look for example in the following: Namespaces and Cgroups – the basis of Li

Re: Preceding a method call with (void)

2015-09-18 Thread Rami Rosen
/drivers/acpi/acpica/tbxfload.c#L156 Regards, Rami Rosen בתאריך 10 בספט 2015 09:39, <valdis.kletni...@vt.edu> כתב: > On Thu, 10 Sep 2015 07:52:49 +0300, Kevin Wilson said: > > > (void) myFunc(param1); > > > > I did not encounter such cases in the ker

Re: When to use threaded interrupts?

2015-09-13 Thread Rami Rosen
/touchscreen/ucb1400_ts.c?v=3.18 How did you came to the conclusion that this kernel does not support threaded IRQs ? could it be that you simply do not use device drivers that use this mechanism ? Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 13 September 2015 at 09:24, Kosta Zertsekel

Re: When to use threaded interrupts?

2015-09-10 Thread Rami Rosen
Kosta, Just a wild assumption: maybe the cost of incurring context switches ? (comparing to tasklets) Best Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 10 September 2015 at 20:49, Kosta Zertsekel <zertse...@gmail.com> wrote: > Hi guys, > > I hope I'm on right mailin

Re: Questions on Netlink sockets

2015-08-19 Thread Rami Rosen
a bit about this: which difference do you see between creating a VLAN with ip link add name eth2.200 link eth2 type vlan id 200 And running your program (let's call your executable vlan_nl) in this way: ./vlan_nl eth1.100 eth1 100 Regards, Rami Rosen http://ramirose.wix.com/ramirosen

Re: Questions on Netlink sockets

2015-08-17 Thread Rami Rosen
suggest that you will post the code here. The concept itself is right, It should work, you either build the netlink message incorrectly or send it incorrectly, so it seems. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 18 August 2015 at 01:55, Bhaskar Upadhyayula bu.ker...@gmail.com

Re: A flow path for ethernet kernel driver

2015-05-18 Thread Rami Rosen
also try pr_err() instead, as most distros do print such messages with dmesg without need for any special setup. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On 18 May 2015 at 22:23, Airton Ishimori nobumasa@gmail.com wrote: Hello, everybody, I'm trying to develop a new Ethernet

Re: Lxc vs openvz

2014-06-16 Thread Rami Rosen
pages about Linux Containers, LXC, OpenVZ, Docker, CRIU, Namespaces and cgroups, in my website: http://ramirose.wix.com/ramirosen. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Mon, Jun 16, 2014 at 5:10 PM, Grzegorz Dwornicki gd1...@gmail.com wrote: Hi Can anyone point me why lxc

Re: Problem with inserting nfs module in kernel

2014-05-12 Thread Rami Rosen
Hi, Sivakumar, This should work. Are you sure all your printk are proper ? Can you please pastebin the crash message and send us a link ? Regards, Rami Rosen http://ramirose.wix.com/ramirosen בתאריך 12 במאי 2014 23:09, Sivakumar V sivakumar...@gmail.com כתב: Hi All, I am tried

Re: Regarding net_device_ops

2014-05-03 Thread Rami Rosen
, Rami Rosen http://ramirose.wix.com/ramirosen On Sat, May 3, 2014 at 12:43 PM, Pranay Srivastava pran...@gmail.com wrote: Hi Referring to Documentation/networking/netdevices.txt a) ndo-ndo_start_xmit if written as is will be thread safe? [Correct?] NETIF_F_LLTX is not set only

Re: Regarding skb and net_device.

2014-05-03 Thread Rami Rosen
, Rami Rosen http://ramirose.wix.com/ramirosen On Sat, May 3, 2014 at 11:33 AM, Pranay Srivastava pran...@gmail.com wrote: Hi, This is probably a stupid question, but i'm not able to find the answer. How does the networking subsystem decides which device to use for sending the skb. Can some one

Re: Regarding net_device_ops

2014-05-03 Thread Rami Rosen
Hi, Sorry, I of course discuss here your previous question about SKB Regards, Rami On Sat, May 3, 2014 at 1:34 PM, Rami Rosen roszenr...@gmail.com wrote: Hi, Pranay, First, let's assume that you are talking about IPv4, though you did not mention it explicitly. (The principles in IPv6

Re: system call returns -1

2014-05-02 Thread Rami Rosen
Hi, Nada, Return value of -1 could be EPERM, Operation not permitted; see: http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno-base.h Can you paste the code in pastebin or some other public site? regards, Rami Rosen http://ramirose.wix.com/ramirosen On Fri, May 2, 2014 at 9:23

Re: cgroups: cannot write on file memory.oom_control

2014-04-18 Thread Rami Rosen
with disabling the oom killer in Namespaces and cgroups in linux, in slides 101/102, see: http://ramirose.wix.com/ramirosen A shameless plug - I wrote this presentation of 121 slides about namespaces and cgroups. Regards, Rami Rosen בתאריך 17 באפר 2014 11:24, Hedi Boufaied hedi.boufa...@amadeus.com כתב

Re: cgroups: cannot write on file memory.oom_control

2014-04-15 Thread Rami Rosen
/memory.oom_control For more info, please look for the text about enabling/disabling use_hierarchy in section 6, http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Mon, Apr 14, 2014 at 12:22 PM, Hedi Boufaied hedi.boufa

Re: Need help in enable configuration when compile Kernel module

2014-01-09 Thread Rami Rosen
Hi, 'y' is used for building the module as a built-in in the kernel image. 'm' stands for building the module as a stand alone object (*.ko), which is not part of the kernel image, and should be insmoded or modprobed in order to be used. Regards, Rami Rosen http://ramirose.wix.com/ramirosen

Re: how to find kernel patch applied on existing build kernel

2013-12-23 Thread Rami Rosen
Hi, Vipul If you want to know to which kernel release is a specified patch related, you can do it by git describe --contains: git describe --contains e605b36575e896edd8161534550c9ea021b03bc0 v3.13-rc2~6^2 Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Sun, Dec 22, 2013 at 1:26 PM

Re: create sysfs class attribute and sub directories

2013-12-15 Thread Rami Rosen
Hi, You should use sysfs_create_group() and kobject_create_and_add() and DEVICE_ATTR() macro see net/bridge/br_sysfs_br.c and also see Documentation/kobject.txt and filesystems/sysfs.txt Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Sun, Dec 15, 2013 at 3:52 PM, Jeshwanth Kumar N K

Re: A question about ip_options's option type

2013-12-14 Thread Rami Rosen
IPOPT_TIMESTAMP and for the length, you have 40 or 36 (It depends on ts_type) Best Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Sat, Dec 14, 2013 at 3:00 AM, Guibin(Bill) Tian gbt...@gmail.com wrote: Hi, maybe it's a naive question. But I am confused here. For the options field

Re: Sending an ICMP packet with ip_local_out

2013-06-16 Thread Rami Rosen
Adel, You say you have a NULL pointer but you do not specify where. can you please send the log of the panic ? Can you send the kernel module full code ? Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Mon, Jun 17, 2013 at 6:18 AM, Adel Qodmani mpca...@gmail.com wrote

Re: which function perform gso

2013-05-31 Thread Rami Rosen
Hi, Varun look in dev_gso_segment(): http://lxr.free-electrons.com/source/net/core/dev.c#L2382 Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Fri, May 31, 2013 at 9:53 AM, Varun Sharma vsd...@gmail.com wrote: Hi, which function perform Generic segmentation offload in kernel

Re: Device mapper api v/s block device driver api

2013-05-06 Thread Rami Rosen
Hi Just of pure curiosity, can you please provide a link to the blog you had mentioned? Regards Rami Rosen http://ramirose.wix.com/ramirosen On May 6, 2013 10:46 PM, neha naik nehanai...@gmail.com wrote: Hi, Reading a blog on device mapper api got me confused about when one should use

Re: Dynamic Sysfs Attribute Files

2013-04-24 Thread Rami Rosen
Hi, Take a look in: http://lxr.free-electrons.com/source/Documentation/filesystems/sysfs.txt You should consider the sysfs API like sysfs_create_dir(), sysfs_create_group(), sysfs_create_file() Best Regards, Rami Rosen http://ramirose.wix.com/ramirosen

Re: open_softirq do?

2013-04-10 Thread Rami Rosen
(NET_TX_SOFTIRQ); ... whereas the dev_kfree_skb_irq() is called from the driver TX path for freeing the skb. There are other case; look in __netif_reschedule(), and in dev_cpu_callback(), in net/core/dev.c regards, Rami Rosen http://ramirose.wix.com/ramirosen On Wed, Apr 10, 2013 at 3:18 PM

Re: Interrupt Handler of Ethernet Device

2013-04-07 Thread Rami Rosen
; struct pci_dev *pdev; ... ... And indeed nic-netdev represents an Ethernet interface, which is the struct net_device (see: include/linux/netdevice.h) Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Sun, Apr 7, 2013 at 5:52 AM, ishare june.tune@gmail.com wrote: On Fri, Apr 05

Re: Interrupt Handler of Ethernet Device

2013-04-05 Thread Rami Rosen
, nic-netdev-name, nic-netdev))) ... This means that e100_intr is registered as an interrupt handler. Best, Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Apr 5, 2013 at 11:50 AM, Robert Clove cloverob...@gmail.com wrote: Hello All, I am new here. I want to know the interrupt

Re: cgroup.procs versus tasks (cgroups)

2013-04-02 Thread Rami Rosen
. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Tue, Apr 2, 2013 at 9:14 PM, valdis.kletni...@vt.edu wrote: On Tue, 02 Apr 2013 16:46:24 +0300, Kevin Wilson said: Hi, Thanks a lot Vlad. This explains it. - Does anybody know of a ps command (or a filter to ps command) which will display

Re: relationship between cpu_affinity and Packet RX Processing

2013-03-30 Thread Rami Rosen
Hi, Stay tuned as I intend to put on the web an expanded document, including documentations about kernel internals (besides networking). Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Mar 29, 2013 at 4:36 PM, Kumar amit mehta gmate.a...@gmail.com wrote: On Tue, Mar 26, 2013

Re: what does the kernel does after it is being notified of incoming Frame

2013-03-26 Thread Rami Rosen
Hi, Can you give me more references even linked videos. You might want to take a look in section 6, Receiving a packet, in Linux Kernel Networking (free 189 pages doc). see: http://media.wix.com/ugd//295986_4ef6dbdf11fd0a7f74f09741b4b5b2ee.pdf (A shameless plug as I wrote it...) rgs, Rami

Re: relationship between cpu_affinity and Packet RX Processing

2013-03-26 Thread Rami Rosen
Hi, Kumar, 1) Regarding rx queues: what does ls /sys/class/net/eth0/queues show ? 2) can you try setting affinity for working only with CPU3 and see what happens after some traffic is sent by cat /proc/interrupts? regards, Rami Rosen http://ramirose.wix.com/ramirosen On Tue, Mar 26, 2013 at 8

Re: relationship between cpu_affinity and Packet RX Processing

2013-03-26 Thread Rami Rosen
/interrupts | grep eth0 before and after sending, let's say, 5 pings)? Rgs, Rami Rosen http://ramirose.wix.com/ramirosen On Tue, Mar 26, 2013 at 9:05 PM, Kumar amit mehta gmate.a...@gmail.com wrote: On Tue, Mar 26, 2013 at 08:35:56PM +0200, Rami Rosen wrote: 1) Regarding rx queues: what does ls

Re: Why we Use both mm_users and mm_count in struct mm_struct{ }

2013-03-25 Thread Rami Rosen
: context_switch(struct rq *rq, struct task_struct *prev, ...) and prev is the process which ran in the run_queue of the scheduler previously, before switching to the new kernel thread. And we borrow memory descriptor from this process. Rgs, Rami Rosen http://ramirose.wix.com/ramirosen On Mon

Re: question about

2013-03-25 Thread Rami Rosen
, Rami Rosen http://ramirose.wix.com/ramirosen On Mon, Mar 25, 2013 at 4:57 AM, Moritz Fischer moritz.fisc...@ettus.com wrote: On Sun, Mar 24, 2013 at 1:29 PM, Kevin Wilson wkev...@gmail.com wrote: Kevin, Any idea which methods adds the following entries: /sys/devices/system/clocksource

Re: Why we Use both mm_users and mm_count in struct mm_struct{ }

2013-03-24 Thread Rami Rosen
and the switch backend into * one hypercall. */ arch_start_context_switch(prev); if (!mm) { next-active_mm = oldmm; atomic_inc(oldmm-mm_count); enter_lazy_tlb(oldmm, next); } else ... Regards, Rami Rosen http

Re: networking question

2013-03-14 Thread Rami Rosen
Hi, Can you post your client and server code? rgs, Rami Rosen http://ramirose.wix.com/ramirosen On Thu, Mar 14, 2013 at 12:55 PM, devendra.aaru devendra.a...@gmail.com wrote: Hey all, I have got a strange bug(?) while testing the multicasting server and client. I have done only

Re: Sending an IP packet

2013-02-22 Thread Rami Rosen
Hi, Adel, You should use ip_route_output_flow(). For this you should construct a flowi4 instance. ip_route_output_flow() is exported via EXPORT_SYMBOL_GPL. See for example how this is done in udp_sendmsg(). Good luck! Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Feb 22, 2013 at 2:36

Re: Sending an IP packet

2013-02-22 Thread Rami Rosen
a sock in ip_route_output_flow() The xfrm_lookup() is empty when building without IPsec. So in you case, if you know that your solution does not require IPSec traffic, you can use __ip_route_output_key(). rgs. Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Feb 22, 2013 at 3:53 PM, Adel

Re: Sending an IP packet

2013-02-22 Thread Rami Rosen
will not go to mainline) I don't know of any usage of ICMP for purposes beyond what is declared in the ICMP RFC. regards, Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Feb 22, 2013 at 5:15 PM, Adel Qodmani mpca...@gmail.com wrote: On Fri, Feb 22, 2013 at 4:54 PM, valdis.kletni...@vt.edu

Re: kernel source code tree

2013-02-09 Thread Rami Rosen
Hi, You can pick a kernel to download from: http://www.kernel.org/pub/linux/kernel/v3.x/ The latest stable kernel is Regarding configuration, you can take the config file of Ubuntu in order to avoid risk of errors in configuration. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Sat

Re: Linux Kernel Networking document (free, 178 pages doc)

2013-01-31 Thread Rami Rosen
Hi, Have you considered to start with ext4? it seems that ext3, ext2 are a bit out of fashion, Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Thu, Jan 31, 2013 at 8:58 PM, shubham kernel.shub...@gmail.com wrote: Thanks Rami, I am also trying to understand ext3 and write some

Re: Linux Kernel Networking document (free, 178 pages doc)

2013-01-30 Thread Rami Rosen
HI, I will try to write something for Linux Filesystems (and maybe for other subsystems) but this will probably take a lot of time. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Wed, Jan 30, 2013 at 5:44 PM, shubham kernel.shub...@gmail.com wrote: Thanks for sharing the document

Linux Kernel Networking document (free, 178 pages doc)

2013-01-28 Thread Rami Rosen
/sysadmins/researchers/students may find help with it. regards, Rami Rosen http://ramirose.wix.com/ramirosen ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: sys fs interface

2012-12-30 Thread Rami Rosen
Hi, This is done via: kobject_create_and_add(), which eventually calls sysfs_create_file(), or sysfs_create_group(). Look in Documentation/kobject.txt regards, Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Dec 28, 2012 at 1:22 PM, Rahul Bedarkar rpal...@gmail.com wrote: Hi, When

Re: what is tty* in /edv file folder?

2012-11-28 Thread Rami Rosen
Hi, These are character devices for I/O. /dev/tty0 is a special device, representing the current terminal. /dev/tty1 is the first virtual terminal, /dev/tty1 is second virtual terminal (usually there are 6 virtual terminals). The other /dev/tty* are for other purposes. Regards, Rami Rosen