Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp366631ybz; Tue, 21 Apr 2020 10:30:56 -0700 (PDT) X-Google-Smtp-Source: APiQypKX04IlPiD6p01MBByz5altVu4r0pf+0dqoYEDKZFRjEfi6oJiIQGbWkDYtNiOW/CODSLmm X-Received: by 2002:a05:6402:558:: with SMTP id i24mr19136526edx.347.1587490255389; Tue, 21 Apr 2020 10:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587490255; cv=none; d=google.com; s=arc-20160816; b=oXV4sJIXda6NrZCA6RgS3KPHvHqbzaIuP3quFZTaRT9HcZPoxekRG59VEGnM3dPTKH rqx+ZGsmGgfDsLPgWGnMtAIapkv4HyQvKkHjforFtCiaFBjkByhvs218Pmst/UAhLEUt tbCFYRJOOLHHWKNVjSmGJdyuyIEMZM/bOXqyiIry/B4vKemqbgv8YxKKulSeLzwNs6cI CTs4tM8SzhW3Ro5XkG9ZuxAA0QlSWyQa1/Fk8Z6ZzqNZgsyyBtAwLkaihYBj7KfTYjOv rrCXHA5nOGEVaMrrcQQjIUn+vuVNLYWQP5XuM60mVBGufzl1lqPkTqVQ1aqwXFgvenyC 6MYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=dh4R1VD7n1NKk0gjBUP8E4ug6rKLDbCtplhMAlU02ck=; b=UYgg+CKLy/Fx6gJP+6i/uuFtDPZln5Gc8vN6xWNzSnaYCMmAXF2yU519BfZ7whu6zk CW8OByRBPTxtxmyL2hp6SmMszHSKYpwjEYRODnK6nc6ef+1dDhYt6RByD+5nY0WFEkwE 5MegDaHVtLmrHQAbYyqmD22B9InUjk4xo8Wv+QBGk0uhnp+SzCiLC2NY6ZA5ogXzB/Ke qo4QnDT41HwoTesVJM3D2KCTFu1VF6e7NRCY+c4wg4clM+qEsyrbKCEVI5/QEaS7EWLI +asLlzXTrJ0WVlK7u9dQ0aTPKXI5y+HQsHeA92Y3N0Io1AuCsgLteMoyHknqXKVOwZqm VK8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="jo7/kyYY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay14si1770057ejb.151.2020.04.21.10.30.31; Tue, 21 Apr 2020 10:30:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="jo7/kyYY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728823AbgDUR1X (ORCPT + 99 others); Tue, 21 Apr 2020 13:27:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:44820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbgDUR1X (ORCPT ); Tue, 21 Apr 2020 13:27:23 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BEE792071C; Tue, 21 Apr 2020 17:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587490043; bh=6F88OaqaZARKiiq4BVaD5EAs6uHYTsDfOJHwUXlV74g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jo7/kyYYKof0tL8x1R93fvLWZXOI5wW4CbtaUUZYnkMzeysMjnRKqyxyEM0Kx2I7D R9HX3N0T8g6HcaPVtcbWa18T13akgONCUW6Z4C3yzZTD1PO5ZX/7NxdnTxHj5k3eiQ Ep5zqFJh+uMKCnpZWCawOJ5qOFP5YAy1Mebh3554= Date: Tue, 21 Apr 2020 10:27:19 -0700 From: Jakub Kicinski To: Maciej =?UTF-8?B?xbtlbmN6eWtvd3NraQ==?= Cc: Maciej =?UTF-8?B?xbtlbmN6eWtvd3NraQ==?= , Alexei Starovoitov , Daniel Borkmann , Linux Network Development Mailing List , linux-kernel@vger.kernel.org, "David S . Miller" Subject: Re: [PATCH] [RFC] net: bpf: make __bpf_skb_max_len(skb) an skb-independent constant Message-ID: <20200421102719.06bdfe02@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200420231427.63894-1-zenczykowski@gmail.com> References: <20200420231427.63894-1-zenczykowski@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Apr 2020 16:14:27 -0700 Maciej =C5=BBenczykowski wrote: > From: Maciej =C5=BBenczykowski >=20 > This function is used from: > bpf_skb_adjust_room > __bpf_skb_change_tail > __bpf_skb_change_head >=20 > but in the case of forwarding we're likely calling these functions > during receive processing on ingress and bpf_redirect()'ing at > a later point in time to egress on another interface, thus these > mtu checks are for the wrong device. Interesting. Without redirecting there should also be no reason to do this check at ingress, right? So at ingress it's either=20 incorrect or unnecessary?