Yes, but I'm not intend to change it, using the existing interface is enough.+ struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp);XDP_TX can avoid this conversion to xdp_frame.
It would requires some refactor of fec_enet_txq_xmit_frame().
+ struct fec_enet_private *fep = netdev_priv(ndev);
+ struct fec_enet_priv_tx_q *txq;
+ int cpu = smp_processor_id();
+ struct netdev_queue *nq;
+ int queue, ret;
+
+ queue = fec_enet_xdp_get_tx_queue(fep, cpu);
+ txq = fep->tx_queue[queue];
Yes, but the XDP path share the queue with the kernel network stack, so+ nq = netdev_get_tx_queue(fep->netdev, queue);
+
+ __netif_tx_lock(nq, cpu);
It is sad that XDP_TX takes a lock for each frame.
we need a lock here, unless there is a dedicated queue for XDP path. Do
you have a better solution?