Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40b8c454 authored by Mintz, Yuval's avatar Mintz, Yuval Committed by David S. Miller
Browse files

qede: Prevent VFs from using XDP



Current implementation of VFs is very tight in regard to queue
resources. VFs support for XDP would require quite a bit of additional
infrastructure in qede and qed [sharing of queue-zones between queues,
more VF cids, mapping of the doorbell bar, etc.].

For now, prevent XDP programs from being attached to VFs.

Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89e1afc4
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -537,6 +537,11 @@ int qede_xdp(struct net_device *dev, struct netdev_xdp *xdp)
{
{
	struct qede_dev *edev = netdev_priv(dev);
	struct qede_dev *edev = netdev_priv(dev);


	if (IS_VF(edev)) {
		DP_NOTICE(edev, "VFs don't support XDP\n");
		return -EOPNOTSUPP;
	}

	switch (xdp->command) {
	switch (xdp->command) {
	case XDP_SETUP_PROG:
	case XDP_SETUP_PROG:
		return qede_xdp_set(edev, xdp->prog);
		return qede_xdp_set(edev, xdp->prog);