linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Matteo Croce <mcroce@redhat.com>
To: netdev@vger.kernel.org
Cc: Robert Richter <rric@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Sunil Goutham <sgoutham@cavium.com>,
	David Miller <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 0/2] Fix thunderx MTU with XDP
Date: Thu, 11 Apr 2019 12:26:31 +0200	[thread overview]
Message-ID: <20190411102633.3685-1-mcroce@redhat.com> (raw)

The thunderx driver can't use XDP with all MTU values.
This patches sets the right MTU values, and add a check to avoid setting
a wrong value which will not function.

v3: Fix a copy-paste from two functions, tested on proper hardware:

# ip link show dev enP2p1s0v0
2: enP2p1s0v0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 1c:1b:0d:0d:52:a4 brd ff:ff:ff:ff:ff:ff
# ip link set enP2p1s0v0 mtu 1800
# ip link set dev enP2p1s0v0 xdpdrv object mtu.o
[  787.019730] nicvf 0002:01:00.1 enP2p1s0v0: Jumbo frames not yet supported with XDP, current MTU 1800.
RTNETLINK answers: Operation not supported
# ip link set enP2p1s0v0 mtu 1500
# ip link set dev enP2p1s0v0 xdpdrv object mtu.o
[  800.574568] nicvf 0002:01:00.1 enP2p1s0v0: Link is Up 10000 Mbps Full duplex
# ip link set enP2p1s0v0 mtu 1600
[  807.248321] nicvf 0002:01:00.1 enP2p1s0v0: Jumbo frames not yet supported with XDP, current MTU 1500.
RTNETLINK answers: Invalid argument

Matteo Croce (2):
  net: thunderx: raise XDP MTU to 1508
  net: thunderx: don't allow jumbo frames with XDP

 .../net/ethernet/cavium/thunder/nicvf_main.c  | 22 +++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

-- 
2.21.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2019-04-11 10:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 10:26 Matteo Croce [this message]
2019-04-11 10:26 ` [PATCH v3 1/2] net: thunderx: raise XDP MTU to 1508 Matteo Croce
2019-04-11 13:04   ` Jesper Dangaard Brouer
2019-04-11 10:26 ` [PATCH v3 2/2] net: thunderx: don't allow jumbo frames with XDP Matteo Croce
2019-04-11 13:05   ` Jesper Dangaard Brouer
2019-04-11 18:11 ` [PATCH v3 0/2] Fix thunderx MTU " David Miller

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=20190411102633.3685-1-mcroce@redhat.com \
    --to=mcroce@redhat.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=rric@kernel.org \
    --cc=sgoutham@cavium.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;
as well as URLs for NNTP newsgroup(s).