[PATCH v4] fs/epoll: Enable non-blocking busypoll when epoll timeout is 0

2020-07-10 Thread Sridhar Samudrala
. Signed-off-by: Sridhar Samudrala v4: - Fix a typo (Andy) v3: - reset napi_id if no event available after busy poll (Alex) v2: - Added net_busy_loop_on() check (Eric) --- fs/eventpoll.c | 16 1 file changed, 16 insertions(+) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index

[PATCH v3] fs/epoll: Enable non-blocking busypoll when epoll timeout is 0

2020-07-09 Thread Sridhar Samudrala
-off-by: Sridhar Samudrala v3: reset napi_id if no event available after busy poll (Alex) v2: Added net_busy_loop_on() check (Eric) --- fs/eventpoll.c | 16 1 file changed, 16 insertions(+) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 12eebcdea9c8..b035b5cd19ce 100644 --- a

[PATCH v2] fs/epoll: Enable non-blocking busypoll when epoll timeout is 0

2020-06-24 Thread Sridhar Samudrala
. Signed-off-by: Sridhar Samudrala v2: Added net_busy_loop_on() check (Eric) --- fs/eventpoll.c | 13 + 1 file changed, 13 insertions(+) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 12eebcdea9c8..c33cc98d3848 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1847,6 +1847,19

[PATCH] fs/epoll: Enable non-blocking busypoll with epoll timeout of 0

2020-06-19 Thread Sridhar Samudrala
. Signed-off-by: Sridhar Samudrala --- fs/eventpoll.c | 13 + 1 file changed, 13 insertions(+) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 12eebcdea9c8..5f55078d6381 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1847,6 +1847,19 @@ static int ep_poll(struct eventpoll *ep

[PATCH bpf-next 2/4] xsk: allow AF_XDP sockets to receive packets directly from a queue

2019-10-07 Thread Sridhar Samudrala
direct sockets associated with that device. Signed-off-by: Sridhar Samudrala --- include/linux/filter.h| 18 include/linux/netdevice.h | 10 +++ include/net/xdp_sock.h| 5 include/uapi/linux/if_xdp.h | 5 kernel/bpf/syscall.c

[PATCH bpf-next 3/4] libbpf: handle AF_XDP sockets created with XDP_DIRECT bind flag.

2019-10-07 Thread Sridhar Samudrala
Don't allow an AF_XDP socket trying to bind with XDP_DIRECT bind flag when a normal XDP program is already attached to the device, Don't attach the default XDP program when AF_XDP socket is created with XDP_DIRECT bind flag. Signed-off-by: Sridhar Samudrala --- tools/lib/bpf

[PATCH bpf-next 4/4] xdpsock: add an option to create AF_XDP sockets in XDP_DIRECT mode

2019-10-07 Thread Sridhar Samudrala
This option enables an AF_XDP socket to bind with a XDP_DIRECT flag that allows packets received on the associated queue to be received directly when an XDP program is not attached. Signed-off-by: Sridhar Samudrala --- samples/bpf/xdpsock_user.c | 17 + 1 file changed, 13

[PATCH bpf-next 1/4] bpf: introduce bpf_get_prog_id and bpf_set_prog_id helper functions.

2019-10-07 Thread Sridhar Samudrala
struct bpf_prog prog id is not accessible via prog->aux. To abstract this from the users, 2 helper functions to get and set prog id are introduced and all the users are updated to use these functions. Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +- dr

[PATCH bpf-next 0/4] Enable direct receive on AF_XDP sockets

2019-10-07 Thread Sridhar Samudrala
et -c 3 ./xdpsock -i enp66s0f0 -l -d -q 1 4.5x improvement in l2fwd rate dpdk-pktgen is used to send 64byte UDP packets from a link partner and ethtool ntuple flow rule is used to redirect packets to queue 1 on the system under test. Sridhar Samudrala (4): bpf: introduce bpf_get_prog_id and bp

[PATCH bpf-next 4/5] ixgbe: Enable XDP_SKIP_BPF option for AF_XDP sockets

2019-08-14 Thread Sridhar Samudrala
This patch skips calling BPF program in the receive path if the queue is associated with UMEM that is not shared and bound to an AF_XDP socket that has enabled skip bpf during bind() call. Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 20

[PATCH bpf-next 1/5] xsk: Convert bool 'zc' field in struct xdp_umem to a u32 bitmap

2019-08-14 Thread Sridhar Samudrala
ia flags in xs->umem. Signed-off-by: Sridhar Samudrala --- include/net/xdp_sock.h | 12 ++-- net/xdp/xdp_umem.c | 6 +++--- net/xdp/xsk.c | 12 +--- net/xdp/xsk_diag.c | 3 ++- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/include/net/x

[PATCH bpf-next 2/5] xsk: Introduce XDP_SKIP_BPF bind option

2019-08-14 Thread Sridhar Samudrala
app is interested in receiving all the packets on that queue, we don't need an additional BPF program to do further filtering or lookup/redirect to a socket. Signed-off-by: Sridhar Samudrala --- include/net/xdp_sock.h| 9 + include/uapi/linux/if_xdp.h | 1 + include

[PATCH bpf-next 3/5] i40e: Enable XDP_SKIP_BPF option for AF_XDP sockets

2019-08-14 Thread Sridhar Samudrala
bpf - rxdrop zerocopy 15.4 29.0 l2fwd zerocopy 11.8 18.2 rxdrop copy8.2 10.5 l2fwd copy1.7 1.7 - Signed-off-by: Srid

[PATCH bpf-next 5/5] xdpsock_user: Add skip_bpf option

2019-08-14 Thread Sridhar Samudrala
Signed-off-by: Sridhar Samudrala --- samples/bpf/xdpsock_user.c | 8 1 file changed, 8 insertions(+) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 93eaaf7239b2..509fc6a18af9 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -123,6

[PATCH bpf-next 0/5] Add support for SKIP_BPF flag for AF_XDP sockets

2019-08-14 Thread Sridhar Samudrala
skip-bpf - rxdrop zerocopy 15.4 29.0 l2fwd zerocopy 11.8 18.2 rxdrop copy8.2 10.5 l2fwd copy1.7 1.7 ----- Sridhar Samudrala (5): xsk:

[PATCH net-next v12 0/5] Enable virtio_net to act as a standby for a passthru device

2018-05-24 Thread Sridhar Samudrala
. v2 RFC: - Changed VIRTIO_NET_F_MASTER to VIRTIO_NET_F_BACKUP (mst) - made a small change to the virtio-net xmit path to only use VF datapath for unicasts. Broadcasts/multicasts use virtio datapath. This avoids east-west broadcasts to go over the PCI link. - added suppport for the feature bi

[PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-24 Thread Sridhar Samudrala
same mac address as the failover netdev. This enables paravirtual drivers to use a VF as an accelerated low latency datapath. It also allows migration of VMs with direct attached VFs by failing over to the paravirtual datapath when the VF is unplugged. Signed-off-by: Sridhar Samudrala

[PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-24 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 222 +++- 3

[PATCH net-next v12 4/5] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-05-24 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2

[PATCH net-next v12 3/5] net: Introduce net_failover driver

2018-05-24 Thread Sridhar Samudrala
lso enables hypervisor controlled live migration of a VM with direct attached VF by failing over to the paravirtual datapath when the VF is unplugged. Signed-off-by: Sridhar Samudrala --- Documentation/networking/net_failover.rst | 26 + MAINTAINERS

[PATCH net-next v12 5/5] virtio_net: Extend virtio to use VF datapath when available

2018-05-24 Thread Sridhar Samudrala
24231&w=2 Signed-off-by: Sridhar Samudrala --- Documentation/networking/net_failover.rst | 90 +++ drivers/net/Kconfig | 1 + drivers/net/virtio_net.c | 38 - 3 files changed, 128 insertions(+), 1 deletion(-)

[PATCH net-next v11 0/5] Enable virtio_net to act as a standby for a passthru device

2018-05-21 Thread Sridhar Samudrala
nly use virtio as backup path when VF is unplugged. v2 RFC: - Changed VIRTIO_NET_F_MASTER to VIRTIO_NET_F_BACKUP (mst) - made a small change to the virtio-net xmit path to only use VF datapath for unicasts. Broadcasts/multicasts use virtio datapath. This avoids east-west broadcasts to go over

[PATCH net-next v11 1/5] net: Introduce generic failover module

2018-05-21 Thread Sridhar Samudrala
same mac address as the failover netdev. This enables paravirtual drivers to use a VF as an accelerated low latency datapath. It also allows migration of VMs with direct attached VFs by failing over to the paravirtual datapath when the VF is unplugged. Signed-off-by: Sridhar Samudrala

[PATCH net-next v11 3/5] net: Introduce net_failover driver

2018-05-21 Thread Sridhar Samudrala
t also enables hypervisor controlled live migration of a VM with direct attached VF by failing over to the paravirtual datapath when the VF is unplugged. Signed-off-by: Sridhar Samudrala --- Documentation/networking/net_failover.rst | 26 + MAINTAINERS

[PATCH net-next v11 4/5] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-05-21 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2

[PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-21 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 133 +++- 3

[PATCH net-next v11 5/5] virtio_net: Extend virtio to use VF datapath when available

2018-05-21 Thread Sridhar Samudrala
24231&w=2 Signed-off-by: Sridhar Samudrala --- Documentation/networking/net_failover.rst | 90 +++ drivers/net/Kconfig | 1 + drivers/net/virtio_net.c | 38 - 3 files changed, 128 insertions(+), 1 deletion(-)

[PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-05-07 Thread Sridhar Samudrala
ay to pass the newly added feature bit 'standby' to qemu via libvirt XML file? Signed-off-by: Sridhar Samudrala --- hw/net/virtio-net.c | 2 ++ include/standard-headers/linux/virtio_net.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/net/virtio-net.c b

[PATCH net-next v10 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-07 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 134 +++- 3

[PATCH net-next v10 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-05-07 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2

[PATCH net-next v10 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-05-07 Thread Sridhar Samudrala
netdev is marked as 'standby' netdev and a passthru device with the same MAC is registered as 'primary' netdev. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sri

[PATCH net-next v10 2/4] net: Introduce generic failover module

2018-05-07 Thread Sridhar Samudrala
netdev in this model. A passthru/vf device with the same MAC gets registered as 'primary' netdev. net_failover_register() net_failover_unregister() Signed-off-by: Sridhar Samudrala --- MAINTAINERS|7 + include/linux/netdevice.h | 16 + include/net/net_failover.h

[PATCH net-next v10 0/4] Enable virtio_net to act as a standby for a passthru device

2018-05-07 Thread Sridhar Samudrala
posed 2 netdev model to avoid these issues. - Removed broadcast/multicast optimization and only use virtio as backup path when VF is unplugged. v2 RFC: - Changed VIRTIO_NET_F_MASTER to VIRTIO_NET_F_BACKUP (mst) - made a small change to the virtio-net xmit path to only use VF datapath for

[PATCH net-next v9 2/4] net: Introduce generic failover module

2018-04-27 Thread Sridhar Samudrala
netdev in this model. A passthru/vf device with the same MAC gets registered as 'primary' netdev. net_failover_register() net_failover_unregister() Signed-off-by: Sridhar Samudrala --- include/linux/netdevice.h | 16 + include/net/net_failover.h | 62

[PATCH net-next v9 0/4] Enable virtio_net to act as a standby for a passthru device

2018-04-27 Thread Sridhar Samudrala
that model and proposed 2 netdev model to avoid these issues. - Removed broadcast/multicast optimization and only use virtio as backup path when VF is unplugged. v2 RFC: - Changed VIRTIO_NET_F_MASTER to VIRTIO_NET_F_BACKUP (mst) - made a small change to the virtio-net xmit path to only use VF datapath fo

[PATCH net-next v9 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-27 Thread Sridhar Samudrala
the same MAC is registered as 'primary' netdev. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala --- drivers/net/Kconfig | 1

[PATCH net-next v9 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-27 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 134 +++- 3

[PATCH net-next v9 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-04-27 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2

[PATCH net-next v8 2/4] net: Introduce generic failover module

2018-04-25 Thread Sridhar Samudrala
netdev in this model. A passthru/vf device with the same MAC gets registered as 'primary' netdev. net_failover_register() net_failover_unregister() Signed-off-by: Sridhar Samudrala --- include/linux/netdevice.h | 16 + include/net/net_failover.h | 94 +

[PATCH net-next v8 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-25 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 134 +++- 3

[PATCH net-next v8 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-04-25 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2

[PATCH net-next v8 0/4] Enable virtio_net to act as a standby for a passthru device

2018-04-25 Thread Sridhar Samudrala
es. - Removed broadcast/multicast optimization and only use virtio as backup path when VF is unplugged. v2 RFC: - Changed VIRTIO_NET_F_MASTER to VIRTIO_NET_F_BACKUP (mst) - made a small change to the virtio-net xmit path to only use VF datapath for unicasts. Broadcasts/multicasts use virtio da

[PATCH net-next v8 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-25 Thread Sridhar Samudrala
the same MAC is registered as 'primary' netdev. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala --- drivers/net/Kconfig | 1

[PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-19 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 208 ++-- 3

[PATCH net-next v7 0/4] Enable virtio_net to act as a standby for a passthru device

2018-04-19 Thread Sridhar Samudrala
CKUP (mst) - made a small change to the virtio-net xmit path to only use VF datapath for unicasts. Broadcasts/multicasts use virtio datapath. This avoids east-west broadcasts to go over the PCI link. - added suppport for the feature bit in qemu Sridhar Samudrala (4): virtio_net: Introduce VI

[PATCH v7 net-next 2/4] net: Introduce generic failover module

2018-04-19 Thread Sridhar Samudrala
tions call failover_register()/failover_unregister() with the master netdev created by the failover module. Signed-off-by: Sridhar Samudrala --- include/linux/netdevice.h | 16 + include/net/failover.h| 96 ++ net/Kconfig | 18 + net/core/Makefile | 1 + net/core/

[PATCH v7 net-next 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit

2018-04-19 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with the same MAC address. VIRTIO_NET_F_STANDBY is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2

[PATCH v7 net-next 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-19 Thread Sridhar Samudrala
the same MAC is registered as 'primary' netdev. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala --- drivers/net/Kconfig | 1

[RFC PATCH net-next v6 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Sridhar Samudrala
s registered as 'active' netdev. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala --- drivers/net/Kconfig | 1 + drivers/net/virtio_net.c | 36

[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-10 Thread Sridhar Samudrala
() 2. new virtio_net based solution that uses 3 netdev model. In this model, the bypass module provides interfaces to create/destroy additional master netdev and all the slave events are managed internally. bypass_master_create() bypass_master_destroy() Signed-off-by: Sridhar Samudrala

[RFC PATCH net-next v6 0/4] Enable virtio_net to act as a backup for a passthru device

2018-04-10 Thread Sridhar Samudrala
nicasts. Broadcasts/multicasts use virtio datapath. This avoids east-west broadcasts to go over the PCI link. - added suppport for the feature bit in qemu Sridhar Samudrala (4): virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit net: Introduce generic bypass module virtio_net: Extend virt

[RFC PATCH net-next v6 1/4] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-04-10 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the same MAC address. VIRTIO_NET_F_BACKUP is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2 +- include

[RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic bypass infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 208 ++-- 3

[RFC PATCH net-next v5 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-05 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic bypass infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/netvsc_drv.c | 219 2 files changed, 63 insertions(+), 157

[RFC PATCH net-next v5 0/4] Enable virtio_net to act as a backup for a passthru device

2018-04-05 Thread Sridhar Samudrala
Broadcasts/multicasts use virtio datapath. This avoids east-west broadcasts to go over the PCI link. - added suppport for the feature bit in qemu Sridhar Samudrala (4): virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit net: Introduce generic bypass module virtio_net: Extend

[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module

2018-04-05 Thread Sridhar Samudrala
can use this module by registering a set of ops and each instance of the device when it is probed. Signed-off-by: Sridhar Samudrala --- include/net/bypass.h | 80 ++ net/Kconfig | 18 +++ net/core/Makefile| 1 + net/core/bypass.c| 406

[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-05 Thread Sridhar Samudrala
ead. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala --- drivers/net/Kconfig | 1 + drivers/net/virtio_net.c | 612 ++- 2 files changed, 612 insertions(+), 1 deletion(-) diff --git a/

[RFC PATCH net-next v5 1/4] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-04-05 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the same MAC address. VIRTIO_NET_F_BACKUP is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2 +- include

[PATCH v4 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-03-01 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the same MAC address. VIRTIO_NET_F_BACKUP is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala Reviewed-by: Jesse Brandeburg --- drivers/net

[PATCH v4 0/2] Enable virtio_net to act as a backup for a passthru device

2018-03-01 Thread Sridhar Samudrala
if we decide to make it common with other para virtual drivers like netvsc. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Sridhar Samudrala (2): virtio_net: Introduce VIRTIO_NET

[PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-01 Thread Sridhar Samudrala
ead. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala Signed-off-by: Alexander Duyck Reviewed-by: Jesse Brandeburg --- drivers/net/virtio_net.c | 683 ++- 1 file changed, 682 insertions(+), 1 dele

[RFC PATCH v3 3/3] virtio_net: Enable alternate datapath without creating an additional netdev

2018-02-16 Thread Sridhar Samudrala
: Sridhar Samudrala Reviewed-by: Alexander Duyck --- drivers/net/virtio_net.c | 283 +-- 1 file changed, 101 insertions(+), 182 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 14679806c1b1..c85b2949f151 100644 --- a

[RFC PATCH v3 1/3] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-02-16 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the same MAC address. VIRTIO_NET_F_BACKUP is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2 +- include

[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available

2018-02-16 Thread Sridhar Samudrala
ead. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala Signed-off-by: Alexander Duyck --- drivers/net/virtio_net.c | 639 ++- 1 file changed, 638 insertions(+), 1 deletion(-) diff --git a/drive

[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-16 Thread Sridhar Samudrala
n hypervisor sets the MAC filter on the VF and plugs it back to the guest to switch over to VF datapath. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Sridhar Samudrala (3): virtio_net: Introduce VI

[RFC PATCH net-next v2 0/2] Enable virtio to act as a backup for a passthru device

2018-01-11 Thread Sridhar Samudrala
rtio-net xmit path to only use VF datapath for unicasts. Broadcasts/multicasts use virtio datapath. This avoids east-west broadcasts to go over the PCI link. - added suppport for the feature bit in qemu Sridhar Samudrala (2): virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit virtio_net

[RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-11 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the same MAC address. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2 +- include/uapi/linux/virtio_net.h | 3 +++ 2 files changed, 4 insertions(+), 1

[RFC PATCH 1/1] qemu: Introduce VIRTIO_NET_F_BACKUP feature bit to virtio_net

2018-01-11 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the same MAC address. Signed-off-by: Sridhar Samudrala diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index cd63659140..fa47e723b9 100644 --- a/hw/net/virtio-net.c

[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-11 Thread Sridhar Samudrala
24231&w=2 Signed-off-by: Sridhar Samudrala Reviewed-by: Jesse Brandeburg --- drivers/net/virtio_net.c | 307 ++- 1 file changed, 305 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f149a160a8c5.

[PATCH net-next 0/2] Enable virtio to act as a master for a passthru device

2018-01-02 Thread Sridhar Samudrala
mp;m=151189725224231&w=2 Sridhar Samudrala (2): virtio_net: Introduce VIRTIO_NET_F_MASTER feature bit virtio_net: Extend virtio to use VF datapath when available drivers/net/virtio_net.c| 308 +++- include/uapi/linux/virtio_net.h | 1 + 2 files

[PATCH net-next 1/2] virtio_net: Introduce VIRTIO_NET_F_MASTER feature bit

2018-01-02 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a master for a directly attached passthru device with the same MAC address. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 3 ++- include/uapi/linux/virtio_net.h | 1 + 2 files changed, 3

[PATCH net-next 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-02 Thread Sridhar Samudrala
datapath. This patch is based on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala Reviewed-by: Jesse Brandeburg --- drivers/net/virtio_net.c | 305 ++-

[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-18 Thread Sridhar Samudrala
on the discussion initiated by Jesse on this thread. https://marc.info/?l=linux-virtualization&m=151189725224231&w=2 Signed-off-by: Sridhar Samudrala Reviewed-by: Jesse Brandeburg --- drivers/net/virtio_net.c | 341 ++- 1 file changed, 339 in

[RFC PATCH] net: Introduce a socket option to enable picking tx queue based on rx queue.

2017-08-31 Thread Sridhar Samudrala
. __netdev_pick_tx() returns the cached rx queue when this option is enabled and the TX is happening on the same device. Signed-off-by: Sridhar Samudrala --- include/net/request_sock.h| 1 + include/net/sock.h| 17 + include/uapi/asm-generic/socket.h | 2

[next-queue v6 PATCH 4/7] net: store port/representator id in metadata_dst

2017-03-29 Thread Sridhar Samudrala
ff-by: Sridhar Samudrala --- include/net/dst_metadata.h | 41 - net/core/dst.c | 15 ++- net/core/filter.c | 1 + net/ipv4/ip_tunnel_core.c | 6 -- net/openvswitch/flow_netlink.c | 4 +++- 5 files change

[next-queue v6 PATCH 3/7] i40e: Sync link state between PF/VFs and Port representor netdevs

2017-03-29 Thread Sridhar Samudrala
poof checking on, link-state enable, trust off Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e_main.c| 106 - drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 21 +++- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 + 3 files c

[next-queue v6 PATCH 2/7] i40e: Introduce Port Representor netdevs and switchdev mode.

2017-03-29 Thread Sridhar Samudrala
VFs. Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e.h | 19 +++ drivers/net/ethernet/intel/i40e/i40e_main.c| 187 - drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 + drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.

[next-queue v6 PATCH 7/7] i40e: Add support to get switch id and port number for port netdevs

2017-03-29 Thread Sridhar Samudrala
oop state DOWN mode DEFAULT group default qlen 1000 link/ether 92:6e:ff:35:05:d5 brd ff:ff:ff:ff:ff:ff promiscuity 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 portname 1 switchid 3cfdfea318f8 Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40

[next-queue v6 PATCH 1/7] i40e: Introduce devlink interface

2017-03-29 Thread Sridhar Samudrala
/:42:00.0 pci/:42:00.0: mode legacy # devlink dev eswitch set pci/:42:00.0 mode switchdev devlink answers: Operation not supported # devlink dev eswitch set pci/:42:00.0 mode legacy # devlink dev eswitch show pci/:42:00.0 pci/:05:00.0: mode legacy Signed-off-by: Sridh

[next-queue v6 PATCH 6/7] i40e: Add support for exposing switch port statistics via port netdevs

2017-03-29 Thread Sridhar Samudrala
3 0 3 0 138 0 126 0 0 0 0 0 0 0 0 0 Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e.h | 10 +++ drivers/net/ethernet/intel/i40e/i40e_main.c | 125

[next-queue v6 PATCH 5/7] i40e: Add TX and RX support over port netdev's in switchdev mode

2017-03-29 Thread Sridhar Samudrala
on p4p1-vf1 & p4p1*/ # ip netns exec ns0 ping -c1 -W1 192.168.1.200 /* port rep VF0 -> IP in same subnet - broadcasts will be seen on p4p1_0 */ # ping -I p4p1-vf0 -c1 -W1 192.168.1.200 /* port rep VF1 -> IP in same subnet - broadcasts will be seen on p4p1_1 */ # ping -I p4p1-vf1 -c1 -W1 19

[next-queue v6 PATCH 0/7] i40e: Add port representor and initial switchdev support

2017-03-29 Thread Sridhar Samudrala
erson - introduce switchdev_ops and add support to get switch id and port no. for VFPR netdevs. Suggested by Or Gerlitz v2: - handle i40e_alloc_vfpr_netdev() failures. - minor comment/commit msg updates. Jakub Kicinski (1): net: store port/representator id in metadata_dst Sridhar Samudrala (6):

[next-queue v4 PATCH 0/7]i40e: Add VF Port Representator support for SR-IOV VFs

2017-01-12 Thread Sridhar Samudrala
rt no. for VFPR netdevs. Suggested by Or Gerlitz v2: - handle i40e_alloc_vfpr_netdev() failures. - minor comment/commit msg updates. Jakub Kicinski (1): net: store port/representator id in metadata_dst Sridhar Samudrala (6): i40e: Introduce devlink interface. i40e: Introduce VF Port Represen

[next-queue v4 PATCH 5/7] i40e: Add TX and RX support in switchdev mode.

2017-01-12 Thread Sridhar Samudrala
add vfpr-br type bridge # ip link set enp5s0f0-vf0 master vfpr-br # ip link set enp5s0f0-vf1 master vfpr-br # ip addr add 192.168.1.1/24 dev vfpr-br # ip link set vfpr-br up # ip netns exec ns0 ping -c3 192.168.1.11 # ip netns exec ns1 ping -c3 192.168.1.10 Signed-off-by: Sridhar Samudrala --- driv

[next-queue v4 PATCH 3/7] i40e: Sync link state between VFs and VFPRs

2017-01-12 Thread Sridhar Samudrala
uity 0 addrgenmode eui64 vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state disable, trust off vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state enable, trust off Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 54 +++

[next-queue v4 PATCH 7/7] i40e: Add support to get switch id and port number for VFPR netdevs

2017-01-12 Thread Sridhar Samudrala
268 Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c| 28 +++ drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 40 ++ 3 files changed, 69 insertions(+) diff --gi

[next-queue v4 PATCH 4/7] net: store port/representator id in metadata_dst

2017-01-12 Thread Sridhar Samudrala
ff-by: Sridhar Samudrala --- include/net/dst_metadata.h | 41 - net/core/dst.c | 15 ++- net/core/filter.c | 1 + net/ipv4/ip_tunnel_core.c | 6 -- net/openvswitch/flow_netlink.c | 4 +++- 5 files change

[next-queue v4 PATCH 2/7] i40e: Introduce VF Port Representator(VFPR) netdevs.

2017-01-12 Thread Sridhar Samudrala
f:ff:ff:ff:ff Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e_main.c| 21 ++- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 153 - drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 14 ++ 3 files changed, 182 insertions(+), 6 delet

[next-queue v4 PATCH 1/7] i40e: Introduce devlink interface.

2017-01-12 Thread Sridhar Samudrala
/:05:00.0 pci/:05:00.0: mode legacy # devlink dev eswitch set pci/:05:00.0 mode switchdev devlink answers: Operation not supported # devlink dev eswitch set pci/:05:00.0 mode legacy # devlink dev eswitch show pci/:05:00.0 pci/:05:00.0: mode legacy Signed-off-by: Sridh

[next-queue v4 PATCH 6/7] i40e: Add support for exposing VF port statistics via VFPR netdev on the host.

2017-01-12 Thread Sridhar Samudrala
From: Sridhar Samudrala By default stats counted by HW are returned via the original ndo_get_stats64() api. Stats counted in SW are returned via ndo_get_offload_stats() api. Small script to demonstrate vfpr stats in switchdev mode. PF: enp5s0f0, VFs: enp5s2,enp5s2f1 VFPRs:enp5s0f0-vf0, enp5s0f0

[next-queue v3 PATCH 3/7] i40e: Sync link state between VFs and VFPRs

2017-01-09 Thread Sridhar Samudrala
uity 0 addrgenmode eui64 vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state disable, trust off vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state enable, trust off Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 54 +++

[next-queue v3 PATCH 2/7] i40e: Introduce VF Port Representator(VFPR) netdevs.

2017-01-09 Thread Sridhar Samudrala
f:ff:ff:ff:ff Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e_main.c| 21 ++- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 153 - drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 14 ++ 3 files changed, 182 insertions(+), 6 delet

[next-queue v3 PATCH 5/7] i40e: Add TX and RX support in switchdev mode.

2017-01-09 Thread Sridhar Samudrala
add vfpr-br type bridge # ip link set enp5s0f0-vf0 master vfpr-br # ip link set enp5s0f0-vf1 master vfpr-br # ip addr add 192.168.1.1/24 dev vfpr-br # ip link set vfpr-br up # ip netns exec ns0 ping -c3 192.168.1.11 # ip netns exec ns1 ping -c3 192.168.1.10 Signed-off-by: Sridhar Samudrala --- driv

[next-queue v3 PATCH 7/7] i40e: Add support to get switch id and port number for VFPR netdevs

2017-01-09 Thread Sridhar Samudrala
268 Signed-off-by: Sridhar Samudrala --- drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c| 28 +++ drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 40 ++ 3 files changed, 69 insertions(+) diff --gi

[next-queue v3 PATCH 4/7] net: store port/representator id in metadata_dst

2017-01-09 Thread Sridhar Samudrala
device by storing the netdev pointer along with port id so that if TC decides to redirect or mirror the new netdev will not try to interpret it. This is mostly for SR-IOV devices since switches don't have lower netdevs today. Signed-off-by: Jakub Kicinski Signed-off-by: Sridhar Samu

[next-queue v3 PATCH 6/7] i40e: Add support for exposing VF port statistics via VFPR netdev on the host.

2017-01-09 Thread Sridhar Samudrala
From: Sridhar Samudrala By default stats counted by HW are returned via the original ndo_get_stats64() api. Stats counted in SW are returned via ndo_get_offload_stats() api. Small script to demonstrate vfpr stats in switchdev mode. PF: enp5s0f0, VFs: enp5s2,enp5s2f1 VFPRs:enp5s0f0-vf0, enp5s0f0

[next-queue v3 PATCH 0/7]i40e: Add VF Port Representator support for SR-IOV VFs

2017-01-09 Thread Sridhar Samudrala
tdevs. - Patch 7 adds support to get switch id and port number for VFPR netdevs. Sridhar Samudrala (7): i40e: Introduce devlink interface. i40e: Introduce VF Port Representator(VFPR) netdevs. i40e: Sync link state between VFs and VFPRs net: store port/representator id in metadata_dst i40e

[next-queue v3 PATCH 1/7] i40e: Introduce devlink interface.

2017-01-09 Thread Sridhar Samudrala
/:05:00.0 pci/:05:00.0: mode legacy # devlink dev eswitch set pci/:05:00.0 mode switchdev devlink answers: Operation not supported # devlink dev eswitch set pci/:05:00.0 mode legacy # devlink dev eswitch show pci/:05:00.0 pci/:05:00.0: mode legacy Signed-off-by: Sridh

[net-next PATCH v2 0/6] i40e: Add VF Port representator support for SR-IOV VFs

2017-01-03 Thread Sridhar Samudrala
updates. Jakub Kicinski (1): net: store port/representator id in metadata_dst Sridhar Samudrala (5): i40e: Introduce devlink interface. i40e: Introduce VF Port Representator(VFPR) netdevs. i40e: Sync link state between VFs and VFPRs i40e: Add TX and RX support in switchdev mode. i40e: Add

[net-next PATCH v2 1/6] i40e: Introduce devlink interface.

2017-01-03 Thread Sridhar Samudrala
/:05:00.0 pci/:05:00.0: mode legacy # devlink dev eswitch set pci/:05:00.0 mode switchdev devlink answers: Operation not supported # devlink dev eswitch set pci/:05:00.0 mode legacy # devlink dev eswitch show pci/:05:00.0 pci/:05:00.0: mode legacy Signed-off-by: Sridh

  1   2   3   >