From: John Fastabend <john.fastabend@gmail.com>
To: Jakub Kicinski <kubakici@wp.pl>
Cc: jeffrey.t.kirsher@intel.com, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] ixgbe: add XDP support for pass and drop actions
Date: Sun, 23 Apr 2017 21:26:26 -0700 [thread overview]
Message-ID: <58FD7E72.6010907@gmail.com> (raw)
In-Reply-To: <20170423210506.79168335@laptop>
On 17-04-23 09:05 PM, Jakub Kicinski wrote:
> Hi!
>
> On Sun, 23 Apr 2017 18:31:19 -0700, John Fastabend wrote:
>> +static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
>> +{
>> + int i, frame_size = dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
>> + struct ixgbe_adapter *adapter = netdev_priv(dev);
>> + struct bpf_prog *old_prog;
>> +
>> + if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
>> + return -EINVAL;
>> +
>> + if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
>> + return -EINVAL;
>> +
>> + /* verify ixgbe ring attributes are sufficient for XDP */
>> + for (i = 0; i < adapter->num_rx_queues; i++) {
>> + struct ixgbe_ring *ring = adapter->rx_ring[i];
>> +
>> + if (ring_is_rsc_enabled(ring))
>> + return -EINVAL;
>> +
>> + if (frame_size > ixgbe_rx_bufsz(ring))
>> + return -EINVAL;
>> + }
>
> I was just looking through the drivers, working on extended ack
> reporting, trying to bring out the driver XDP error messages out
> directly to iproute2. It seems that multiple drivers are only
> checking that MTU/buffer size is appropriate in the XDP_SETUP
> function, and ignore XDP in case user tries to change MTU later.
> And I think it's the same story with LRO?
>
Agreed we need to harden the drivers to changes post XDP init. I'll submit
a few follow on patches for the ixgbe devices in the morning.
Thanks,
John
next prev parent reply other threads:[~2017-04-24 4:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 1:30 [PATCH 0/2] ixgbe updates John Fastabend
2017-04-24 1:31 ` [PATCH 1/2] ixgbe: add XDP support for pass and drop actions John Fastabend
2017-04-24 4:05 ` Jakub Kicinski
2017-04-24 4:26 ` John Fastabend [this message]
2017-04-24 1:31 ` [PATCH 2/2] ixgbe: add support for XDP_TX action John Fastabend
2017-04-24 19:29 ` Jesper Dangaard Brouer
2017-04-24 19:35 ` John Fastabend
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=58FD7E72.6010907@gmail.com \
--to=john.fastabend@gmail.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=kubakici@wp.pl \
--cc=netdev@vger.kernel.org \
/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).