Merge branch 'mhi-net-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx4 / en_rx.c
index 7954c1d..e35e4d7 100644 (file)
@@ -682,8 +682,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
        /* Protect accesses to: ring->xdp_prog, priv->mac_hash list */
        rcu_read_lock();
        xdp_prog = rcu_dereference(ring->xdp_prog);
-       xdp.rxq = &ring->xdp_rxq;
-       xdp.frame_sz = priv->frag_info[0].frag_stride;
+       xdp_init_buff(&xdp, priv->frag_info[0].frag_stride, &ring->xdp_rxq);
        doorbell_pending = false;
 
        /* We assume a 1:1 mapping between CQEs and Rx descriptors, so Rx
@@ -777,10 +776,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
                                                priv->frag_info[0].frag_size,
                                                DMA_FROM_DEVICE);
 
-                       xdp.data_hard_start = va - frags[0].page_offset;
-                       xdp.data = va;
-                       xdp_set_data_meta_invalid(&xdp);
-                       xdp.data_end = xdp.data + length;
+                       xdp_prepare_buff(&xdp, va - frags[0].page_offset,
+                                        frags[0].page_offset, length, false);
                        orig_data = xdp.data;
 
                        act = bpf_prog_run_xdp(xdp_prog, &xdp);
@@ -958,18 +955,14 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget)
 
        /* If we used up all the quota - we're probably not done yet... */
        if (done == budget || !clean_complete) {
-               const struct cpumask *aff;
-               struct irq_data *idata;
                int cpu_curr;
 
                /* in case we got here because of !clean_complete */
                done = budget;
 
                cpu_curr = smp_processor_id();
-               idata = irq_desc_get_irq_data(cq->irq_desc);
-               aff = irq_data_get_affinity_mask(idata);
 
-               if (likely(cpumask_test_cpu(cpu_curr, aff)))
+               if (likely(cpumask_test_cpu(cpu_curr, cq->aff_mask)))
                        return budget;
 
                /* Current cpu is not according to smp_irq_affinity -