Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2867726pxb; Sat, 6 Feb 2021 10:19:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/3lstj7ZiIhfLZjrLXwKLvSkcBWsD37sxVdTSCu7lJc/kmF1vBmy18H3sKP5ayyKvN9Pp X-Received: by 2002:a17:906:d7bc:: with SMTP id pk28mr4515686ejb.370.1612635582604; Sat, 06 Feb 2021 10:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612635582; cv=none; d=google.com; s=arc-20160816; b=EGT2kSnVu58EDXySrvwo7xG8OOTYZqnASU7dHS0KjL/+MaJTVXUTXExF7fkray7tkC f/1OagFeINlT+/WDjWCy/2GFqWLVQzNzhdNV+uoxM+qtyij43mRQa1f/q6KlAKPMRRew xDBZ3AyhZFr/bZzzlbLWnn4NkzY1ldBSEcXvnE8LcHJSUU2yJJs3Vg3HwlAFQOYuWNkA qr2CoHvKY3P9aEQ9q3HOX1LrF/jQbWEHi8GVEKuy+5JKTAKs1h+L+SesfBaiLKJhXtoI tqN0sLz8zxBdDga18M7Ir5sxA5vxS6Cwu2cjGGec8XyCnSvfOxEQYnGjNizB2JV/Z/Oe wRYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=aLDSj186f0bR5X7Y8YAcIhnfvG2HaPYJ7L9LPKrPwA8=; b=PgR/XoiKumOeQrlX0DR5KWGdri07Kfw0CVXjZYjeolSmPzHZNBkXipZBTSKMzHSn/o lDV5lxpPNXE7NjgbpeVkZRZBwDcSjAtBHsHqGweOBzAkFQs500wlRlc3dxT0yjymfqyy rDlLkT8S5riKVLLc8ZUqkBD09Dc3wWoUBZwE0WLURWOA8IczjDyabIVyXzKFcEBMCRgl ml4GDWiVcf69RXBoyaOIR1gLaMWaB/3CEp287tba0QlHGj4UhUeoo+wgn/C2duB/F0TM L4IURYwnWbqkwdVkfNj+vOk0OJ0YhRf8MXTy6JKYWGyxUrz86xE+F+PKDc43DaCQJsqU M/rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pWgHDJ1C; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o27si8642030edz.400.2021.02.06.10.18.34; Sat, 06 Feb 2021 10:19:42 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=pWgHDJ1C; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229889AbhBFPns (ORCPT + 99 others); Sat, 6 Feb 2021 10:43:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbhBFPnr (ORCPT ); Sat, 6 Feb 2021 10:43:47 -0500 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8808BC06174A; Sat, 6 Feb 2021 07:43:06 -0800 (PST) Received: by mail-il1-x12f.google.com with SMTP id e7so8695451ile.7; Sat, 06 Feb 2021 07:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aLDSj186f0bR5X7Y8YAcIhnfvG2HaPYJ7L9LPKrPwA8=; b=pWgHDJ1CWcvw+AZdGCS9agQtQZkHarO5t4EvG6ZiuRTCKMC/hZWM3ZBjXn71tmlUCl njiWna7r5z36slxDTiVoESyGopv9nSRHfk9Gfa6HNGWbI2DJE73XrR5px34p3fGP52IN fVgXslELR5Dj5+uJHPYYqcBt30WMrKAJqskn3uCd7/hy1+Phkrcl32hOmupWBU5q5J5/ 6AepUiLCf7hhiYfN+GJxNVgwiNXtNnhMdAw4vE+J/8P1EXnu6yu5eS/NC3UNsVIm2ZM3 SpDvjwaN9o1n7obSIx1v4fBRSFlAnanvUA0rEZeVVSB2pnxUXlWposd8bA31pBuafNeW 1gsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aLDSj186f0bR5X7Y8YAcIhnfvG2HaPYJ7L9LPKrPwA8=; b=cRr+xJtTu6my7OW0FSOfCR4F1TbCu56/GiUuKRpUBpuHwte2QCabnkin4+QA4lgDE7 VpkQoFzTQrlqWVLQNipY2l7imR/sqIPAu9TH2f/vxDmFShW9IQuKV3lAduQBqX8wRGZh 5PmMmsTX6hI9Tp8CgymqZx9qx8qsWnlEtNFRuV9AvO9+bD6wkJLeAolInwT1Es5ceT/P /Hou47hapZ8s6IpG/UwPjgd+YdJBWsaORIOUo2oLqRofJS5wT26/s1njbsHVLncvUHKT tMfQWeK3WQ+Ri7H8eB+S3twBQlOx78rYb/+uKk3NE+D0SExSExD0TN8FmTWmjrD6HuhT PHeQ== X-Gm-Message-State: AOAM5325L5rBF4L311TXYBTyh6ZSjMy6hbS4icabLaThjkz6Db+dnWSD 5VrMhkGyGWW4lfC6WXXQQEcjoyp5bD9ZKe1kqrs= X-Received: by 2002:a05:6e02:1a29:: with SMTP id g9mr8283633ile.54.1612626185418; Sat, 06 Feb 2021 07:43:05 -0800 (PST) MIME-Version: 1.0 References: <20210205224124.21345-1-xie.he.0141@gmail.com> In-Reply-To: From: Eyal Birger Date: Sat, 6 Feb 2021 17:42:54 +0200 Message-ID: Subject: Re: [PATCH net-next] net/packet: Improve the comment about LL header visibility criteria To: Xie He Cc: "David S. Miller" , Jakub Kicinski , Willem de Bruijn , Eric Dumazet , John Ogness , Tanner Love , Network Development , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sat, Feb 6, 2021 at 4:52 AM Willem de Bruijn wrote: > > On Fri, Feb 5, 2021 at 5:42 PM Xie He wrote: > > > > The "dev_has_header" function, recently added in > > commit d549699048b4 ("net/packet: fix packet receive on L3 devices > > without visible hard header"), > > is more accurate as criteria for determining whether a device exposes > > the LL header to upper layers, because in addition to dev->header_ops, > > it also checks for dev->header_ops->create. > > > > When transmitting an skb on a device, dev_hard_header can be called to > > generate an LL header. dev_hard_header will only generate a header if > > dev->header_ops->create is present. > > > > Signed-off-by: Xie He > > Acked-by: Willem de Bruijn > > Indeed, existence of dev->header_ops->create is the deciding factor. Thanks Xie. As such, may I suggest making this explicit by making dev_hard_header() use dev_has_header()? Eyal.