Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx4 / en_rx.c
index cc003fd..d85e644 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <net/busy_poll.h>
 #include <linux/bpf.h>
+#include <linux/bpf_trace.h>
 #include <linux/mlx4/cq.h>
 #include <linux/slab.h>
 #include <linux/mlx4/qp.h>
@@ -709,7 +710,8 @@ static bool mlx4_en_refill_rx_buffers(struct mlx4_en_priv *priv,
        do {
                if (mlx4_en_prepare_rx_desc(priv, ring,
                                            ring->prod & ring->size_mask,
-                                           GFP_ATOMIC | __GFP_COLD))
+                                           GFP_ATOMIC | __GFP_COLD |
+                                           __GFP_MEMALLOC))
                        break;
                ring->prod++;
        } while (--missing);
@@ -928,10 +930,12 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
                                                        length, cq->ring,
                                                        &doorbell_pending)))
                                        goto consumed;
+                               trace_xdp_exception(dev, xdp_prog, act);
                                goto xdp_drop_no_cnt; /* Drop on xmit failure */
                        default:
                                bpf_warn_invalid_xdp_action(act);
                        case XDP_ABORTED:
+                               trace_xdp_exception(dev, xdp_prog, act);
                        case XDP_DROP:
                                ring->xdp_drop++;
 xdp_drop_no_cnt: