From patchwork Fri Oct 30 02:28:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xie He X-Patchwork-Id: 11868277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A7BAC2D0A3 for ; Fri, 30 Oct 2020 02:29:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACE2D21534 for ; Fri, 30 Oct 2020 02:29:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dHRq+eE/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726113AbgJ3C3l (ORCPT ); Thu, 29 Oct 2020 22:29:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbgJ3C3l (ORCPT ); Thu, 29 Oct 2020 22:29:41 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 579C5C0613CF; Thu, 29 Oct 2020 19:29:41 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id n16so3906742pgv.13; Thu, 29 Oct 2020 19:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wC9KOii5QLLdiCrCmEI/kxJqoF1uKhLCIUYhutpeiaE=; b=dHRq+eE/hWjf3xfWZ1+SllOQ6NwkmhYK+DPmR7eYXwnXQERmpLV2HF+XzgH73sK+zl ytG6/b0qFI+aY3Pm6aGbiEkcNCJ99tYlwUwcbTG9J9rBerp4bPmyiAA5v2WQsfSSbmHL SL73eaUGbNFcdyuBdHJxhK1tiFgv8p6/buw7xF+dmkzTyifx3pqYFpjeWzVmLgkqCuzZ PSB6XRVYKQZJ/AMQRU2o9ZsLimSBqeB7EF8VzZzKPjgt5DUL2yllyffhTY+t2tMNJ6Ta oszKjGiXzporYUXFKbyOJ1jyn5ZlT7MJksotJrP15mGITZuPDlpf6MdyUBzGIh4S43B/ OH6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wC9KOii5QLLdiCrCmEI/kxJqoF1uKhLCIUYhutpeiaE=; b=cOQXYzRxc7K7dS27+16wTKG1buwlh7l40h6W7C+Zi/VsDU9mOf3PKiYf9/gUaDohvT 6axBW5Coih8hbsFiDiwcI//YyBUo+ZzDMu+ernxddqOv3Jt/tG6NwLBIjjbV0gEGV66m slpBmdoX+eifz7BPUQo/9XqbceUlODu+Nrk13voYgH7pqxQzQoGsRjoPPpDymO3shHOD 9kz9QunrGYe40txZvv8/Wr8+OyKR3b9tNUtSXxstsrBfJ0jb6X59xo3GehHmQJM4Eja1 ULMhKZG628VvX48PEObwMHQ9/KcpHhHhds8/onSLS8NA/zduf15g0PKUyBHaTwKjaI3J 6nLg== X-Gm-Message-State: AOAM533JVcpI0ZUFn005ABO77bgwVYkOyVTaStXuiXPLwX7lmUCwf8rE dJczynUIDBwYqIfSOSWs840= X-Google-Smtp-Source: ABdhPJzP88v0Sy+MXIs7Fyy6sJof8VOp5x7mcK3EjQYNGTv+KDCldafUTM2uKqcbnlDSJQZlXQ/7ww== X-Received: by 2002:a17:90b:3882:: with SMTP id mu2mr131181pjb.112.1604024980978; Thu, 29 Oct 2020 19:29:40 -0700 (PDT) Received: from shane-XPS-13-9380.hsd1.ca.comcast.net ([2601:646:8800:1c00:dd13:d62a:9d03:9a42]) by smtp.gmail.com with ESMTPSA id i24sm4216588pfd.7.2020.10.29.19.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 19:29:40 -0700 (PDT) From: Xie He To: Jakub Kicinski , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Willem de Bruijn , Krzysztof Halasa Cc: Xie He Subject: [PATCH net-next v4 0/5] net: hdlc_fr: Improve fr_rx and add support for any Ethertype Date: Thu, 29 Oct 2020 19:28:34 -0700 Message-Id: <20201030022839.438135-1-xie.he.0141@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The main purpose of this series is the last patch. The previous 4 patches are just code clean-ups so that the last patch will not make the code too messy. The patches must be applied in sequence. The receiving code of this driver doesn't support arbitrary Ethertype values. It only recognizes a few known Ethertypes when receiving and drops skbs with other Ethertypes. However, the standard document RFC 2427 allows Frame Relay to support any Ethertype values. This series adds support for this. Change from v3: Split the 4th patch out of the last patch. Improve the commit message of the 1st patch to explicitly state that the stats.rx_dropped count is also increased after "goto rx_error". Change from v2: Small fix to the commit message of the 2nd and 3rd patch Change from v1: Small fix to the commit message of the 2nd patch Xie He (5): net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames net: hdlc_fr: Change the use of "dev" in fr_rx to make the code cleaner net: hdlc_fr: Improve the initial checks when we receive an skb net: hdlc_fr: Do skb_reset_mac_header for skbs received on normal PVC devices net: hdlc_fr: Add support for any Ethertype drivers/net/wan/hdlc_fr.c | 119 +++++++++++++++++++++++--------------- 1 file changed, 73 insertions(+), 46 deletions(-)