[v3,1/13] linux-gen: drop unused _odp_packet_cmp_data() function

Message ID 1507557617-32018-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • test: Increase scalability and performance of odp_pktio_perf
Related show

Commit Message

Github ODP bot Oct. 9, 2017, 2 p.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


This is to fix https://bugs.linaro.org/show_bug.cgi?id=3241

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

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 188 (WonderfulVoid:master)
 ** https://github.com/Linaro/odp/pull/188
 ** Patch: https://github.com/Linaro/odp/pull/188.patch
 ** Base sha: c16af6486eea240609f334b1bdc81a11404275de
 ** Merge commit sha: 4ad1d0615a4dcd74d4e9703090149eec1a58d7d2
 **/
 .../linux-generic/include/odp_packet_internal.h    |  3 ---
 platform/linux-generic/odp_packet.c                | 26 ----------------------
 2 files changed, 29 deletions(-)

Patch

diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index d76d7bf08..15cb53f41 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -321,9 +321,6 @@  int _odp_cls_parse(odp_packet_hdr_t *pkt_hdr, const uint8_t *parseptr);
 int _odp_packet_set_data(odp_packet_t pkt, uint32_t offset,
 			 uint8_t c, uint32_t len);
 
-int _odp_packet_cmp_data(odp_packet_t pkt, uint32_t offset,
-			 const void *s, uint32_t len);
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index f4a0e0ec9..fff01ad9d 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -1642,32 +1642,6 @@  int _odp_packet_set_data(odp_packet_t pkt, uint32_t offset,
 	return 0;
 }
 
-int _odp_packet_cmp_data(odp_packet_t pkt, uint32_t offset,
-			 const void *s, uint32_t len)
-{
-	const uint8_t *ptr = s;
-	void *mapaddr;
-	uint32_t seglen = 0; /* GCC */
-	uint32_t cmplen;
-	int ret;
-	odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt);
-
-	ODP_ASSERT(offset + len <= pkt_hdr->frame_len);
-
-	while (len > 0) {
-		mapaddr = packet_map(pkt_hdr, offset, &seglen, NULL);
-		cmplen = len > seglen ? seglen : len;
-		ret = memcmp(mapaddr, ptr, cmplen);
-		if (ret != 0)
-			return ret;
-		offset  += cmplen;
-		len     -= cmplen;
-		ptr     += cmplen;
-	}
-
-	return 0;
-}
-
 /*
  *
  * Debugging