All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Ariane Keller <ariane.keller@tik.ee.ethz.ch>
Cc: Ben Greear <greearb@candelatech.com>,
	Stephen Hemminger <shemminger@linux-foundation.org>,
	netdev@vger.kernel.org, herbert@gondor.apana.org.au,
	Rainer Baumann <baumann@tik.ee.ethz.ch>
Subject: Re: [PATCH 0/2] netem: trace enhancement
Date: Wed, 05 Dec 2007 14:05:23 +0100	[thread overview]
Message-ID: <4756A213.2060806@trash.net> (raw)
In-Reply-To: <4756A046.1070608@ee.ethz.ch>

Ariane Keller wrote:
> Thanks for your comments!
> 
> Patrick McHardy wrote:
>
>>> But with this we would need the tcm_handle, tcm_parent arguments etc. 
>>> which are not known in q_netem.c
>>> Therefore we would have to change the parse_qopt() function prototype 
>>> in order to pass the whole "req" and not only the nlmsghdr.
>>
>> I assume you mean netem_init, parse_qopt is userspace. But I don't
>> see how that is related, emptying the buffer happens during packet
>> processing, right?
 >
> Actually I meant parse_qopt from user space.
> If we would change that function prototype we would have the whole 
> message header available in netem_parse_opt() and could pass this to the 
> process which is responsible for sending the data to the kernel. This 
> process would use this header every time it has to send new values to 
> the netem_change() function in the kernel module.


You don't actually want to parse tc output in your program?
Just open a netlink socket and do the necessary processing
yourself, libnl makes this really easy.

> I thought about this because I was not aware of the qdisc_notify function.
> Anyway I've got some troubles with calling qdisc_notify.
> 1. I have to do a EXPORT_SYMBOL(qdisc_notify) (currently it is declared 
> static in sch_api.c)

This is fine.

> 2. I'd like to call it from netem_enqueue(), which leads to a "sleeping 
> function called from invalid context", since we are still in interrupt 
> context. Therefore I think I have to put it in a workqueue.

Just change it to use gfp_any().

  reply	other threads:[~2007-12-05 13:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-20 22:11 [PATCH 0/2] netem: trace enhancement Ariane Keller
2007-11-27 13:57 ` Ariane Keller
2007-11-29 21:45   ` Stephen Hemminger
2007-11-29 22:03     ` Patrick McHardy
2007-11-30 16:25       ` Ariane Keller
2007-12-03  7:45         ` Patrick McHardy
2007-12-03  9:12           ` Ariane Keller
2007-12-03 17:35             ` Patrick McHardy
2007-12-03 18:29               ` Ben Greear
2007-12-04 14:45                 ` Ariane Keller
2007-12-04 14:58                   ` Patrick McHardy
2007-12-05 12:57                     ` Ariane Keller
2007-12-05 13:05                       ` Patrick McHardy [this message]
2007-12-10 14:32                         ` Ariane Keller
2007-12-12 23:13                           ` Stephen Hemminger
2007-12-04 17:40                   ` Ben Greear
2007-12-04 17:54                     ` Ariane Keller
2007-12-04 18:07                       ` Ben Greear
2007-12-04 21:41                         ` Ariane Keller
2007-12-04 22:21                           ` Ben Greear
2007-12-05  6:12                             ` Ariane Keller
2007-12-23 19:54                             ` Ariane Keller
2007-12-23 19:54                             ` [PATCH 0/2] netem: trace enhancement: kernel Ariane Keller
2007-12-28 16:08                               ` Patrick McHardy
2007-12-28 21:02                                 ` Ariane Keller
2007-12-23 19:54                             ` [PATCH 0/2] netem: trace enhancement: iproute Ariane Keller

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-all 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=4756A213.2060806@trash.net \
    --to=kaber@trash.net \
    --cc=ariane.keller@tik.ee.ethz.ch \
    --cc=baumann@tik.ee.ethz.ch \
    --cc=greearb@candelatech.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.