Thread (13 messages) 13 messages, 3 authors, 2019-10-24

Re: [PATCH net-next 2/6] sfc: perform XDP processing on received packets.

From: Charles McLachlan <hidden>
Date: 2019-10-24 14:42:46

On 22/10/2019 17:26, Edward Cree wrote:
quoted
@@ -764,6 +872,16 @@ void efx_init_rx_queue(struct efx_rx_queue *rx_queue)
 	rx_queue->fast_fill_trigger = trigger;
 	rx_queue->refill_enabled = true;
 
+	/* Initialise XDP queue information */
+	rc = xdp_rxq_info_reg(&rx_queue->xdp_rxq_info, efx->net_dev,
+			      rx_queue->core_index);
+
+	if (rc) {
+		netif_err(efx, rx_err, efx->net_dev,
+			  "Failure to initialise XDP queue information rc=%d\n",
+			  rc);
+	}
What happens if we try to use XDP after this has failed?
Should we set some kind of "XDP broken" flag to prevent that?

-Ed
Agreed. I've added a flag to track which rx queues fail, and then a per-nic flag
to indicate that at least one rx queue has failed, and hence that we shouldn't 
allow XDP programs to bind.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help