Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1936225pxk; Sun, 13 Sep 2020 23:20:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYy9Yzj6a2SrUuQNjs2YB4QSmyj2CLHxdYLkjruwSY79Pa8s54qalJuFM9VIxFeiGyAZlm X-Received: by 2002:a17:906:edca:: with SMTP id sb10mr12861545ejb.60.1600064456812; Sun, 13 Sep 2020 23:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600064456; cv=none; d=google.com; s=arc-20160816; b=iH4bxSxvoIWuBxXiqYR+cciHgK1nZqfazbk4umCOsSgp3I2Mj8Z8f5JxL4owKNOP+V yD3NwXuDmTWWX5MnZaQFlM7e9G4aUzfiXvanoPhX8Cfa8kZ0daytQAWGpeqJTvhTWAn3 td5rbkAHOCFuom4rcb++e6PTlmJtfCe12HdX94DkZShfIlX4mHicEnjOQ9maYhmjQ4GQ D0F/m4UaLpOpBccPM9Q26Nj57lpHkZv4vBKw3K6WDqgO6HdcZibOgB7javF+u2BS6si4 b/zscfIw2HKtG6jE0oA/im1qhym80JXPinM/3DpYDAAaaG8JeVEAZIOSMD+HwoXEApvy Vhwg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=MYPgJwOB3wumsWdm8PpM5P24nVAroSIX0XmTHErtiN8=; b=FWnYyTkAse0ez3NEVfaIDRiE2OoO+j1wyqsoOSa21KBIFASDtszdml1bzDegOnFHNK Kc3g1GifmQgAlY44oz6mxbKlaFC62253Z0nOufF/TdiUCrD5eSVcwUnIfg7bw/5VUNgA UR2kRFft4e0rnCOXJ/iB01tQMa+9cjmE7aZqV57V2QM9K8uJgx1e+Aq12t5m/3EWWg26 bSNhrifZU/mKDOGl5uq87HNHIu3RYbcXcjAy3eLndzlHKBqwIaxR/NF6EuzB3Az5txsv yYzUN6VAomKH3HII9tWAWOG9/8TbExCpnj8+zgiYkgtuXUGX5GCYG3CusYPrnF/Fyrfg 4eXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m5zMQqKA; 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 j15si5754236ejf.18.2020.09.13.23.20.34; Sun, 13 Sep 2020 23:20:56 -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=@gmail.com header.s=20161025 header.b=m5zMQqKA; 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 S1726087AbgINGTC (ORCPT + 99 others); Mon, 14 Sep 2020 02:19:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726030AbgINGTB (ORCPT ); Mon, 14 Sep 2020 02:19:01 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 423FCC06174A; Sun, 13 Sep 2020 23:18:57 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id o16so4919078pjr.2; Sun, 13 Sep 2020 23:18:57 -0700 (PDT) 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:content-transfer-encoding; bh=MYPgJwOB3wumsWdm8PpM5P24nVAroSIX0XmTHErtiN8=; b=m5zMQqKAG7mE5eqF77oB/b+ELIhxJkB11rPryu9vgZLGbo7a1hjoJPuvEC46eeAbUb TvORpGMCWlzy78ABjT1P8r37FE7fDcjlIRp3EyDUNtuk5fq/U/c5lbVDOdA3NK5Y4ucD 65f+xAFfoO4sbKoTuikmMNgGMxj8FKtoa05l7gyBS0KQAsW8rZNwELD7uyMW930xwSxK BxSt1RQ2vNiQQcwlMGr2Iobk1FBirbaqaHv0GuZDKwIX23s3o0S/twXEw5hVBrPtiYAT +1WX+naMwoWrE14C5dLRsD/N9Grk/QAgGFYLVdND9VyqROiLmtEwI8VAzWJZKWOU0F7z Ts2Q== 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:content-transfer-encoding; bh=MYPgJwOB3wumsWdm8PpM5P24nVAroSIX0XmTHErtiN8=; b=Qmzyo6JXLg3JG/I3niXWVkxEfsqVyLJ1F1ODNs24vDEM2mUu6+PZzNpVe53dQ1FbGZ 5FPEeWDN+uJ1vU3rHv0KnDgsTP6+OQ918JTpgFJW8d8tnEOM9nbauzgiuPbb3GL5o3ax v1oeIU8aqOYkJhfHm0BZW6M2lcI4zjfWlIl6hMK0AjweHapn1O29edexo7OHYiMT8eIy Qmk7cRxGtRDcMZPCv9u7iwUdbRRVeLGHp3VdpL9cYU5fsbu6tbjwysTzL44vdW+zbFSl K2sVuaWsOsN+j3MsaEuUVQxvDzWhLKamwu+l26NguCXeFx2mB/6K7YOdDKcXz6tk1Xyf V+hg== X-Gm-Message-State: AOAM533KL5atjmgZiPpCE617PLQ7XXB6tLNUXO8aeIuOJL9CeSaxCMvL kYO5hdfp67cTJOBDBuFshdHQA2C5X1nzf1Bf6lKjhoPk X-Received: by 2002:a17:90b:816:: with SMTP id bk22mr12784047pjb.66.1600064336828; Sun, 13 Sep 2020 23:18:56 -0700 (PDT) MIME-Version: 1.0 References: <20200903000658.89944-1-xie.he.0141@gmail.com> <20200904151441.27c97d80@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: From: Xie He Date: Sun, 13 Sep 2020 23:18:46 -0700 Message-ID: Subject: Re: [PATCH net v2] drivers/net/wan/hdlc_fr: Add needed_headroom for PVC devices To: =?UTF-8?Q?Krzysztof_Ha=C5=82asa?= Cc: Jakub Kicinski , Krzysztof Halasa , "David S. Miller" , Linux Kernel Network Developers , LKML , Martin Schiller , Willem de Bruijn 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 Sun, Sep 13, 2020 at 10:26 PM Krzysztof Ha=C5=82asa wr= ote: > > Xie He writes: > > > The HDLC device is not actually prepending any header when it is used > > with this driver. When the PVC device has prepended its header and > > handed over the skb to the HDLC device, the HDLC device just hands it > > over to the hardware driver for transmission without prepending any > > header. > > That's correct. IIRC: > - Cisco and PPP modes add 4 bytes > - Frame Relay adds 4 (specific protocols - mostly IPv4) or 10 (general > case) bytes. There is that pvcX->hdlcX transition which adds nothing > (the header is already in place when the packet leaves pvcX device). > - Raw mode adds nothing (IPv4 only, though it could be modified for > both IPv4/v6 easily) > - Ethernet (hdlc_raw_eth.c) adds normal Ethernet header. Thank you for the nice summary! I just realized that we can indeed support both IPv4/v6 in hdlc_raw. Both IPv4 and v6 packets have a version field in the header, so we can use it to distinguish v4 and v6 packets on receiving. We can introduce it as a new feature some time.