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/bnxt: fix null dereference in session cleanup
[dpdk.git]
/
app
/
test
/
packet_burst_generator.c
diff --git
a/app/test/packet_burst_generator.c
b/app/test/packet_burst_generator.c
index
c05ea7a
..
6b42b9b
100644
(file)
--- a/
app/test/packet_burst_generator.c
+++ b/
app/test/packet_burst_generator.c
@@
-5,6
+5,7
@@
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
#include <rte_byteorder.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
+#include <rte_os_shim.h>
#include "packet_burst_generator.h"
#include "packet_burst_generator.h"
@@
-56,8
+57,8
@@
initialize_eth_header(struct rte_ether_hdr *eth_hdr,
struct rte_ether_addr *dst_mac, uint16_t ether_type,
uint8_t vlan_enabled, uint16_t van_id)
{
struct rte_ether_addr *dst_mac, uint16_t ether_type,
uint8_t vlan_enabled, uint16_t van_id)
{
- rte_ether_addr_copy(dst_mac, ð_hdr->d_addr);
- rte_ether_addr_copy(src_mac, ð_hdr->s_addr);
+ rte_ether_addr_copy(dst_mac, ð_hdr->d
st
_addr);
+ rte_ether_addr_copy(src_mac, ð_hdr->s
rc
_addr);
if (vlan_enabled) {
struct rte_vlan_hdr *vhdr = (struct rte_vlan_hdr *)(
if (vlan_enabled) {
struct rte_vlan_hdr *vhdr = (struct rte_vlan_hdr *)(
@@
-142,8
+143,8
@@
uint16_t
initialize_ipv6_header(struct rte_ipv6_hdr *ip_hdr, uint8_t *src_addr,
uint8_t *dst_addr, uint16_t pkt_data_len)
{
initialize_ipv6_header(struct rte_ipv6_hdr *ip_hdr, uint8_t *src_addr,
uint8_t *dst_addr, uint16_t pkt_data_len)
{
- ip_hdr->vtc_flow =
0;
- ip_hdr->payload_len =
pkt_data_len
;
+ ip_hdr->vtc_flow =
rte_cpu_to_be_32(0x60000000); /* Set version to 6. */
+ ip_hdr->payload_len =
rte_cpu_to_be_16(pkt_data_len)
;
ip_hdr->proto = IPPROTO_UDP;
ip_hdr->hop_limits = IP_DEFTTL;
ip_hdr->proto = IPPROTO_UDP;
ip_hdr->hop_limits = IP_DEFTTL;