diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-01-25 14:48:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-27 13:05:42 +0300 |
commit | 02758cb6dac31a2b4bd9e535cffbe718acd46404 (patch) | |
tree | 30aa053fff7bd25d7d7c42ca91a2909e90013093 /drivers/net/ethernet/socionext | |
parent | b5e82e3c89c78ee0407ea8e8087af5519b6c7bae (diff) | |
download | linux-02758cb6dac31a2b4bd9e535cffbe718acd46404.tar.xz |
net: socionext: fix xdp_result initialization in netsec_process_rx
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 <lorenzo@kernel.org>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/socionext')
-rw-r--r-- | drivers/net/ethernet/socionext/netsec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index 1f685221f96c..e8224b543dfc 100644 --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -948,8 +948,8 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget) 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; |