Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2096358ybl; Thu, 30 Jan 2020 11:17:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzVjgNO88uqecwQJP46R0kSQpkSObWd5wC8ekx723MwneQS68P/2Np36KplpWxG3E6NJbD2 X-Received: by 2002:a05:6808:611:: with SMTP id y17mr3780269oih.146.1580411846366; Thu, 30 Jan 2020 11:17:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580411846; cv=none; d=google.com; s=arc-20160816; b=ujKv8NOV1UjfVagFyZAq50+wN+kTdz3C2/mjXDPQD9PLFE9M7FB1Mlha2XF/L64TTO 3Ja/z6Uz/NWdtmbXVxyOZEGa8LdbrMbmbhiRSOxM1WIX4r8KKELvyonVECo4XGDO21uS FEqIuFF1M7LTapF85QYUHGg7RssDScTp0mkm/QzNbBLs63L+fs5zT9F+Da+7P3Pigfiz vabZE6NNTy+D7A3vpqGL3P3nyk/8XmQpEoOi1gW/2ZqVO/4iYactXpH6X/WcYGFb/hns u7daAu78ZcgPzi9NqkMDTqMwawp0BRhZuzbUoGs7f90xxWBmTQFcZyjuB3Zcqcp6xd4g /uiQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gMKxEWZZ6lX77QSYtIAtNC6EQ2O6l/u6s7lyX+GfnwY=; b=rb5lfD6qbmrqBRQukozIlzNsWaSbj+h62/Iqw5BnpjfTRpzzTp8+WmhvwfOWeSybAa Q8qW1UqEcoCL999OGB5QZslfI/fQJivZdqQU4XGr2oM6PXmPzX2WlfZq7+EwjLM4WIt3 aCbbWTKvszY5MaF8lzramL7lVjQmabUBPhUDD400XnJURHCcE+SPFQ4Cb2cMC44bRiWR 3V6t7eaOf7oTgF0i9+CCGaKQEtD5IStReHNRaTo4rLkSuyJF1cylWiApgSW569IDaKfl XacSWJ9/pld5p9E64HEcjLUHIXkZbzTFakHaLfVtckW+YaNGuW4d39hz52rBihTKvkyI OeFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="yd/pzMyo"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si1901490oix.49.2020.01.30.11.17.14; Thu, 30 Jan 2020 11:17:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="yd/pzMyo"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730357AbgA3Snb (ORCPT + 99 others); Thu, 30 Jan 2020 13:43:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:52130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730613AbgA3Sn1 (ORCPT ); Thu, 30 Jan 2020 13:43:27 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BB9AF20702; Thu, 30 Jan 2020 18:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409807; bh=HbLFfeGQCXCLi8mrUB2mh0jjKcgAoECwm3vUCTiKN2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yd/pzMyoovoKCSEpcgOUsiaY7W4XMOlEixeJbI4P0wWL0odz9amw+eFkTVW+GK6et QaUu+AYY5G6zr/Yj9EA3kTggOYVkwjZoSl5FlQ8MVSODVuSjHnc802Fakld18zFPCe IY0HNNRxPkTojtmarxIgJYCflF0xaTmP9lMQ46wE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Jesper Dangaard Brouer , Ilias Apalodimas , "David S. Miller" Subject: [PATCH 5.4 039/110] net: socionext: fix xdp_result initialization in netsec_process_rx Date: Thu, 30 Jan 2020 19:38:15 +0100 Message-Id: <20200130183619.986884058@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130183613.810054545@linuxfoundation.org> References: <20200130183613.810054545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lorenzo Bianconi [ Upstream commit 02758cb6dac31a2b4bd9e535cffbe718acd46404 ] Fix xdp_result initialization in netsec_process_rx in order to not increase rx counters if there is no bpf program attached to the xdp hook and napi_gro_receive returns GRO_DROP Fixes: ba2b232108d3c ("net: netsec: add XDP support") Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/socionext/netsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -941,8 +941,8 @@ static int netsec_process_rx(struct nets struct netsec_de *de = dring->vaddr + (DESC_SZ * idx); struct netsec_desc *desc = &dring->desc[idx]; struct page *page = virt_to_page(desc->addr); + u32 xdp_result = NETSEC_XDP_PASS; struct sk_buff *skb = NULL; - u32 xdp_result = XDP_PASS; u16 pkt_len, desc_len; dma_addr_t dma_handle; struct xdp_buff xdp;