Thread (19 messages) 19 messages, 6 authors, 2018-07-30

Re: [PATCH v5 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled

From: Jakub Kicinski <hidden>
Date: 2018-07-27 02:28:12

On Fri, 27 Jul 2018 10:06:41 +0900, Toshiaki Makita wrote:
On 2018/07/27 9:51, Jakub Kicinski wrote:
quoted
On Thu, 26 Jul 2018 23:40:26 +0900, Toshiaki Makita wrote:  
quoted
+		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().
missed that, sorry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help