aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorBen Magistro <koncept1@gmail.com>2021-11-11 01:24:50 +0000
committerBen Magistro <koncept1@gmail.com>2021-12-16 01:27:07 +0000
commit3b80f5d6fbc5ed41fa462acb8c2ccf87e31d9b61 (patch)
tree7107cd3bfb853c1d4d08a17d5cfe638de8f9fb4e /examples
parentb792c1f27d58040f3a815da18183d329bd6bd84b (diff)
tldk: Switch to DPDK v21.11
Several flags have been deprecated or removed, this shifts to the new flags and updates structures accordingly. On the DPDK side, the relevant patches are: * https://patches.dpdk.org/project/dpdk/patch/20211015192408.21798-5-olivier.matz@6wind.com/ * https://patches.dpdk.org/project/dpdk/patch/20211018134854.1258938-4-ferruh.yigit@intel.com/ * https://patches.dpdk.org/project/dpdk/patch/20211018134854.1258938-1-ferruh.yigit@intel.com/ Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: I0501d389a7cacf3cd6d5db2683697b03f57cb818
Diffstat (limited to 'examples')
-rw-r--r--examples/l4fwd/common.h8
-rw-r--r--examples/l4fwd/pkt.c2
-rw-r--r--examples/l4fwd/port.h4
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, &eth->s_addr);
- rte_ether_addr_copy(&bdp->mac, &eth->d_addr);
+ rte_ether_addr_copy(&bed->port.mac, &eth->src_addr);
+ rte_ether_addr_copy(&bdp->mac, &eth->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)