lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 3 Sep 2014 14:50:33 -0400 From: Willem de Bruijn <willemb@...gle.com> To: Alexander Duyck <alexander.h.duyck@...el.com> Cc: Network Development <netdev@...r.kernel.org>, Richard Cochran <richardcochran@...il.com>, David Miller <davem@...emloft.net> Subject: Re: [PATCH 1/2] net-timestamp: Merge shared code between phy and regular timestamping > +} > +EXPORT_SYMBOL_GPL(skb_complete_tx_timestamp); > + > +void __skb_tstamp_tx(struct sk_buff *orig_skb, > + struct skb_shared_hwtstamps *hwtstamps, > + struct sock *sk, int tstype) > +{ > + struct sk_buff *skb; > + > + if (!sk) > + return; > + > + /* > + * no hardware time stamps available, > + * so keep the shared tx_flags and only > + * store software time stamp > + */ This comment only makes sense within the else {} clause. As a matter of fact, I'd just drop it. The patch also inverts the branch. I would keep the original order, as that is also the order in skb_complete_tx_timestamp. > + if (!hwtstamps) > + orig_skb->tstamp = ktime_get_real(); > + else > + *skb_hwtstamps(orig_skb) = *hwtstamps; > + Otherwise looks great to me. The code deduplicates shared code between __skb_tstamp_tx and skb_complete_timestamp without introduces logical changes to either codepath. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists