Skip to content

Commit

Permalink
netdev: Remove useless cutlen.
Browse files Browse the repository at this point in the history
Cutlen already applied while processing OVS_ACTION_ATTR_OUTPUT.

Acked-by: Eelco Chaudron <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
Signed-off-by: Ian Stokes <[email protected]
  • Loading branch information
igsilya authored and istokes committed Dec 20, 2017
1 parent b30896c commit ad8b0b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/netdev-bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ netdev_bsd_send(struct netdev *netdev_, int qid OVS_UNUSED,

for (i = 0; i < batch->count; i++) {
const void *data = dp_packet_data(batch->packets[i]);
size_t size = dp_packet_get_send_len(batch->packets[i]);
size_t size = dp_packet_size(batch->packets[i]);

while (!error) {
ssize_t retval;
Expand Down
5 changes: 0 additions & 5 deletions lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,8 +1843,6 @@ dpdk_do_tx_copy(struct netdev *netdev, int qid, struct dp_packet_batch *batch)
dropped += batch_cnt - cnt;
}

dp_packet_batch_apply_cutlen(batch);

uint32_t txcnt = 0;

for (uint32_t i = 0; i < cnt; i++) {
Expand Down Expand Up @@ -1899,7 +1897,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;
Expand Down Expand Up @@ -1930,8 +1927,6 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
int batch_cnt = dp_packet_batch_size(batch);
struct rte_mbuf **pkts = (struct rte_mbuf **) batch->packets;

dp_packet_batch_apply_cutlen(batch);

tx_cnt = netdev_dpdk_filter_packet_len(dev, pkts, batch_cnt);
tx_cnt = netdev_dpdk_qos_run(dev, pkts, tx_cnt, true);
dropped = batch_cnt - tx_cnt;
Expand Down
2 changes: 1 addition & 1 deletion lib/netdev-dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ netdev_dummy_send(struct netdev *netdev, int qid OVS_UNUSED,
struct dp_packet *packet;
DP_PACKET_BATCH_FOR_EACH(packet, batch) {
const void *buffer = dp_packet_data(packet);
size_t size = dp_packet_get_send_len(packet);
size_t size = dp_packet_size(packet);

if (batch->packets[i]->packet_type != htonl(PT_ETH)) {
error = EPFNOSUPPORT;
Expand Down
4 changes: 2 additions & 2 deletions lib/netdev-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ netdev_linux_sock_batch_send(int sock, int ifindex,
struct dp_packet *packet;
DP_PACKET_BATCH_FOR_EACH (packet, batch) {
iov[i].iov_base = dp_packet_data(packet);
iov[i].iov_len = dp_packet_get_send_len(packet);
iov[i].iov_len = dp_packet_size(packet);
mmsg[i].msg_hdr = (struct msghdr) { .msg_name = &sll,
.msg_namelen = sizeof sll,
.msg_iov = &iov[i],
Expand Down Expand Up @@ -1235,7 +1235,7 @@ netdev_linux_tap_batch_send(struct netdev *netdev_,
struct netdev_linux *netdev = netdev_linux_cast(netdev_);
struct dp_packet *packet;
DP_PACKET_BATCH_FOR_EACH (packet, batch) {
size_t size = dp_packet_get_send_len(packet);
size_t size = dp_packet_size(packet);
ssize_t retval;
int error;

Expand Down

0 comments on commit ad8b0b4

Please sign in to comment.