public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Sven Auhagen <sven.auhagen@voleatech.de>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "lorenzo.bianconi@redhat.com" <lorenzo.bianconi@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"thomas.petazzoni@bootlin.com" <thomas.petazzoni@bootlin.com>,
	"brouer@redhat.com" <brouer@redhat.com>,
	"ilias.apalodimas@linaro.org" <ilias.apalodimas@linaro.org>,
	"matteo.croce@redhat.com" <matteo.croce@redhat.com>,
	"mw@semihalf.com" <mw@semihalf.com>,
	"jakub.kicinski@netronome.com" <jakub.kicinski@netronome.com>
Subject: [PATCH] mvneta driver disallow XDP program on hardware buffer management
Date: Wed, 22 Jan 2020 08:56:31 +0000	[thread overview]
Message-ID: <581AE616-51FA-41F0-B4F1-E0CA761D68F2@voleatech.de> (raw)

Recently XDP Support was added to the mvneta driver for software buffer management only.
It is still possible to attach an XDP program if hardware buffer management is used.
It is not doing anything at that point.

The patch disallows attaching XDP programs to mvneta if hardware buffer management is used.

Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de>

--- drivers/net/ethernet/marvell/mvneta.c            2020-01-22 08:44:05.611395960 +0000
+++ drivers/net/ethernet/marvell/mvneta.c         2020-01-22 08:45:23.472263795 +0000
@@ -4225,6 +4225,11 @@ static int mvneta_xdp_setup(struct net_d
                                return -EOPNOTSUPP;
                }

+              if (pp->bm_priv) {
+                              NL_SET_ERR_MSG_MOD(extack, "Hardware Buffer Management not supported on XDP");
+                              return -EOPNOTSUPP;
+              }
+
                need_update = !!pp->xdp_prog != !!prog;
                if (running && need_update)
                                mvneta_stop(dev);



+++ Voleatech auf der E-World, 11. bis 13. Februar 2020, Halle 5, Stand 521 +++

Beste Grüße/Best regards

Sven Auhagen
Dipl. Math. oec., M.Sc.
Voleatech GmbH
HRB: B 754643
USTID: DE303643180
Grathwohlstr. 5
72762 Reutlingen
Tel: +49 7121539550
Fax: +49 7121539551
E-Mail: sven.auhagen@voleatech.de
www.voleatech.de<https://www.voleatech.de>
Diese Information ist ausschließlich für den Adressaten bestimmt und kann vertraulich oder gesetzlich geschützte Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat sind, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Anderen als dem bestimmungsgemäßen Adressaten ist es untersagt, diese E-Mail zu lesen, zu speichern, weiterzuleiten oder ihren Inhalt auf welche Weise auch immer zu verwenden. Für den Adressaten sind die Informationen in dieser Mail nur zum persönlichen Gebrauch. Eine Weiterleitung darf nur nach Rücksprache mit dem Absender erfolgen. Wir verwenden aktuelle Virenschutzprogramme. Für Schäden, die dem Empfänger gleichwohl durch von uns zugesandte mit Viren befallene E-Mails entstehen, schließen wir jede Haftung aus.

             reply	other threads:[~2020-01-22  8:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22  8:56 Sven Auhagen [this message]
2020-01-22 23:04 ` [PATCH] mvneta driver disallow XDP program on hardware buffer management Lorenzo Bianconi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=581AE616-51FA-41F0-B4F1-E0CA761D68F2@voleatech.de \
    --to=sven.auhagen@voleatech.de \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jakub.kicinski@netronome.com \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=matteo.croce@redhat.com \
    --cc=mw@semihalf.com \
    --cc=netdev@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox