aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/linux-generic/include/odp_packet_internal.h4
-rw-r--r--platform/linux-generic/include/odp_parse_internal.h24
-rw-r--r--platform/linux-generic/odp_packet.c17
-rw-r--r--platform/linux-generic/odp_parse.c27
4 files changed, 35 insertions, 37 deletions
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 868b4ef56..fb0e7f31a 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -468,8 +468,8 @@ int _odp_packet_tcp_chksum_insert(odp_packet_t pkt);
int _odp_packet_udp_chksum_insert(odp_packet_t pkt);
int _odp_packet_sctp_chksum_insert(odp_packet_t pkt);
-int packet_l4_chksum(odp_packet_hdr_t *pkt_hdr, odp_proto_chksums_t chksums,
- uint64_t l4_part_sum);
+int _odp_packet_l4_chksum(odp_packet_hdr_t *pkt_hdr,
+ odp_proto_chksums_t chksums, uint64_t l4_part_sum);
#ifdef __cplusplus
}
diff --git a/platform/linux-generic/include/odp_parse_internal.h b/platform/linux-generic/include/odp_parse_internal.h
index 99b730a58..011655cdc 100644
--- a/platform/linux-generic/include/odp_parse_internal.h
+++ b/platform/linux-generic/include/odp_parse_internal.h
@@ -49,15 +49,15 @@ extern "C" {
#define PARSE_L3_L4_BYTES (MAX(PARSE_IPV4_BYTES, PARSE_IPV6_BYTES) + \
MAX3(PARSE_TCP_BYTES, PARSE_UDP_BYTES, PARSE_SCTP_BYTES))
-uint16_t parse_eth(packet_parser_t *prs, const uint8_t **parseptr,
- uint32_t *offset, uint32_t frame_len);
+uint16_t _odp_parse_eth(packet_parser_t *prs, const uint8_t **parseptr,
+ uint32_t *offset, uint32_t frame_len);
-int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr,
- uint32_t offset,
- uint32_t frame_len, uint32_t seg_len,
- int layer, uint16_t ethtype,
- odp_proto_chksums_t chksums,
- uint64_t *l4_part_sum);
+int _odp_packet_parse_common_l3_l4(packet_parser_t *prs,
+ const uint8_t *parseptr, uint32_t offset,
+ uint32_t frame_len, uint32_t seg_len,
+ int layer, uint16_t ethtype,
+ odp_proto_chksums_t chksums,
+ uint64_t *l4_part_sum);
/**
* Parse common packet headers up to given layer
@@ -85,11 +85,11 @@ static inline int _odp_packet_parse_common(packet_parser_t *prs,
/* Assume valid L2 header, no CRC/FCS check in SW */
prs->l2_offset = offset;
- ethtype = parse_eth(prs, &parseptr, &offset, frame_len);
+ ethtype = _odp_parse_eth(prs, &parseptr, &offset, frame_len);
- return packet_parse_common_l3_l4(prs, parseptr, offset, frame_len,
- seg_len, layer, ethtype, chksums,
- &l4_part_sum);
+ return _odp_packet_parse_common_l3_l4(prs, parseptr, offset, frame_len,
+ seg_len, layer, ethtype, chksums,
+ &l4_part_sum);
}
/* Perform packet parse up to a given protocol layer */
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index a49c8911b..a4be68181 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -1944,8 +1944,8 @@ int _odp_packet_sctp_chksum_insert(odp_packet_t pkt)
return odp_packet_copy_from_mem(pkt, pkt_hdr->p.l4_offset + 8, 4, &sum);
}
-int packet_l4_chksum(odp_packet_hdr_t *pkt_hdr, odp_proto_chksums_t chksums,
- uint64_t l4_part_sum)
+int _odp_packet_l4_chksum(odp_packet_hdr_t *pkt_hdr,
+ odp_proto_chksums_t chksums, uint64_t l4_part_sum)
{
/* UDP chksum == 0 case is covered in parse_udp() */
if (chksums.chksum.udp &&
@@ -2063,7 +2063,7 @@ int odp_packet_parse(odp_packet_t pkt, uint32_t offset,
/* Assume valid L2 header, no CRC/FCS check in SW */
pkt_hdr->p.l2_offset = offset;
- ethtype = parse_eth(&pkt_hdr->p, &data, &offset, packet_len);
+ ethtype = _odp_parse_eth(&pkt_hdr->p, &data, &offset, packet_len);
} else if (proto == ODP_PROTO_IPV4) {
ethtype = _ODP_ETHTYPE_IPV4;
} else if (proto == ODP_PROTO_IPV6) {
@@ -2072,17 +2072,16 @@ int odp_packet_parse(odp_packet_t pkt, uint32_t offset,
ethtype = 0; /* Invalid */
}
- ret = packet_parse_common_l3_l4(&pkt_hdr->p, data, offset,
- packet_len, seg_len,
- layer, ethtype,
- param->chksums,
- &l4_part_sum);
+ ret = _odp_packet_parse_common_l3_l4(&pkt_hdr->p, data, offset,
+ packet_len, seg_len, layer,
+ ethtype, param->chksums,
+ &l4_part_sum);
if (ret)
return -1;
if (layer >= ODP_PROTO_LAYER_L4) {
- ret = packet_l4_chksum(pkt_hdr, param->chksums, l4_part_sum);
+ ret = _odp_packet_l4_chksum(pkt_hdr, param->chksums, l4_part_sum);
if (ret)
return -1;
}
diff --git a/platform/linux-generic/odp_parse.c b/platform/linux-generic/odp_parse.c
index c89ed6dfb..782db7020 100644
--- a/platform/linux-generic/odp_parse.c
+++ b/platform/linux-generic/odp_parse.c
@@ -22,8 +22,8 @@
*
* Requires up to PARSE_ETH_BYTES bytes of contiguous packet data.
*/
-uint16_t parse_eth(packet_parser_t *prs, const uint8_t **parseptr,
- uint32_t *offset, uint32_t frame_len)
+uint16_t _odp_parse_eth(packet_parser_t *prs, const uint8_t **parseptr,
+ uint32_t *offset, uint32_t frame_len)
{
uint16_t ethtype;
const _odp_ethhdr_t *eth;
@@ -354,12 +354,12 @@ static inline void parse_sctp(packet_parser_t *prs, const uint8_t **parseptr,
}
/* Requires up to PARSE_L3_L4_BYTES bytes of contiguous packet data. */
-int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr,
- uint32_t offset,
- uint32_t frame_len, uint32_t seg_len,
- int layer, uint16_t ethtype,
- odp_proto_chksums_t chksums,
- uint64_t *l4_part_sum)
+int _odp_packet_parse_common_l3_l4(packet_parser_t *prs,
+ const uint8_t *parseptr, uint32_t offset,
+ uint32_t frame_len, uint32_t seg_len,
+ int layer, uint16_t ethtype,
+ odp_proto_chksums_t chksums,
+ uint64_t *l4_part_sum)
{
uint8_t ip_proto;
@@ -479,18 +479,17 @@ int _odp_packet_parse_layer(odp_packet_hdr_t *pkt_hdr,
/* Assume valid L2 header, no CRC/FCS check in SW */
pkt_hdr->p.l2_offset = offset;
- ethtype = parse_eth(&pkt_hdr->p, &base, &offset, pkt_hdr->frame_len);
+ ethtype = _odp_parse_eth(&pkt_hdr->p, &base, &offset, pkt_hdr->frame_len);
- rc = packet_parse_common_l3_l4(&pkt_hdr->p, base, offset,
- pkt_hdr->frame_len,
- seg_len, layer, ethtype, chksums,
- &l4_part_sum);
+ rc = _odp_packet_parse_common_l3_l4(&pkt_hdr->p, base, offset,
+ pkt_hdr->frame_len, seg_len, layer,
+ ethtype, chksums, &l4_part_sum);
if (rc != 0)
return rc;
if (layer >= ODP_PROTO_LAYER_L4)
- return packet_l4_chksum(pkt_hdr, chksums, l4_part_sum);
+ return _odp_packet_l4_chksum(pkt_hdr, chksums, l4_part_sum);
else
return 0;
}