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/txgbe: add VF base code
[dpdk.git]
/
drivers
/
net
/
vmxnet3
/
vmxnet3_rxtx.c
diff --git
a/drivers/net/vmxnet3/vmxnet3_rxtx.c
b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index
e10f9ee
..
5cf53d4
100644
(file)
--- a/
drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/
drivers/net/vmxnet3/vmxnet3_rxtx.c
@@
-32,7
+32,7
@@
#include <rte_malloc.h>
#include <rte_mbuf.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
#include <rte_ether.h>
-#include <
rte_
ethdev_driver.h>
+#include <ethdev_driver.h>
#include <rte_prefetch.h>
#include <rte_ip.h>
#include <rte_udp.h>
#include <rte_prefetch.h>
#include <rte_ip.h>
#include <rte_udp.h>
@@
-674,6
+674,7
@@
vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
struct rte_ipv6_hdr *ipv6_hdr;
struct rte_tcp_hdr *tcp_hdr;
char *ptr;
struct rte_ipv6_hdr *ipv6_hdr;
struct rte_tcp_hdr *tcp_hdr;
char *ptr;
+ uint8_t segs;
RTE_ASSERT(rcd->tcp);
RTE_ASSERT(rcd->tcp);
@@
-710,9
+711,9
@@
vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
tcp_hdr = (struct rte_tcp_hdr *)(ptr + hlen);
hlen += (tcp_hdr->data_off & 0xf0) >> 2;
tcp_hdr = (struct rte_tcp_hdr *)(ptr + hlen);
hlen += (tcp_hdr->data_off & 0xf0) >> 2;
- if (rxm->udata64 > 1)
- return (rte_pktmbuf_pkt_len(rxm) - hlen +
-
rxm->udata64 - 1) / rxm->udata64
;
+ segs = *vmxnet3_segs_dynfield(rxm);
+ if (segs > 1)
+
return (rte_pktmbuf_pkt_len(rxm) - hlen + segs - 1) / segs
;
else
return hw->mtu - hlen + sizeof(struct rte_ether_hdr);
}
else
return hw->mtu - hlen + sizeof(struct rte_ether_hdr);
}
@@
-737,7
+738,7
@@
vmxnet3_rx_offload(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
(const Vmxnet3_RxCompDescExt *)rcd;
rxm->tso_segsz = rcde->mss;
(const Vmxnet3_RxCompDescExt *)rcd;
rxm->tso_segsz = rcde->mss;
-
rxm->udata64
= rcde->segCnt;
+
*vmxnet3_segs_dynfield(rxm)
= rcde->segCnt;
ol_flags |= PKT_RX_LRO;
}
} else { /* Offloads set in eop */
ol_flags |= PKT_RX_LRO;
}
} else { /* Offloads set in eop */