Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- main.c 2017-10-06 22:58:52.000000000 +0530
- +++ /home/padam.singh/main.c 2018-04-12 11:41:49.460075874 +0530
- @@ -119,6 +119,7 @@
- .header_split = 0, /**< Header Split disabled */
- .hw_ip_checksum = 0, /**< IP checksum offload disabled */
- .hw_vlan_filter = 0, /**< VLAN filtering disabled */
- + .hw_vlan_strip = 1,
- .jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc = 1, /**< CRC stripped by hardware */
- },
- @@ -210,11 +211,16 @@
- int sent;
- struct rte_eth_dev_tx_buffer *buffer;
- + struct ether_hdr *eth;
- dst_port = l2fwd_dst_ports[portid];
- if (mac_updating)
- l2fwd_mac_updating(m, dst_port);
- + eth = rte_pktmbuf_mtod(m, struct ether_hdr *);
- + printf("mbuff->vlan_tci=%d vlan_tci_outer=%d ethertype=%x \n",
- + m->vlan_tci, m->vlan_tci_outer,
- + eth->ether_type);
- buffer = tx_buffer[dst_port];
- sent = rte_eth_tx_buffer(dst_port, 0, buffer, m);
- if (sent)
- @@ -307,7 +313,6 @@
- portid = qconf->rx_port_list[i];
- nb_rx = rte_eth_rx_burst((uint8_t) portid, 0,
- pkts_burst, MAX_PKT_BURST);
- -
- port_statistics[portid].rx += nb_rx;
- for (j = 0; j < nb_rx; j++) {
- @@ -665,6 +670,7 @@
- if (ret < 0)
- rte_exit(EXIT_FAILURE, "Cannot configure device: err=%d, port=%u\n",
- ret, (unsigned) portid);
- + rte_eth_dev_set_vlan_offload(portid, ETH_VLAN_STRIP_OFFLOAD);
- rte_eth_macaddr_get(portid,&l2fwd_ports_eth_addr[portid]);
- @@ -709,6 +715,7 @@
- if (ret < 0)
- rte_exit(EXIT_FAILURE, "rte_eth_dev_start:err=%d, port=%u\n",
- ret, (unsigned) portid);
- + rte_eth_dev_set_vlan_offload(portid, ETH_VLAN_STRIP_OFFLOAD);
- printf("done: \n");
Add Comment
Please, Sign In to add comment