From mboxrd@z Thu Jan 1 00:00:00 1970 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=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 0F677C43387 for ; Wed, 16 Jan 2019 17:33:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1E1520675 for ; Wed, 16 Jan 2019 17:33:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="f+v+qgkz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727398AbfAPRdQ (ORCPT ); Wed, 16 Jan 2019 12:33:16 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33153 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbfAPRdQ (ORCPT ); Wed, 16 Jan 2019 12:33:16 -0500 Received: by mail-pf1-f195.google.com with SMTP id c123so3401500pfb.0 for ; Wed, 16 Jan 2019 09:33:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D9Sb8SoKPOW5akR4jp6n2W1CGTPyKL+a3blZ/G6iKQk=; b=f+v+qgkzjqya+5HcnopwscvhxHzmEU0LaVSw2hTuEWkpJc1D5eeRSWQISTQLL4ymPL gU5ZJt0y/nuhSTOyccgDlywwibbAft40muoYGnqBtBE/zAi2umAGild1w/i90ffqpQnd 5BvHhkkzkGbhTcTWU1gm+uRhGD7fnrX5lQ31kCU+8WXk3RI64b3GYPsLidNffkg2sx3x lMNcnBHsK98T0IKWU5Gd8tLfhFeNvQBd+UaSkmSDPUbR9OtkrUG8apLxwiQm3UmajToQ qC4T1ZuEysHOFiO+t/IVRIcTsZBieWpZ29xtofN9cLMVNqEYEjbpMLmz6fIsPrS7xlQ+ xG4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D9Sb8SoKPOW5akR4jp6n2W1CGTPyKL+a3blZ/G6iKQk=; b=TytPCApHf3Ag9UB6hZTqN4/Okv4W8b2HFdDa4MDcCkPaBdai/g71yE6arfh5NNGrQW 1+VOQMJcWn+qd/idiAJP2C+Gjw01hoabs8kArIBILZx5yXUU5pYy1QU5OzG8l6LEsAsx SBHAZKeUYmFq9Vr+UVi4Tqs1xJmD1Y4uUwXI9u58WjB4adz9vyun3nvbYHsJEJrVwHnh 6Aas0tbtt2HxSCwjVl6qiIO4ImSuU0R7vBBkhVc/cFFZ2K/aVwJXGH+mcCyAVJcBI3Kb F3vSARmg8SSK/Tofu7WgH8GM4Yed1htAOP2hKQW4+UfOVbiji/eWL4fc18OCE4xH1PW5 B69Q== X-Gm-Message-State: AJcUukdaVEMxa9oOQXwnWiBGHxP/tIk/ENOSqyY+DZPSAiXicF9+IpAW IPB63rD+fkM92Fq+cfQ1AsIGzw== X-Google-Smtp-Source: ALg8bN6NLnNkv9FehEzauiQY9vaf6rX4sTgErCCM+pwXaEh1KAcKYNerORa+foK1k248YrZ6hGGrkg== X-Received: by 2002:a63:f515:: with SMTP id w21mr9815960pgh.220.1547659995102; Wed, 16 Jan 2019 09:33:15 -0800 (PST) Received: from shemminger-XPS-13-9360 ([167.220.59.105]) by smtp.gmail.com with ESMTPSA id h74sm11044132pfd.35.2019.01.16.09.33.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 09:33:15 -0800 (PST) Date: Wed, 16 Jan 2019 09:33:12 -0800 From: Stephen Hemminger To: wangyunjian Cc: , , , Nkolay Aleksandrov , Roopa Prabhu Subject: Re: [PATCH net v3] net: bridge: Fix ethernet header pointer before check skb forwardable Message-ID: <20190116093312.5274776e@shemminger-XPS-13-9360> In-Reply-To: <1547643861-15340-1-git-send-email-wangyunjian@huawei.com> References: <1547643861-15340-1-git-send-email-wangyunjian@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 16 Jan 2019 21:04:21 +0800 wangyunjian wrote: > if (unlikely(netpoll_tx_running(to->br->dev))) { > + skb_push(skb, ETH_HLEN); > if (!is_skb_forwardable(skb->dev, skb)) { > kfree_skb(skb); > } else { > - skb_push(skb, ETH_HLEN); > br_netpoll_send_skb(to, skb); > } > return; The patch looks correct. On minor style issue is that after moving skb_push out of the if statement, both branches of the statement now contain a single line and therefore the brackets are no longer necessary. Suprised that checkpatch did not complain about this.