Merge branch 'ct-offload' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed...
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_rx.c
index e0abe79..57b2494 100644 (file)
@@ -158,7 +158,8 @@ static inline u32 mlx5e_decompress_cqes_cont(struct mlx5e_rq *rq,
                        mlx5e_read_mini_arr_slot(wq, cqd, cqcc);
 
                mlx5e_decompress_cqe_no_hash(rq, wq, cqcc);
-               rq->handle_rx_cqe(rq, &cqd->title);
+               INDIRECT_CALL_2(rq->handle_rx_cqe, mlx5e_handle_rx_cqe_mpwrq,
+                               mlx5e_handle_rx_cqe, rq, &cqd->title);
        }
        mlx5e_cqes_update_owner(wq, cqcc - wq->cc);
        wq->cc = cqcc;
@@ -178,7 +179,8 @@ static inline u32 mlx5e_decompress_cqes_start(struct mlx5e_rq *rq,
        mlx5e_read_title_slot(rq, wq, cc);
        mlx5e_read_mini_arr_slot(wq, cqd, cc + 1);
        mlx5e_decompress_cqe(rq, wq, cc);
-       rq->handle_rx_cqe(rq, &cqd->title);
+       INDIRECT_CALL_2(rq->handle_rx_cqe, mlx5e_handle_rx_cqe_mpwrq,
+                       mlx5e_handle_rx_cqe, rq, &cqd->title);
        cqd->mini_arr_idx++;
 
        return mlx5e_decompress_cqes_cont(rq, wq, 1, budget_rem) - 1;
@@ -1193,6 +1195,7 @@ void mlx5e_handle_rx_cqe_rep(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)
        struct mlx5e_priv *priv = netdev_priv(netdev);
        struct mlx5e_rep_priv *rpriv  = priv->ppriv;
        struct mlx5_eswitch_rep *rep = rpriv->rep;
+       struct mlx5e_tc_update_priv tc_priv = {};
        struct mlx5_wq_cyc *wq = &rq->wqe.wq;
        struct mlx5e_wqe_frag_info *wi;
        struct sk_buff *skb;
@@ -1225,11 +1228,13 @@ void mlx5e_handle_rx_cqe_rep(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)
        if (rep->vlan && skb_vlan_tag_present(skb))
                skb_vlan_pop(skb);
 
-       if (!mlx5e_tc_rep_update_skb(cqe, skb))
+       if (!mlx5e_tc_rep_update_skb(cqe, skb, &tc_priv))
                goto free_wqe;
 
        napi_gro_receive(rq->cq.napi, skb);
 
+       mlx5_tc_rep_post_napi_receive(&tc_priv);
+
 free_wqe:
        mlx5e_free_rx_wqe(rq, wi, true);
 wq_cyc_pop:
@@ -1246,6 +1251,7 @@ void mlx5e_handle_rx_cqe_mpwrq_rep(struct mlx5e_rq *rq,
        u32 wqe_offset     = stride_ix << rq->mpwqe.log_stride_sz;
        u32 head_offset    = wqe_offset & (PAGE_SIZE - 1);
        u32 page_idx       = wqe_offset >> PAGE_SHIFT;
+       struct mlx5e_tc_update_priv tc_priv = {};
        struct mlx5e_rx_wqe_ll *wqe;
        struct mlx5_wq_ll *wq;
        struct sk_buff *skb;
@@ -1278,11 +1284,13 @@ void mlx5e_handle_rx_cqe_mpwrq_rep(struct mlx5e_rq *rq,
 
        mlx5e_complete_rx_cqe(rq, cqe, cqe_bcnt, skb);
 
-       if (!mlx5e_tc_rep_update_skb(cqe, skb))
+       if (!mlx5e_tc_rep_update_skb(cqe, skb, &tc_priv))
                goto mpwrq_cqe_out;
 
        napi_gro_receive(rq->cq.napi, skb);
 
+       mlx5_tc_rep_post_napi_receive(&tc_priv);
+
 mpwrq_cqe_out:
        if (likely(wi->consumed_strides < rq->mpwqe.num_strides))
                return;