[ovs-dev] Adding a Delay Queue in Datapath
Namwon An
nw_an at naver.com
Thu Aug 21 13:24:20 UTC 2014
Hello, everyone.
I am modifying the datapath of ovs to queue incoming
packets and delay the time of process of them.
In datapath.c, I added codes creating a thread
that inputs incoming packets to a queue, and process them later
(in regular).
Once ovs_dp_process_received_packet() is called, it
queues an incoming packet to my queue and return, and later
my thread process packets queued
through calling ovs_dp_process_received_packet() again.
To do that, points of vport and sk_buff should
be queued and dequeued.
I used udelay() to make my thread process its
job in regular.
But, when I loaded my modified module into
kernel, it made kernel frozen.
I do not know how to debug kernel well, but
I checked log of dmesg and I could not find any
reason.
So, I replaced udelay()
with schedule_timeout(), and at that time kernel did
not die.
However, after a
few seconds, the kernel died too.
I do not understand why this happened.
I used spinlock technique to protect my queue
between regular datapath and the process of my thread.
raw_spin_lock_irqsave() and
raw_spin_unlock_irqrestore() were used, because spin_lock() and
spin_unlock() freeze kernel (I do not understand).
Does anyone know
why this happened and what I have to do?
- Namwon An
More information about the dev
mailing list