Skip to content

Commit

Permalink
Bug 2080 - MPTCP - FullMesh: queue_delayed_work is only successful on…
Browse files Browse the repository at this point in the history
… the first call

https://www.nsnam.org/bugzilla/show_bug.cgi?id=2080

In mptcp_fullmesh.c, if mptcp_address_worker() exits, subsequent
addresses that are added to a node do not get put on to the work queue,
resulting in the second address not being added to the meta socket.

Note: this issue was fixed in the sim-ns3-dev-branch.

Reported-by: Richard Withnell <rick_withnell@hotmail.com>
Signed-off-by: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
  • Loading branch information
thehajime committed May 25, 2015
1 parent ecbf453 commit d6ed19f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/sim/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq,
{
int ret = 0;

if (!test_and_set_bit (WORK_STRUCT_PENDING, work_data_bits(work))) {
if (!test_and_set_bit (WORK_STRUCT_PENDING_BIT, work_data_bits(work))) {
list_add_tail (&work->entry, &wq->list);
sim_task_wakeup (workqueue_task (wq));
ret = 1;
Expand All @@ -119,7 +119,7 @@ void flush_workqueue(struct workqueue_struct *wq)
bool cancel_work_sync(struct work_struct *work)
{
int retval = 0;
if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work)))
if (!test_and_set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)))
{
// work was not yet queued
return 0;
Expand All @@ -144,7 +144,7 @@ bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
return queue_work (wq, work);
}

if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work)))
if (!test_and_set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)))
{
sim_assert (!timer_pending (timer));
dwork->wq = wq;
Expand Down

0 comments on commit d6ed19f

Please sign in to comment.