nfp: be drop monitor friendly
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 3 Sep 2017 01:26:03 +0000 (18:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Sep 2017 04:22:05 +0000 (21:22 -0700)
Use dev_consume_skb_any() in place of dev_kfree_skb_any()
when control frame has been successfully processed in flower
and on the driver's main TX completion path.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/cmsg.c
drivers/net/ethernet/netronome/nfp/nfp_net_common.c

index d82d9888d676899a95cf30fe0c50f4d0bcab97f9..e014d862b9b6e30cb589b6b6bcdc84e809d86a8d 100644 (file)
@@ -189,8 +189,11 @@ nfp_flower_cmsg_process_one_rx(struct nfp_app *app, struct sk_buff *skb)
        default:
                nfp_flower_cmsg_warn(app, "Cannot handle invalid repr control type %u\n",
                                     type);
+               goto out;
        }
 
+       dev_consume_skb_any(skb);
+       return;
 out:
        dev_kfree_skb_any(skb);
 }
index 2920889fa6d6198a0a44abe32c079fd6419c3e32..1c0187f0af51f87b070c21a825b00e4a48887428 100644 (file)
@@ -991,7 +991,7 @@ static void nfp_net_tx_complete(struct nfp_net_tx_ring *tx_ring)
 
                /* check for last gather fragment */
                if (fidx == nr_frags - 1)
-                       dev_kfree_skb_any(skb);
+                       dev_consume_skb_any(skb);
 
                tx_ring->txbufs[idx].dma_addr = 0;
                tx_ring->txbufs[idx].skb = NULL;