unsigned int queue_dropped;
unsigned int queue_user_dropped;
- atomic_t id_sequence; /* 'sequence' of pkt ids */
+ unsigned int id_sequence; /* 'sequence' of pkt ids */
u_int16_t queue_num; /* number of this queue */
u_int8_t copy_mode;
inst->queue_maxlen = NFQNL_QMAX_DEFAULT;
inst->copy_range = 0xfffff;
inst->copy_mode = NFQNL_COPY_NONE;
- atomic_set(&inst->id_sequence, 0);
/* needs to be two, since we _put() after creation */
atomic_set(&inst->use, 2);
spin_lock_init(&inst->lock);
return NULL;
}
+ entry->id = queue->id_sequence++;
+
spin_unlock_bh(&queue->lock);
skb = alloc_skb(size, GFP_ATOMIC);
goto err_out_put;
}
- entry->id = atomic_inc_return(&queue->id_sequence);
-
nskb = nfqnl_build_packet_message(queue, entry, &status);
if (nskb == NULL)
goto err_out_put;
inst->peer_pid, inst->queue_total,
inst->copy_mode, inst->copy_range,
inst->queue_dropped, inst->queue_user_dropped,
- atomic_read(&inst->id_sequence),
+ inst->id_sequence,
atomic_read(&inst->use));
}