From: xiongweimin <[email protected]> Update TODO comments related to TSO (TCP Segmentation Offload) and checksum handling to clearly document the current limitations and what's needed for future implementation.
Signed-off-by: Weimin Xiong <[email protected]> Co-authored-by: Cursor <[email protected]> --- drivers/vhost/net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 77b59f49b..c6854cba5 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -644,7 +644,7 @@ static bool vhost_exceeds_maxpend(struct vhost_net *net) static size_t init_iov_iter(struct vhost_virtqueue *vq, struct iov_iter *iter, size_t hdr_size, int out) { - /* Skip header. TODO: support TSO. */ + /* Skip header. TSO support requires parsing virtio_net_hdr gso_type */ size_t len = iov_length(vq->iov, out); iov_iter_init(iter, ITER_SOURCE, vq->iov, out, len); @@ -1240,8 +1240,8 @@ static void handle_rx(struct vhost_net *net) iov_iter_init(&msg.msg_iter, ITER_DEST, vq->iov, in, vhost_len); fixup = msg.msg_iter; if (unlikely((vhost_hlen))) { - /* We will supply the header ourselves - * TODO: support TSO. + /* We will supply the header ourselves. + * Note: TSO requires handling gso_size/gso_type in virtio_net_hdr. */ iov_iter_advance(&msg.msg_iter, vhost_hlen); } @@ -1270,7 +1270,7 @@ static void handle_rx(struct vhost_net *net) */ iov_iter_advance(&fixup, sizeof(hdr)); } - /* TODO: Should check and handle checksum. */ + /* Note: Checksum offload handling not yet implemented */ num_buffers = cpu_to_vhost16(vq, headcount); if (likely(set_num_buffers) && -- 2.43.0
