All of lore.kernel.org
 help / color / mirror / Atom feed
From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Toshiaki Makita <toshiaki.makita1@gmail.com>,
	netdev@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Re: [PATCH v5 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled
Date: Fri, 27 Jul 2018 10:06:41 +0900	[thread overview]
Message-ID: <aa000680-a097-cd1a-e4ab-aacf9d172b04@lab.ntt.co.jp> (raw)
In-Reply-To: <20180726175127.075185fc@cakuba.netronome.com>

On 2018/07/27 9:51, Jakub Kicinski wrote:
> On Thu, 26 Jul 2018 23:40:26 +0900, Toshiaki Makita wrote:
>> +		max_mtu = PAGE_SIZE - VETH_XDP_HEADROOM -
>> +			  peer->hard_header_len -
>> +			  SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
>> +		if (peer->mtu > max_mtu) {
>> +			NL_SET_ERR_MSG_MOD(extack, "Peer MTU is too large to set XDP");
>> +			err = -ERANGE;
>> +			goto err;
>> +		}
> 
> You need to add .ndo_change_mtu and check this condition there too.

I'm setting peer->max_mtu so no need to add .ndo_change_mtu.
Inappropriate MTU will be refused in dev_set_mtu().

-- 
Toshiaki Makita

  reply	other threads:[~2018-07-27  2:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 14:40 [PATCH v5 bpf-next 0/9] veth: Driver XDP Toshiaki Makita
2018-07-26 14:40 ` [PATCH v5 bpf-next 1/9] net: Export skb_headers_offset_update Toshiaki Makita
2018-07-26 14:40 ` [PATCH v5 bpf-next 2/9] veth: Add driver XDP Toshiaki Makita
2018-07-27  3:02   ` John Fastabend
2018-07-27  4:55     ` Toshiaki Makita
2018-07-26 14:40 ` [PATCH v5 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled Toshiaki Makita
2018-07-27  0:51   ` Jakub Kicinski
2018-07-27  1:06     ` Toshiaki Makita [this message]
2018-07-27  1:08       ` Jakub Kicinski
2018-07-26 14:40 ` [PATCH v5 bpf-next 4/9] veth: Handle xdp_frames in xdp napi ring Toshiaki Makita
2018-07-27  3:40   ` John Fastabend
2018-07-26 14:40 ` [PATCH v5 bpf-next 5/9] veth: Add ndo_xdp_xmit Toshiaki Makita
2018-07-27  3:54   ` John Fastabend
2018-07-26 14:40 ` [PATCH v5 bpf-next 6/9] bpf: Make redirect_info accessible from modules Toshiaki Makita
2018-07-29  7:06   ` kbuild test robot
2018-07-26 14:40 ` [PATCH v5 bpf-next 7/9] xdp: Helpers for disabling napi_direct of xdp_return_frame Toshiaki Makita
2018-07-30 12:33   ` Jesper Dangaard Brouer
2018-07-26 14:40 ` [PATCH v5 bpf-next 8/9] veth: Add XDP TX and REDIRECT Toshiaki Makita
2018-07-26 14:40 ` [PATCH v5 bpf-next 9/9] veth: Support per queue XDP ring Toshiaki Makita

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=aa000680-a097-cd1a-e4ab-aacf9d172b04@lab.ntt.co.jp \
    --to=makita.toshiaki@lab.ntt.co.jp \
    --cc=ast@kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=toshiaki.makita1@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.