diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/l4fwd/common.h | 8 | ||||
-rw-r--r-- | examples/l4fwd/pkt.c | 2 | ||||
-rw-r--r-- | examples/l4fwd/port.h | 4 |
3 files changed, 6 insertions, 8 deletions
diff --git a/examples/l4fwd/common.h b/examples/l4fwd/common.h index a2cd5f6..f53501c 100644 --- a/examples/l4fwd/common.h +++ b/examples/l4fwd/common.h @@ -368,8 +368,8 @@ fill_dst(struct tle_dest *dst, struct netbe_dev *bed, eth = (struct rte_ether_hdr *)dst->hdr; - rte_ether_addr_copy(&bed->port.mac, ð->s_addr); - rte_ether_addr_copy(&bdp->mac, ð->d_addr); + rte_ether_addr_copy(&bed->port.mac, ð->src_addr); + rte_ether_addr_copy(&bdp->mac, ð->dst_addr); eth->ether_type = rte_cpu_to_be_16(l3_type); if (l3_type == RTE_ETHER_TYPE_IPV4) { @@ -448,8 +448,8 @@ fill_arp_reply(struct netbe_dev *dev, struct rte_mbuf *m) /* set up the ethernet data */ eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); - eth->d_addr = eth->s_addr; - eth->s_addr = dev->port.mac; + eth->dst_addr = eth->src_addr; + eth->src_addr = dev->port.mac; /* set up the arp data */ ahdr = rte_pktmbuf_mtod_offset(m, struct rte_arp_hdr *, m->l2_len); diff --git a/examples/l4fwd/pkt.c b/examples/l4fwd/pkt.c index 6694e81..f8605a7 100644 --- a/examples/l4fwd/pkt.c +++ b/examples/l4fwd/pkt.c @@ -418,7 +418,7 @@ fix_reassembled(struct rte_mbuf *m, int32_t hwcsum, uint32_t proto) m->packet_type |= RTE_PTYPE_L4_UDP; /* fix reassemble setting TX flags. */ - m->ol_flags &= ~PKT_TX_IP_CKSUM; + m->ol_flags &= ~RTE_MBUF_F_TX_IP_CKSUM; /* fix l3_len after reassemble. */ if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) diff --git a/examples/l4fwd/port.h b/examples/l4fwd/port.h index ce730dd..2c84e3e 100644 --- a/examples/l4fwd/port.h +++ b/examples/l4fwd/port.h @@ -182,9 +182,7 @@ port_init(struct netbe_port *uprt, uint32_t proto) __func__, uprt->id); port_conf.rxmode.offloads |= uprt->rx_offload & RX_CSUM_OFFLOAD; } - port_conf.rxmode.max_rx_pkt_len = uprt->mtu + RTE_ETHER_CRC_LEN; - if (port_conf.rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN) - port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; + port_conf.rxmode.mtu = uprt->mtu - RTE_ETHER_HDR_LEN; rc = update_rss_conf(uprt, &dev_info, &port_conf, proto); if (rc != 0) |