qcacld-3.0: Test PKT_CAPTURE_REGISTER_EVENT bit before processing packets
Currently, packet capture packets are processed until the mon list is empty. There can be situation that while mon list is not empty and mon thread is running, mon interface is deleted and as part of it PKT_CAPTURE_REGISTER_EVENT is cleared. After clearing the bit, interface deletion will wait for completion of mon_register_event and flush the remaining packets in mon list without processing them. In this case as mon thread is already running and processing the packets from mon list without check for PKT_CAPTURE_REGISTER_EVENT bit, it may lead to timeout in deletion of mon interface in case of high throughput scenarios. To avoid this situation, add a check to test PKT_CAPTURE_REGISTER_EVENT each time before processing a packet from mon list. Change-Id: I21e7adc0149c2330f6008d54db8576ca705f2b55 CRs-Fixed: 3475349
This commit is contained in:

committad av
Madan Koyyalamudi

förälder
4bfe79ebff
incheckning
e413c1a012
@@ -224,6 +224,11 @@ pkt_capture_process_from_queue(struct pkt_capture_mon_context *mon_ctx)
|
|||||||
|
|
||||||
spin_lock_bh(&mon_ctx->mon_queue_lock);
|
spin_lock_bh(&mon_ctx->mon_queue_lock);
|
||||||
while (!list_empty(&mon_ctx->mon_thread_queue)) {
|
while (!list_empty(&mon_ctx->mon_thread_queue)) {
|
||||||
|
if (!test_bit(PKT_CAPTURE_REGISTER_EVENT,
|
||||||
|
&mon_ctx->mon_event_flag)) {
|
||||||
|
complete(&mon_ctx->mon_register_event);
|
||||||
|
break;
|
||||||
|
}
|
||||||
pkt = list_first_entry(&mon_ctx->mon_thread_queue,
|
pkt = list_first_entry(&mon_ctx->mon_thread_queue,
|
||||||
struct pkt_capture_mon_pkt, list);
|
struct pkt_capture_mon_pkt, list);
|
||||||
list_del(&pkt->list);
|
list_del(&pkt->list);
|
||||||
|
Referens i nytt ärende
Block a user