[ovs-dev,v2,3/4] netdev: Remove useless cutlen.

Message ID 1501082468-22006-4-git-send-email-i.maximets@samsung.com
State New
Headers show

Commit Message

Ilya Maximets July 26, 2017, 3:21 p.m.
Cutlen already applied while processing OVS_ACTION_ATTR_OUTPUT.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/netdev-bsd.c   | 3 ---
 lib/netdev-dpdk.c  | 5 -----
 lib/netdev-dummy.c | 2 --
 lib/netdev-linux.c | 3 ---
 4 files changed, 13 deletions(-)

Patch

diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c
index dfc4225..7454d03 100644
--- a/lib/netdev-bsd.c
+++ b/lib/netdev-bsd.c
@@ -699,9 +699,6 @@  netdev_bsd_send(struct netdev *netdev_, int qid OVS_UNUSED,
         const void *data = dp_packet_data(batch->packets[i]);
         size_t size = dp_packet_size(batch->packets[i]);
 
-        /* Truncate the packet if it is configured. */
-        size -= dp_packet_get_cutlen(batch->packets[i]);
-
         while (!error) {
             ssize_t retval;
             if (dev->tap_fd >= 0) {
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 581442d..46334b4 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1757,8 +1757,6 @@  dpdk_do_tx_copy(struct netdev *netdev, int qid, struct dp_packet_batch *batch)
     int newcnt = 0;
     int i;
 
-    dp_packet_batch_apply_cutlen(batch);
-
     for (i = 0; i < batch->count; i++) {
         int size = dp_packet_size(batch->packets[i]);
 
@@ -1817,7 +1815,6 @@  netdev_dpdk_vhost_send(struct netdev *netdev, int qid,
         dpdk_do_tx_copy(netdev, qid, batch);
         dp_packet_delete_batch(batch, true);
     } else {
-        dp_packet_batch_apply_cutlen(batch);
         __netdev_dpdk_vhost_send(netdev, qid, batch->packets, batch->count);
     }
     return 0;
@@ -1848,8 +1845,6 @@  netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
         int cnt = batch->count;
         struct rte_mbuf **pkts = (struct rte_mbuf **) batch->packets;
 
-        dp_packet_batch_apply_cutlen(batch);
-
         cnt = netdev_dpdk_filter_packet_len(dev, pkts, cnt);
         cnt = netdev_dpdk_qos_run(dev, pkts, cnt);
         dropped = batch->count - cnt;
diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c
index a39246a..9c61f74 100644
--- a/lib/netdev-dummy.c
+++ b/lib/netdev-dummy.c
@@ -1072,8 +1072,6 @@  netdev_dummy_send(struct netdev *netdev, int qid OVS_UNUSED,
             break;
         }
 
-        size -= dp_packet_get_cutlen(packet);
-
         if (size < ETH_HEADER_LEN) {
             error = EMSGSIZE;
             break;
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index a8b3b7f..30575fb 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -1234,9 +1234,6 @@  netdev_linux_send(struct netdev *netdev_, int qid OVS_UNUSED,
         size_t size = dp_packet_size(batch->packets[i]);
         ssize_t retval;
 
-        /* Truncate the packet if it is configured. */
-        size -= dp_packet_get_cutlen(batch->packets[i]);
-
         if (!is_tap_netdev(netdev_)) {
             /* Use our AF_PACKET socket to send to this device. */
             struct iovec iov;