git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice: support PPPoE RSS
[dpdk.git]
/
lib
/
librte_net
/
rte_ip.h
diff --git
a/lib/librte_net/rte_ip.h
b/lib/librte_net/rte_ip.h
index
e3300fd
..
292f63f
100644
(file)
--- a/
lib/librte_net/rte_ip.h
+++ b/
lib/librte_net/rte_ip.h
@@
-41,7
+41,7
@@
struct rte_ipv4_hdr {
rte_be16_t hdr_checksum; /**< header checksum */
rte_be32_t src_addr; /**< source address */
rte_be32_t dst_addr; /**< destination address */
rte_be16_t hdr_checksum; /**< header checksum */
rte_be32_t src_addr; /**< source address */
rte_be32_t dst_addr; /**< destination address */
-} __
attribute__((__packed__))
;
+} __
rte_packed
;
/** Create IPv4 address */
#define RTE_IPV4(a, b, c, d) ((uint32_t)(((a) & 0xff) << 24) | \
/** Create IPv4 address */
#define RTE_IPV4(a, b, c, d) ((uint32_t)(((a) & 0xff) << 24) | \
@@
-267,7
+267,7
@@
rte_ipv4_cksum(const struct rte_ipv4_hdr *ipv4_hdr)
{
uint16_t cksum;
cksum = rte_raw_cksum(ipv4_hdr, sizeof(struct rte_ipv4_hdr));
{
uint16_t cksum;
cksum = rte_raw_cksum(ipv4_hdr, sizeof(struct rte_ipv4_hdr));
- return (
cksum == 0xffff) ? cksum : (
uint16_t)~cksum;
+ return (uint16_t)~cksum;
}
/**
}
/**
@@
-360,7
+360,7
@@
struct rte_ipv6_hdr {
uint8_t hop_limits; /**< Hop limits. */
uint8_t src_addr[16]; /**< IP address of source host. */
uint8_t dst_addr[16]; /**< IP address of destination host(s). */
uint8_t hop_limits; /**< Hop limits. */
uint8_t src_addr[16]; /**< IP address of source host. */
uint8_t dst_addr[16]; /**< IP address of destination host(s). */
-} __
attribute__((__packed__))
;
+} __
rte_packed
;
/* IPv6 vtc_flow: IPv / TC / flow_label */
#define RTE_IPV6_HDR_FL_SHIFT 0
/* IPv6 vtc_flow: IPv / TC / flow_label */
#define RTE_IPV6_HDR_FL_SHIFT 0
@@
-371,6
+371,8
@@
struct rte_ipv6_hdr {
#define RTE_IPV6_HDR_ECN_MASK (0x03 << RTE_IPV6_HDR_TC_SHIFT)
#define RTE_IPV6_HDR_ECN_CE RTE_IPV6_HDR_ECN_MASK
#define RTE_IPV6_HDR_ECN_MASK (0x03 << RTE_IPV6_HDR_TC_SHIFT)
#define RTE_IPV6_HDR_ECN_CE RTE_IPV6_HDR_ECN_MASK
+#define RTE_IPV6_MIN_MTU 1280 /**< Minimum MTU for IPv6, see RFC 8200. */
+
/**
* Process the pseudo-header checksum of an IPv6 header.
*
/**
* Process the pseudo-header checksum of an IPv6 header.
*
@@
-463,7
+465,7
@@
rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
*/
__rte_experimental
static inline int
*/
__rte_experimental
static inline int
-rte_ipv6_get_next_ext(uint8_t *p, int proto, size_t *ext_len)
+rte_ipv6_get_next_ext(
const
uint8_t *p, int proto, size_t *ext_len)
{
int next_proto;
{
int next_proto;