diff mbox series

[API-NEXT,v1,2/2] linux-gen: pktio: loop: reset packet subtype to BASIC

Message ID 1513861240-18876-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v1,1/2] linux-gen: pktio: loop: reset flags before reparsing packtes | expand

Commit Message

Github ODP bot Dec. 21, 2017, 1 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 357 (lumag:loop-fix)
 ** https://github.com/Linaro/odp/pull/357
 ** Patch: https://github.com/Linaro/odp/pull/357.patch
 ** Base sha: f2a1a84b43642f3d0911a351d9308d5501693290
 ** Merge commit sha: 9c542050f3413f01be52e51336f5f628c4151742
 **/
 platform/linux-generic/pktio/loop.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c
index 6d19863f6..7f2e35c17 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -172,19 +172,18 @@  static int loopback_send(pktio_entry_t *pktio_entry, int index ODP_UNUSED,
 		bytes += odp_packet_len(pkt_tbl[i]);
 	}
 
-	if (pktio_entry->s.config.outbound_ipsec)
-		for (i = 0; i < len; ++i) {
-			odp_ipsec_packet_result_t result;
+	for (i = 0; i < len; ++i) {
+		odp_ipsec_packet_result_t result;
 
-			if (packet_subtype(pkt_tbl[i]) !=
-			    ODP_EVENT_PACKET_IPSEC)
-				continue;
+		if (packet_subtype(pkt_tbl[i]) ==
+				ODP_EVENT_PACKET_IPSEC &&
+		    pktio_entry->s.config.outbound_ipsec) {
 
 			/* Possibly postprocessing packet */
 			odp_ipsec_result(&result, pkt_tbl[i]);
-
-			packet_subtype_set(pkt_tbl[i], ODP_EVENT_PACKET_BASIC);
 		}
+		packet_subtype_set(pkt_tbl[i], ODP_EVENT_PACKET_BASIC);
+	}
 
 	odp_ticketlock_lock(&pktio_entry->s.txl);