From: Yuval Shaia Date: Thu, 6 Sep 2018 11:12:38 +0000 (-0700) Subject: IB/ipoib: Update RX counters after ACL filtering X-Git-Tag: v4.1.12-124.31.3~524 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=21f3d44c5dcd1e0d610bf5b6514d8a4360ccef6a;p=users%2Fjedix%2Flinux-maple.git IB/ipoib: Update RX counters after ACL filtering There is no reason to update RX counters if packet will be dropped in IB-ACL filtering. Orabug: 28655409 Signed-off-by: Yuval Shaia Reviewed-by: HÃ¥kon Bugge Signed-off-by: Brian Maly --- diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 11456e2d68e2..406f07b4b6da 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -284,9 +284,6 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc) skb->truesize = SKB_TRUESIZE(skb->len); - ++dev->stats.rx_packets; - dev->stats.rx_bytes += skb->len; - if (unlikely(be16_to_cpu(skb->protocol) == ETH_P_ARP)) { if (priv->acl.enabled) { subnet_prefix = be64_to_cpu(sgid->global.subnet_prefix); @@ -312,6 +309,9 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc) goto drop; } + ++dev->stats.rx_packets; + dev->stats.rx_bytes += skb->len; + skb_push(skb, IPOIB_ENCAP_LEN); skb_add_pseudo_hdr(skb);