Skip to contentSkip to conversation

vsock/virtio: remove unnecessary call to `virtio_transport_get_ops`

PATCH Applied Luigi Leonardi 3 participants 3 messages Apr 8 – Apr 12

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 vsock/virtio: remove unnecessary call to `virtio_transport_get_ops`

virtio_transport_send_pkt_info gets all the transport information from the parameter t_ops. There is no need to call virtio_transport_get_ops().

Remove it.

---
Changes in v2:
- Removed Fixes tag.
- Picked up RoBs
- Rebased to latest net-next
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 net/vmw_vsock/virtio_transport_common.c | 2 --
 1 file changed, 2 deletions(-)
net/vmw_vsock/virtio_transport_common.c +0 -2
index 8a9fb23c6e85..a152a9e208d0 100644
@@ -60,8 +60,6 @@ static bool virtio_transport_can_zcopy(const struct virtio_transport *t_ops,
 		return false;
 
 	/* Check that transport can send data in zerocopy mode. */
-	t_ops = virtio_transport_get_ops(info->vsk);
-
 	if (t_ops->can_msgzerocopy) {
 		int pages_to_send = iov_iter_npages(iov_iter, MAX_SKB_FRAGS);
 

---
base-commit: 4c2ffb3ea8a601bb3730754cfaa433e673037cda
change-id: 20260407-remove_parameter-f61a3e40cf90

Best regards,

Signature · 1 line
Luigi Leonardi <[email protected]>
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 17 lines · Luigi Leonardi

virtio_transport_send_pkt_info gets all the transport information from the parameter t_ops. There is no need to call virtio_transport_get_ops().

Remove it.

---
Changes in v2:
- Removed Fixes tag.
- Picked up RoBs
- Rebased to latest net-next
- Link to v1: https://lore.kernel.org/r/[email protected]
---
net/vmw_vsock/virtio_transport_common.c | 2 --

Quoted 1 line
1 file changed, 2 deletions(-)
#2 lore raw
In reply to Luigi Leonardi
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Wed, 08 Apr 2026 17:21:02 +0200 you wrote:

virtio_transport_send_pkt_info gets all the transport information from the parameter t_ops. There is no need to call virtio_transport_get_ops().

Remove it.

[...]

Here is the summary with links:
- [net-next,v2] vsock/virtio: remove unnecessary call to virtio_transport_get_ops

    https://git.kernel.org/netdev/net-next/c/006679268a29

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html