From patchwork Sun Jun 19 13:31:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 100960 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 510D9B7033 for ; Sun, 19 Jun 2011 23:31:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753862Ab1FSNbu (ORCPT ); Sun, 19 Jun 2011 09:31:50 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:55555 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753727Ab1FSNbt (ORCPT ); Sun, 19 Jun 2011 09:31:49 -0400 Received: by mail-fx0-f46.google.com with SMTP id 17so477619fxm.19 for ; Sun, 19 Jun 2011 06:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references; bh=HpoJhpvscBi5T70IVAMMNWfq69Tbfgl+y9fece4Y3VY=; b=tggVlJv1jHMXNgGfew4//HDG+v1ErhIe5U7I7p+CpRhsoRWcIZuLcndxdLOAU/5req AmNfZprXiRu1N27Zsz/Iuzj/+idxJ2LNYDhxmsiSKYLMM7rW1gFh6H2L8A6uw9ik2idV 0oVGL/SiPKd4OzzhamMTtKRDJPPBbdezzddcA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=nPQs3TOSVmwgMi+AOFhh4tg8QyUsQ+m6F2M1huGkR3xZG+5/5YzLceL/FhZiYG4LXy fmFv7iW9IWNoW/5Dykc5tKC6f4ue4A+8+XjrdKKvkscWBZEkILVxGI/NygbB4l+roU4N +QtkX8U8vsCjmDmWalwJvIV40UPoX+S8DUFmo= Received: by 10.223.143.6 with SMTP id s6mr2060885fau.74.1308490309087; Sun, 19 Jun 2011 06:31:49 -0700 (PDT) Received: from localhost.localdomain (vs162244.vserver.de [62.75.162.244]) by mx.google.com with ESMTPS id m5sm1671014fai.1.2011.06.19.06.31.42 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Jun 2011 06:31:48 -0700 (PDT) From: Richard Cochran To: Cc: David Miller , Eric Dumazet Subject: [PATCH 1/7] net: correct comment on where to place transmit time stamp hook. Date: Sun, 19 Jun 2011 15:31:39 +0200 Message-Id: X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The comment for the skb_tx_timestamp() function suggests calling it just after a buffer is released to the hardware for transmission. However, for drivers that free the buffer in an ISR, this produces a race between the time stamp code and the ISR. This commit changes the comment to advise placing the call just before handing the buffer over to the hardware. Signed-off-by: Richard Cochran --- include/linux/skbuff.h | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c0a4f3a..3e54337 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2028,8 +2028,7 @@ static inline void sw_tx_timestamp(struct sk_buff *skb) * skb_tx_timestamp() - Driver hook for transmit timestamping * * Ethernet MAC Drivers should call this function in their hard_xmit() - * function as soon as possible after giving the sk_buff to the MAC - * hardware, but before freeing the sk_buff. + * function immediately before giving the sk_buff to the MAC hardware. * * @skb: A socket buffer. */