Skip to content

Commit

Permalink
utils: count IPv6 len in vtep close outscale#406
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-gle committed Nov 29, 2018
1 parent 3715a2a commit be9cbe2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static inline uint16_t pg_utils_get_ether_type(struct rte_mbuf *pkt)
* packets (l2_len must be correct).
*/
return *(uint16_t *)(rte_pktmbuf_mtod(pkt, uint8_t *) +
pkt->l2_len - 2);
pkt->l2_len - 2);
}

#define pg_util_get_ether_src_addr(pkt) \
Expand All @@ -103,7 +103,7 @@ static inline void *pg_utils_get_l3(struct rte_mbuf *pkt)
}

static inline int pg_utils_iter_l3(struct rte_mbuf *pkt, uint8_t *ip_type,
uint8_t **ip_payload, uint16_t *size)
uint8_t **ip_payload, uint16_t *size)
{
struct ipv6_hdr *h6 = (struct ipv6_hdr *) pg_utils_get_l3(pkt);
uint8_t next_header = h6->proto;
Expand Down Expand Up @@ -156,7 +156,7 @@ static inline int pg_utils_get_l3_len(struct rte_mbuf *pkt)
}

static inline int pg_utils_get_ipv6_l4(struct rte_mbuf *pkt, uint8_t *ip_type,
uint8_t **ip_payload)
uint8_t **ip_payload)
{
/* jump all ipv6 extension headers to ICMPv6 */
return pg_utils_iter_l3(pkt, ip_type, ip_payload, NULL);
Expand Down

0 comments on commit be9cbe2

Please sign in to comment.