Message ID | 1516057220-24653-3-git-send-email-odpbot@yandex.ru |
---|---|
State | New |
Headers | show |
Series | [API-NEXT,v3,1/2] api: pktio: clarify timeout and stop interaction | expand |
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index ffbc73b26..dcb46c7b5 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -1669,6 +1669,9 @@ int odp_pktin_recv(odp_pktin_queue_t queue, odp_packet_t packets[], int num) return -1; } + if (entry->s.state != PKTIO_STATE_STARTED) + return -1; + return entry->s.ops->recv(entry, queue.index, packets, num); } @@ -1791,5 +1794,8 @@ int odp_pktout_send(odp_pktout_queue_t queue, const odp_packet_t packets[], return -1; } + if (entry->s.state != PKTIO_STATE_STARTED) + return -1; + return entry->s.ops->send(entry, queue.index, packets, num); }