From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760140AbdEVRA3 (ORCPT ); Mon, 22 May 2017 13:00:29 -0400 Received: from www62.your-server.de ([213.133.104.62]:38094 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759979AbdEVRAW (ORCPT ); Mon, 22 May 2017 13:00:22 -0400 Message-ID: <5923191E.30804@iogearbox.net> Date: Mon, 22 May 2017 19:00:14 +0200 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Miller CC: garsilva@embeddedor.com, ast@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kernel: bpf: remove dead code References: <20170522140746.GA10113@embeddedgus> <20170522.103800.1354089494827582585.davem@davemloft.net> <5922FB28.5070303@iogearbox.net> <20170522.122742.1326733219925627993.davem@davemloft.net> In-Reply-To: <20170522.122742.1326733219925627993.davem@davemloft.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/22/2017 06:27 PM, David Miller wrote: [...] > Ok I understand the issue now. Thanks for explaining. > > I guess a hard-coded value of 2 and an adjusted comment above the > assignment of ip_align is the way to go. > > I'll push the following, thanks everyone: > > ==================== > net: Make IP alignment calulations clearer. > > The assignmnet: > > ip_align = strict ? 2 : NET_IP_ALIGN; > > in compare_pkt_ptr_alignment() trips up Coverity because we can only > get to this code when strict is true, therefore ip_align will always > be 2 regardless of NET_IP_ALIGN's value. > > So just assign directly to '2' and explain the situation in the > comment above. > > Reported-by: "Gustavo A. R. Silva" > Signed-off-by: David S. Miller Yeah, that's fine, thanks! Acked-by: Daniel Borkmann