File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -511,8 +511,6 @@ static void vhost_vsock_handle_tx_kick(struct vhost_work *work)
511
511
512
512
vhost_disable_notify (& vsock -> dev , vq );
513
513
do {
514
- u32 len ;
515
-
516
514
if (!vhost_vsock_more_replies (vsock )) {
517
515
/* Stop tx until the device processes already
518
516
* pending replies. Leave tx virtqueue
@@ -540,7 +538,7 @@ static void vhost_vsock_handle_tx_kick(struct vhost_work *work)
540
538
continue ;
541
539
}
542
540
543
- len = pkt -> len ;
541
+ total_len += sizeof ( pkt -> hdr ) + pkt -> len ;
544
542
545
543
/* Deliver to monitoring devices all received packets */
546
544
virtio_transport_deliver_tap_pkt (pkt );
@@ -553,9 +551,7 @@ static void vhost_vsock_handle_tx_kick(struct vhost_work *work)
553
551
else
554
552
virtio_transport_free_pkt (pkt );
555
553
556
- len += sizeof (pkt -> hdr );
557
554
vhost_add_used (vq , head , 0 );
558
- total_len += len ;
559
555
added = true;
560
556
} while (likely (!vhost_exceeds_weight (vq , ++ pkts , total_len )));
561
557
You can’t perform that action at this time.
0 commit comments