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: add rte prefix to UDP structure
[dpdk.git]
/
lib
/
librte_net
/
rte_net.h
diff --git
a/lib/librte_net/rte_net.h
b/lib/librte_net/rte_net.h
index
1697071
..
7088584
100644
(file)
--- a/
lib/librte_net/rte_net.h
+++ b/
lib/librte_net/rte_net.h
@@
-112,10
+112,10
@@
uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
static inline int
rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
{
static inline int
rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
{
- struct ipv4_hdr *ipv4_hdr;
- struct ipv6_hdr *ipv6_hdr;
- struct tcp_hdr *tcp_hdr;
- struct udp_hdr *udp_hdr;
+ struct
rte_
ipv4_hdr *ipv4_hdr;
+ struct
rte_
ipv6_hdr *ipv6_hdr;
+ struct
rte_
tcp_hdr *tcp_hdr;
+ struct
rte_
udp_hdr *udp_hdr;
uint64_t inner_l3_offset = m->l2_len;
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
uint64_t inner_l3_offset = m->l2_len;
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
@@
-144,7
+144,7
@@
rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
#endif
if (ol_flags & PKT_TX_IPV4) {
#endif
if (ol_flags & PKT_TX_IPV4) {
- ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
+ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct
rte_
ipv4_hdr *,
inner_l3_offset);
if (ol_flags & PKT_TX_IP_CKSUM)
inner_l3_offset);
if (ol_flags & PKT_TX_IP_CKSUM)
@@
-153,15
+153,16
@@
rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
if ((ol_flags & PKT_TX_UDP_CKSUM) == PKT_TX_UDP_CKSUM) {
if (ol_flags & PKT_TX_IPV4) {
if ((ol_flags & PKT_TX_UDP_CKSUM) == PKT_TX_UDP_CKSUM) {
if (ol_flags & PKT_TX_IPV4) {
- udp_hdr = (struct udp_hdr *)((char *)ipv4_hdr +
+ udp_hdr = (struct
rte_
udp_hdr *)((char *)ipv4_hdr +
m->l3_len);
udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum(ipv4_hdr,
ol_flags);
} else {
m->l3_len);
udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum(ipv4_hdr,
ol_flags);
} else {
- ipv6_hdr = rte_pktmbuf_mtod_offset(m,
struct ipv6_hdr *,
-
inner_l3_offset);
+ ipv6_hdr = rte_pktmbuf_mtod_offset(m,
+
struct rte_ipv6_hdr *,
inner_l3_offset);
/* non-TSO udp */
/* non-TSO udp */
- udp_hdr = rte_pktmbuf_mtod_offset(m, struct udp_hdr *,
+ udp_hdr = rte_pktmbuf_mtod_offset(m,
+ struct rte_udp_hdr *,
inner_l3_offset + m->l3_len);
udp_hdr->dgram_cksum = rte_ipv6_phdr_cksum(ipv6_hdr,
ol_flags);
inner_l3_offset + m->l3_len);
udp_hdr->dgram_cksum = rte_ipv6_phdr_cksum(ipv6_hdr,
ol_flags);
@@
-170,15
+171,16
@@
rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
(ol_flags & PKT_TX_TCP_SEG)) {
if (ol_flags & PKT_TX_IPV4) {
/* non-TSO tcp or TSO */
(ol_flags & PKT_TX_TCP_SEG)) {
if (ol_flags & PKT_TX_IPV4) {
/* non-TSO tcp or TSO */
- tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr +
+ tcp_hdr = (struct
rte_
tcp_hdr *)((char *)ipv4_hdr +
m->l3_len);
tcp_hdr->cksum = rte_ipv4_phdr_cksum(ipv4_hdr,
ol_flags);
} else {
m->l3_len);
tcp_hdr->cksum = rte_ipv4_phdr_cksum(ipv4_hdr,
ol_flags);
} else {
- ipv6_hdr = rte_pktmbuf_mtod_offset(m,
struct ipv6_hdr *,
-
inner_l3_offset);
+ ipv6_hdr = rte_pktmbuf_mtod_offset(m,
+
struct rte_ipv6_hdr *,
inner_l3_offset);
/* non-TSO tcp or TSO */
/* non-TSO tcp or TSO */
- tcp_hdr = rte_pktmbuf_mtod_offset(m, struct tcp_hdr *,
+ tcp_hdr = rte_pktmbuf_mtod_offset(m,
+ struct rte_tcp_hdr *,
inner_l3_offset + m->l3_len);
tcp_hdr->cksum = rte_ipv6_phdr_cksum(ipv6_hdr,
ol_flags);
inner_l3_offset + m->l3_len);
tcp_hdr->cksum = rte_ipv6_phdr_cksum(ipv6_hdr,
ol_flags);