[PATCH net-next 2/3] vhost_net: user tap recvmsg api to access ptr ring

2019-10-11 Thread prashantbhole . linux
From: Prashant Bhole Currently vhost_net directly accesses ptr ring of tap driver to fetch Rx packet pointers. In order to avoid it this patch modifies tap driver's recvmsg api to do additional task of fetching Rx packet pointers. A special struct tun_msg_ctl is already being usedd via msg_contr

[PATCH net-next 3/3] tuntap: remove usage of ptr ring in vhost_net

2019-10-11 Thread prashantbhole . linux
From: Prashant Bhole Remove usage of ptr ring of tuntap in vhost_net and remove the functions exported from tuntap drivers to get ptr ring. Signed-off-by: Prashant Bhole --- drivers/net/tap.c | 13 - drivers/net/tun.c | 13 - drivers/vhost/net.c | 31 ---

[PATCH net-next 1/3] tuntap: reorganize tun_msg_ctl usage

2019-10-11 Thread prashantbhole . linux
From: Prashant Bhole In order to extend the usage of tun_msg_ctl structure, this patch changes the member name from type to cmd. Also following definitions are changed: TUN_MSG_PTR : TUN_CMD_BATCH TUN_MSG_UBUF: TUN_CMD_PACKET Signed-off-by: Prashant Bhole --- drivers/net/tap.c | 9 ++-

[PATCH net-next 0/3] vhost_net: access ptr ring using tap recvmsg

2019-10-11 Thread prashantbhole . linux
From: Prashant Bhole vhost_net needs to peek tun packet sizes to allocate virtio buffers. Currently it directly accesses tap ptr ring to do it. Jason Wang suggested to achieve this using msghdr->msg_control and modifying the behavior of tap recvmsg. This change will be useful in future in case o