Dropping one packet in a coalesced skb

2012-05-02 Thread Vimal
packets due to LSO, and I don't want to drop all of them; just a few (2--3) packets. Can the effect be achieved if I modify skb_shinfo(skb)->gso_segs, or nr_frags? Thanks, -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.

Re: task_struct's real_parent vs parent members

2012-02-27 Thread Vimal
Hi Mulyadi, You were right. I found this code, which is called from ptrace_attach function: http://lxr.free-electrons.com/source/kernel/ptrace.c#L41 Thanks :) On 27 February 2012 08:45, Vimal wrote: > Hi Mulyadi, > > On 26 February 2012 23:48, Mulyadi Santosa wrote: >> I am

Re: task_struct's real_parent vs parent members

2012-02-27 Thread Vimal
hat the notion of a parent seems a bit ambiguous when a process is being ptraced. ptrace is what I found when looking through some websites, and you may very well be correct. But as always, it is good to confirm through code. :) Let me try checking the ptrace functions.

task_struct's real_parent vs parent members

2012-02-26 Thread Vimal
able to find where the task's parent is updated. Is there something I'm missing? Thanks, -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

linux hrtimer affinity

2012-02-14 Thread Vimal
on the same CPU, which makes it difficult to reason serialising locks to per-CPU data structures. Any ideas? Thanks, -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: percpu variables from softirq context

2011-12-08 Thread Vimal
Hi Mulyadi On 7 December 2011 10:48, Mulyadi Santosa wrote: > On Wed, Dec 7, 2011 at 06:08, Vimal wrote: >> Hi, >> >> I am trying to allocate a per-cpu variable from a softirq context, but >> the documentation for "alloc_percpu" says that the variable

percpu variables from softirq context

2011-12-06 Thread Vimal
Hi, I am trying to allocate a per-cpu variable from a softirq context, but the documentation for "alloc_percpu" says that the variable is allocated in GFP_KERNEL context, which can sleep. Is there a way around this? Thanks,

PCI device disappeared

2011-12-04 Thread Vimal
A (pointer dereference) bug in my kernel module crashed the system, and when I rebooted, a network PCI device went missing. Several reboots didn't bring back the device, but a cold reboot did! I am curious: what could have caused this issue? --

What is RTNL lock?

2011-11-27 Thread Vimal
Hi all, In the Linux networking code, I see a lot of comments that say "Must be called with RTNL lock." What is this lock? I tried searching for it but couldn't find any explanation on what it is... Thanks -- Vimal ___ Kernelnewbi

TSO support for veth

2011-11-26 Thread Vimal
od) 2. When I do: ethtool -K tso on, I don't see an error message. (good) 3. When I query: ethtool -k , I don't see TSO set on (bad) 4. When I check dmesg, I don't see that the "set_tso" function has not been invoked. (bad) Am I doing someth

Ownership of sk_buff

2011-11-23 Thread Vimal
? Thanks, -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Obtaining a list of open sockets from "struct task_struct"

2011-11-12 Thread Vimal
it's now a little be clear to you. > Yes, it's much clear now. Thanks a lot! -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Obtaining a list of open sockets from "struct task_struct"

2011-11-11 Thread Vimal
most all operations in the TCP code start from a "struct sock". Are the "struct file" and "struct sock" somehow connected? Thanks, -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: CPU usage accounting

2011-09-15 Thread Vimal
for pointing it out! > >>But in case (2), > > excellent thinking.  I place my bet on ksoftirqd > Thanks. I think it makes sense. Let me think of a way to actually confirm this. If you know of a way, do chip in :-) thanks, -- Vimal _

CPU usage accounting

2011-09-14 Thread Vimal
now which application is going to receive this packet. Whom do these cycles get charged to? Thanks, -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Snooping on sockets/file descriptors

2011-04-01 Thread Vimal
kb_copy_datagram_iovec(..) is called ultimately (fn defn: http://lxr.free-electrons.com/source/net/ipv4/tcp.c#L1668). I could hook onto this function using kprobes and get the data that is read. Thanks! -- Vimal ___ Kernelnewbies mailing list Kernelnew

Re: Snooping on sockets/file descriptors

2011-04-01 Thread Vimal
en, one would have to enumerate all possible syscalls that the application can issue to read data. For e.g., it could use read(), recvfrom(), recvmsg(), or even syscall(syscall#, args...) I wonder if LD_PRELOAD can be done on a program without shutting it down. ptrace fits the bill here, except for the

Re: Snooping on sockets/file descriptors

2011-03-31 Thread Vimal
lush/etc) In short, there is a lot of state and complex logic which act on the packets before it is seen by the application. Given the complexity (such as wide variations in TCP implementation), I am not sure if reimplementing them is a good idea, even if it's poss

Snooping on sockets/file descriptors

2011-03-31 Thread Vimal
th this complexity? It's like the action of "tee" on any socket/file descriptor in the system. -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: User space context switch

2011-03-21 Thread Vimal
o interact with scheduler or something other > to interact with , regarding  this problem? Do check the function tracing framework in the Linux Kernel. Links: * http://lwn.net/Articles/322666/ * http://lwn.net/Articles/290277/ sched_switch is the tracer you're

Re: Create a one-to-many tunnel

2011-03-15 Thread Vimal
Yes, tun/tap should be easy to implement in user space. I was initially looking at off-the-shelf components. I looked at the source code of IP in IP tunnel and modified it accordingly to create a kernel module as per my requirements. Thanks! -- Vimal

Create a one-to-many tunnel

2011-03-11 Thread Vimal
e original source IP. At the receiver, assume that there is a stack that understands this special IPinIP packet and has a way to handle it. If it's too specific, then I do not mind implementing it. Thanks, -- Vimal ___ Kernelnewbies mailing lis