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: use IPV4 VHL constant
[dpdk.git]
/
app
/
test-pmd
/
txonly.c
diff --git
a/app/test-pmd/txonly.c
b/app/test-pmd/txonly.c
index
10d641a
..
539043c
100644
(file)
--- a/
app/test-pmd/txonly.c
+++ b/
app/test-pmd/txonly.c
@@
-49,9
+49,6
@@
uint32_t tx_ip_src_addr = (192U << 24) | (18 << 16) | (0 << 8) | 1;
uint32_t tx_ip_dst_addr = (192U << 24) | (18 << 16) | (0 << 8) | 2;
#define IP_DEFTTL 64 /* from RFC 1340. */
uint32_t tx_ip_dst_addr = (192U << 24) | (18 << 16) | (0 << 8) | 2;
#define IP_DEFTTL 64 /* from RFC 1340. */
-#define IP_VERSION 0x40
-#define IP_HDRLEN 0x05 /* default IP header length == five 32-bits words. */
-#define IP_VHL_DEF (IP_VERSION | IP_HDRLEN)
static struct rte_ipv4_hdr pkt_ip_hdr; /**< IP header of transmitted packets. */
RTE_DEFINE_PER_LCORE(uint8_t, _ip_var); /**< IP address variation */
static struct rte_ipv4_hdr pkt_ip_hdr; /**< IP header of transmitted packets. */
RTE_DEFINE_PER_LCORE(uint8_t, _ip_var); /**< IP address variation */
@@
-116,7
+113,7
@@
setup_pkt_udp_ip_headers(struct rte_ipv4_hdr *ip_hdr,
* Initialize IP header.
*/
pkt_len = (uint16_t) (pkt_len + sizeof(struct rte_ipv4_hdr));
* Initialize IP header.
*/
pkt_len = (uint16_t) (pkt_len + sizeof(struct rte_ipv4_hdr));
- ip_hdr->version_ihl =
IP
_VHL_DEF;
+ ip_hdr->version_ihl =
RTE_IPV4
_VHL_DEF;
ip_hdr->type_of_service = 0;
ip_hdr->fragment_offset = 0;
ip_hdr->time_to_live = IP_DEFTTL;
ip_hdr->type_of_service = 0;
ip_hdr->fragment_offset = 0;
ip_hdr->time_to_live = IP_DEFTTL;