net: add rte prefix to ether structures
[dpdk.git] / examples / tep_termination / vxlan_setup.c
index ba7d92a..e4af7bc 100644 (file)
@@ -49,7 +49,7 @@
 struct vxlan_conf vxdev;
 
 struct ipv4_hdr app_ip_hdr[VXLAN_N_PORTS];
-struct ether_hdr app_l2_hdr[VXLAN_N_PORTS];
+struct rte_ether_hdr app_l2_hdr[VXLAN_N_PORTS];
 
 /* local VTEP IP address */
 uint8_t vxlan_multicast_ips[2][4] = { {239, 1, 1, 1 }, {239, 1, 2, 1 } };
@@ -69,8 +69,6 @@ uint8_t tep_filter_type[] = {RTE_TUNNEL_FILTER_IMAC_TENID,
 static struct rte_eth_conf port_conf = {
        .rxmode = {
                .split_hdr_size = 0,
-               .ignore_offload_bitfield = 1,
-               .offloads = DEV_RX_OFFLOAD_CRC_STRIP,
        },
        .txmode = {
                .mq_mode = ETH_MQ_TX_NONE,
@@ -131,9 +129,8 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 
        rxconf = &dev_info.default_rxconf;
        txconf = &dev_info.default_txconf;
-       txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE;
 
-       if (port >= rte_eth_dev_count())
+       if (!rte_eth_dev_is_valid_port(port))
                return -1;
 
        rx_rings = nb_devices;
@@ -230,7 +227,7 @@ int
 vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m)
 {
        int i, ret;
-       struct ether_hdr *pkt_hdr;
+       struct rte_ether_hdr *pkt_hdr;
        uint64_t portid = vdev->vid;
        struct ipv4_hdr *ip;
 
@@ -245,7 +242,7 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m)
        }
 
        /* Learn MAC address of guest device from packet */
-       pkt_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
+       pkt_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
        if (is_same_ether_addr(&(pkt_hdr->s_addr), &vdev->mac_address)) {
                RTE_LOG(INFO, VHOST_DATA,
                        "(%d) WARNING: This device is using an existing"