vmxnet3: remove mtu check
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 9 Jul 2015 18:24:10 +0000 (11:24 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 9 Jul 2015 22:39:22 +0000 (00:39 +0200)
Remove check for packets greater than MTU. No other driver does
this, it should be handled at higher layer

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
drivers/net/vmxnet3/vmxnet3_ethdev.c
drivers/net/vmxnet3/vmxnet3_ethdev.h
drivers/net/vmxnet3/vmxnet3_rxtx.c

index 3caa4c0..3bec173 100644 (file)
@@ -216,7 +216,6 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
 
        hw->num_rx_queues = 1;
        hw->num_tx_queues = 1;
-       hw->cur_mtu = ETHER_MTU;
        hw->bufs_per_pkt = 1;
 
        /* Check h/w version compatibility with driver. */
@@ -391,7 +390,6 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 
        devRead->misc.queueDescPA  = hw->queueDescPA;
        devRead->misc.queueDescLen = hw->queue_desc_len;
-       devRead->misc.mtu          = hw->cur_mtu;
        devRead->misc.numTxQueues  = hw->num_tx_queues;
        devRead->misc.numRxQueues  = hw->num_rx_queues;
 
index 0fa2845..3286923 100644 (file)
@@ -107,7 +107,6 @@ struct vmxnet3_hw {
        uint8_t num_tx_queues;
        uint8_t num_rx_queues;
        uint8_t bufs_per_pkt;
-       uint16_t cur_mtu;
 
        Vmxnet3_TxQueueDesc   *tqd_start;       /* start address of all tx queue desc */
        Vmxnet3_RxQueueDesc   *rqd_start;       /* start address of all rx queue desc */
index 14f6c1d..eb5d096 100644 (file)
@@ -368,16 +368,6 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                                continue;
                        }
 
-                       /* Needs to minus ether header len */
-                       if (txm->data_len > (hw->cur_mtu + ETHER_HDR_LEN)) {
-                               PMD_TX_LOG(DEBUG, "Packet data_len higher than MTU");
-                               rte_pktmbuf_free(tx_pkts[nb_tx]);
-                               txq->stats.drop_total++;
-
-                               nb_tx++;
-                               continue;
-                       }
-
                        txd = (Vmxnet3_TxDesc *)(txq->cmd_ring.base + txq->cmd_ring.next2fill);
                        if (rte_pktmbuf_pkt_len(txm) <= VMXNET3_HDR_COPY_SIZE) {
                                struct Vmxnet3_TxDataDesc *tdd;