Thread (34 messages) 34 messages, 7 authors, 2017-12-21

Re: [bpf-next V1-RFC PATCH 02/14] xdp/mlx5: setup xdp_rxq_info and extend with qtype

From: Jesper Dangaard Brouer <hidden>
Date: 2017-12-14 06:46:21

On Wed, 13 Dec 2017 15:03:33 -0800 Saeed Mahameed [off-list ref] wrote:
quoted
quoted
quoted
@@ -707,6 +714,8 @@ static void mlx5e_free_rq(struct mlx5e_rq *rq)
   	if (rq->xdp_prog)
   		bpf_prog_put(rq->xdp_prog);
   
+	xdp_rxq_info_unreg(&rq->xdp_rxq);
+
   	switch (rq->wq_type) {
   	case MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ:
   		mlx5e_rq_free_mpwqe_info(rq);
@@ -2768,6 +2777,11 @@ static int mlx5e_alloc_drop_rq(struct
mlx5_core_dev *mdev, if (err)
   		return err;
   
+	/* XDP RX-queue info for "Drop-RQ", packets never reach
XDP */
+	xdp_rxq_info_init(&rq->xdp_rxq);
+	xdp_rxq_info_type(&rq->xdp_rxq, RXQ_TYPE_SINK);
+	xdp_rxq_info_reg(&rq->xdp_rxq);
+  
I don't see why you need this, This RQ is not even assigned to any 
netdev_rxq! it is a pure HW object that drops traffic in HW when netdev 
is down, it even has no buffers or napi handling, just ignore it's 
existence for the sake of mlx5 xdp_rxq_info reg/unreg stuff and remove 
RXQ_TYPE_SINK, bottom line it is not a real RQ and for sure XDP has 
nothing to do with it.
I need it here, because the take-down/free code-path is the same for
these two types of RQ's.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help