net/sched: Make etf report drops on error_queue
Use the socket error queue for reporting dropped packets if the socket has enabled that feature through the SO_TXTIME API. Packets are dropped either on enqueue() if they aren't accepted by the qdisc or on dequeue() if the system misses their deadline. Those are reported as different errors so applications can react accordingly. Userspace can retrieve the errors through the socket error queue and the corresponding cmsg interfaces. A struct sock_extended_err* is used for returning the error data, and the packet's timestamp can be retrieved by adding both ee_data and ee_info fields as e.g.: ((__u64) serr->ee_data << 32) + serr->ee_info This feature is disabled by default and must be explicitly enabled by applications. Enabling it can bring some overhead for the Tx cycles of the application. Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
3048cf84d1
commit
4b15c70753
@@ -147,8 +147,11 @@ struct scm_ts_pktinfo {
|
||||
*/
|
||||
enum txtime_flags {
|
||||
SOF_TXTIME_DEADLINE_MODE = (1 << 0),
|
||||
SOF_TXTIME_REPORT_ERRORS = (1 << 1),
|
||||
|
||||
SOF_TXTIME_FLAGS_MASK = (SOF_TXTIME_DEADLINE_MODE)
|
||||
SOF_TXTIME_FLAGS_LAST = SOF_TXTIME_REPORT_ERRORS,
|
||||
SOF_TXTIME_FLAGS_MASK = (SOF_TXTIME_FLAGS_LAST - 1) |
|
||||
SOF_TXTIME_FLAGS_LAST
|
||||
};
|
||||
|
||||
struct sock_txtime {
|
||||
|
Reference in New Issue
Block a user