linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about dev_queue_xmit and guaranteed packet transmission
@ 2019-05-09  3:38 Jeffrey Merkey
  0 siblings, 0 replies; only message in thread
From: Jeffrey Merkey @ 2019-05-09  3:38 UTC (permalink / raw)
  To: linux-kernel

I noticed that Linux has been updated on later versions to always
consume the skb in calls to dev_queue_xmit, and may even drop the skb
after returning a return code of NETDEV_TX_OK which seems kind of
broken.  I have an application which requires guaranteed skb
transmission and the following code seems to work well for me if I
call the
netdev->netdev_ops->ndo_start_xmit function directly instead of using
dev_queue_xmit.

Is there a method of calling dev_queue_xmit which guarantees packet
transmission?  The current implementation of dev_queue_xmit used to
return error codes without consuming the skb, which allowed programs
which call it to simply resend the failing skb by calling
dev_queue_xmit again without having to recreate and repopulate the
skb.  There also appears to be no reliable way to know for certain if
dev_queue_xmit even sent a packet since it can at times return
NETDEV_TX_OK then turn around and drop the packet later on.

I have it working calling the ndo_start_xmit driver function directly
which does seem to guarantee  transmission, but would like to know if
there is a way to get guaranteed TX of skb's with dev_queue_xmit.

Jeff

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-09  3:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-09  3:38 Question about dev_queue_xmit and guaranteed packet transmission Jeffrey Merkey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).