app/testpmd: modify mac in csum forwarding
authorMichael Qiu <michael.qiu@intel.com>
Fri, 7 Aug 2015 03:29:16 +0000 (11:29 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 29 Oct 2015 22:52:24 +0000 (23:52 +0100)
For some ethnet-switch like intel RRC, all the packet forwarded
out by DPDK will be dropped in switch side, so the packet
generator will never receive the packet.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test-pmd/csumonly.c

index e561dde..c9c095d 100644 (file)
@@ -540,6 +540,10 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
                 * and inner headers */
 
                eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
+               ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
+                               &eth_hdr->d_addr);
+               ether_addr_copy(&ports[fs->tx_port].eth_addr,
+                               &eth_hdr->s_addr);
                parse_ethernet(eth_hdr, &info);
                l3_hdr = (char *)eth_hdr + info.l2_len;