net: simplify flags for tx timestamping
This patch removes the abstraction introduced by the union skb_shared_tx in
the shared skb data.
The access of the different union elements at several places led to some
confusion about accessing the shared tx_flags e.g. in skb_orphan_try().
http://marc.info/?l=linux-netdev&m=128084897415886&w=2
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4d5870ec10
commit
2244d07bfa
@@ -535,14 +535,13 @@ void sock_release(struct socket *sock)
|
||||
}
|
||||
EXPORT_SYMBOL(sock_release);
|
||||
|
||||
int sock_tx_timestamp(struct msghdr *msg, struct sock *sk,
|
||||
union skb_shared_tx *shtx)
|
||||
int sock_tx_timestamp(struct sock *sk, __u8 *tx_flags)
|
||||
{
|
||||
shtx->flags = 0;
|
||||
*tx_flags = 0;
|
||||
if (sock_flag(sk, SOCK_TIMESTAMPING_TX_HARDWARE))
|
||||
shtx->hardware = 1;
|
||||
*tx_flags |= SKBTX_HW_TSTAMP;
|
||||
if (sock_flag(sk, SOCK_TIMESTAMPING_TX_SOFTWARE))
|
||||
shtx->software = 1;
|
||||
*tx_flags |= SKBTX_SW_TSTAMP;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(sock_tx_timestamp);
|
||||
|
||||
Reference in New Issue
Block a user