Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2461680pxb; Fri, 5 Feb 2021 20:08:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPKfLS2df52KepgmpoGL7X405j7HTKkEhYK3S3GwXZTdVmVS07RDCM1qGsECOXBuMGsFbi X-Received: by 2002:a17:906:fcb5:: with SMTP id qw21mr7082795ejb.391.1612584488528; Fri, 05 Feb 2021 20:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612584488; cv=none; d=google.com; s=arc-20160816; b=XvMPMec/GDo2j4k0jyokcANuWmMwnOErOPMb4Efm/gdDezLlkpyRLXEXc4hxq58PI/ KVtsDLfWao+7pHHG//8VFI0zDbHYCSN1jOTDkWjoWPzALsVqcTRlGLzP5n+9VU+W5cED 2gHfQrtP5cFDvog2FTJZkabLaCkrPoyIW4cWgEZfZpeamQMCKNnUZ5l1K+s57H/0J6H4 Q1ZLxwPD2Ejb/L9NHJKNayZdUUNN0dQY77PFxxo8QH0CH51idsGitwJI3xlMtzSVHZze LQ0uaDtQ1A/ac7iHZqoZr/J4Ps2dgwPpaiWIuSaleSdZRuo2IVC7W++QCLv/gd7zbSBK gy3g== 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=ESjeBadsRkrAl+qIXzCFj686nO8RcbYAT55ppoG4TfI=; b=zi3kZbthXPeUKQ+S4Il1hyQFAfe6daZ8m1Ip7xeHoL3mf4OGJTt1FryaN/ZhK5tMK1 1/aYqI3BFoHa2K4g4A/r8B60WIOVJynWMVo7BzSxJf86uk8vbNV9IN7CMd1XxRW4nuvI dafdJuOYtl/bojtSVqc31swfYBUTcoZxClYHVLwDgHv7QmNaMvuptmbVBK0rmuhXv95Q fdzl9vFD2CrFOabI3I0c3WSc332VyehqAlHqE+FV9sVPEyuuiTn2/rXaxKB+B8l2ai8t WUo+rLpnFtoU8UshoKiiTIaOkn5EIl6J7WF82RPk7VmrNCQMZsW1M0ejSVQaDXCyGGut MXxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iyOTr5Y3; 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 o26si6599353ejg.360.2021.02.05.20.07.44; Fri, 05 Feb 2021 20:08:08 -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=iyOTr5Y3; 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 S231865AbhBFEGg (ORCPT + 99 others); Fri, 5 Feb 2021 23:06:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232111AbhBFC7u (ORCPT ); Fri, 5 Feb 2021 21:59:50 -0500 Received: from mail-ua1-x92c.google.com (mail-ua1-x92c.google.com [IPv6:2607:f8b0:4864:20::92c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F80AC061A27 for ; Fri, 5 Feb 2021 18:52:16 -0800 (PST) Received: by mail-ua1-x92c.google.com with SMTP id p19so2784143uad.7 for ; Fri, 05 Feb 2021 18:52:16 -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=ESjeBadsRkrAl+qIXzCFj686nO8RcbYAT55ppoG4TfI=; b=iyOTr5Y38WWt2U+DhmDSY+CBq4jfRgX8ILyD7YpxBzkeNUR+cxPUF9DY77zDG0zUYh DyNhMeCsWL+QjDtPPEWCOyYQJ4FylyTU8H84s00folBHvMWIKo9oX2jesaP/QL2lJ0rL aXve1wzBt16y3WeQthTKPQsrVGvCaOT4UPeEq/IAdrd9P1sqxr8LmTsTcyNl9Nq81g04 OAd2RRJg93oImvbz2d+9QM8gehWtbZ/kO+ItK6g8jE3h2YMCN8jCJpQYkUSY210Wl85Y 9EjT7pAimi5fyPPnHw+fMRJjaOpwrHMNJf16Egtyy+81UeFVzXnN5IkO+VuCNFbKrYme 2fBw== 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=ESjeBadsRkrAl+qIXzCFj686nO8RcbYAT55ppoG4TfI=; b=VAJhuAd8Rjoyuwbu4PL85W0dVDFG9PFI/9n/oFNClCX0ffhF9d2ZNTAbAAlFV8REe0 VIsRGfmYD5gHpNe3aHoEBMw/K0xHdQDSR8jhJqutpIELE9c2JjbK0zr5RSeYPo6feBBE SkxWSM5I2csbfqtAk+3qJ46WSxa/CQ1fBHQdRGoVMwmDaMJgKvegy3Am4h/WnMbE78wy CcAtQ0PXA3IQjpU6XN4pAoGz32fLBye/JcOSr5EXv74nfjaUEbJtvCnsYOzwJ6cUNdmZ dw6Ndq+Sr2ICQL+CUanCVeDvSHrVuNvIHjrcx17AmeantOojaV1Dg+ddz3xJP5sN32PA fQ8A== X-Gm-Message-State: AOAM532rRD4T8pdZgWqnX12UTY9dqtyfWm0F/YNDRXid3gCmdw3hmRJP 2RhAaMzdhenTe+YLBP7m2APNAvEalBY= X-Received: by 2002:ab0:146d:: with SMTP id c42mr5119650uae.56.1612579934935; Fri, 05 Feb 2021 18:52:14 -0800 (PST) Received: from mail-vk1-f178.google.com (mail-vk1-f178.google.com. [209.85.221.178]) by smtp.gmail.com with ESMTPSA id u18sm1292322vkb.26.2021.02.05.18.52.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Feb 2021 18:52:13 -0800 (PST) Received: by mail-vk1-f178.google.com with SMTP id n63so1912499vkn.12 for ; Fri, 05 Feb 2021 18:52:13 -0800 (PST) X-Received: by 2002:a1f:ae81:: with SMTP id x123mr5333772vke.1.1612579932931; Fri, 05 Feb 2021 18:52:12 -0800 (PST) MIME-Version: 1.0 References: <20210205224124.21345-1-xie.he.0141@gmail.com> In-Reply-To: <20210205224124.21345-1-xie.he.0141@gmail.com> From: Willem de Bruijn Date: Fri, 5 Feb 2021 21:51:36 -0500 X-Gmail-Original-Message-ID: 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 , Eric Dumazet , John Ogness , Tanner Love , Eyal Birger , Network Development , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.