From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Matthew Vick <matthew.vick@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Richard Cochran <richardcochran@gmail.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 10/14] igb: Add support for SW timestamping
Date: Thu, 17 Jan 2013 03:35:15 -0800 [thread overview]
Message-ID: <1358422519-20981-11-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1358422519-20981-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Matthew Vick <matthew.vick@intel.com>
Enable SW timestamping for situations where the user may prefer it over HW
timestamping or there may not be HW timestamping.
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Acked-by: Jacob Keller <Jacob.e.keller@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 9 +++++++++
drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
2 files changed, 11 insertions(+)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index bfe9208..6180303 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2272,12 +2272,21 @@ static int igb_get_ts_info(struct net_device *dev,
struct igb_adapter *adapter = netdev_priv(dev);
switch (adapter->hw.mac.type) {
+ case e1000_82575:
+ info->so_timestamping =
+ SOF_TIMESTAMPING_TX_SOFTWARE |
+ SOF_TIMESTAMPING_RX_SOFTWARE |
+ SOF_TIMESTAMPING_SOFTWARE;
+ return 0;
case e1000_82576:
case e1000_82580:
case e1000_i350:
case e1000_i210:
case e1000_i211:
info->so_timestamping =
+ SOF_TIMESTAMPING_TX_SOFTWARE |
+ SOF_TIMESTAMPING_RX_SOFTWARE |
+ SOF_TIMESTAMPING_SOFTWARE |
SOF_TIMESTAMPING_TX_HARDWARE |
SOF_TIMESTAMPING_RX_HARDWARE |
SOF_TIMESTAMPING_RAW_HARDWARE;
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 2c66ec8..1b5e9a5 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4610,6 +4610,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
first->bytecount = skb->len;
first->gso_segs = 1;
+ skb_tx_timestamp(skb);
+
if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
!(adapter->ptp_tx_skb))) {
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
--
1.7.11.7
next prev parent reply other threads:[~2013-01-17 11:35 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 11:35 [net-next 00/14][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-01-17 11:35 ` [net-next 01/14] e1000e: add ethtool .get_eee/.set_eee Jeff Kirsher
2013-01-17 11:35 ` [net-next 02/14] e1000e: Use standard #defines for PCIe Capability ASPM fields Jeff Kirsher
2013-01-17 11:35 ` [net-next 03/14] e1000e: add support for hardware timestamping on some devices Jeff Kirsher
2013-01-17 11:35 ` [net-next 04/14] e1000e: add support for IEEE-1588 PTP Jeff Kirsher
2013-01-17 15:35 ` Richard Cochran
2013-01-18 1:13 ` Allan, Bruce W
2013-01-17 15:56 ` Stephen Hemminger
2013-01-18 1:13 ` Allan, Bruce W
2013-01-18 6:27 ` Jeff Kirsher
2013-01-17 11:35 ` [net-next 05/14] igb: Enable SR-IOV configuration via PCI sysfs interface Jeff Kirsher
2013-01-17 11:35 ` [net-next 06/14] igb: Add i2c interface to igb Jeff Kirsher
2013-01-17 11:35 ` [net-next 07/14] igb: Add support functions to access thermal data Jeff Kirsher
2013-01-17 11:35 ` [net-next 08/14] igb: Enable hwmon data output for thermal sensors via I2C Jeff Kirsher
2013-01-17 11:35 ` [net-next 09/14] igb: Report L4 Rx hash via skb->l4_rxhash Jeff Kirsher
2013-01-17 14:19 ` Eric Dumazet
2013-01-17 17:07 ` Alexander Duyck
2013-01-17 17:14 ` Eric Dumazet
2013-01-17 17:23 ` Alexander Duyck
2013-01-17 18:46 ` Jesse Gross
2013-01-17 11:35 ` Jeff Kirsher [this message]
2013-01-17 11:35 ` [net-next 11/14] igb: Add timeout for PTP Tx work item Jeff Kirsher
2013-01-17 11:35 ` [net-next 12/14] igb: Add mechanism for detecting latched hardware Rx timestamp Jeff Kirsher
2013-01-17 15:38 ` Richard Cochran
2013-01-17 16:51 ` Vick, Matthew
2013-01-17 11:35 ` [net-next 13/14] igb: Use in-kernel PTP_EV_PORT #define Jeff Kirsher
2013-01-17 11:35 ` [net-next 14/14] igb: Free any held skb that should have been timestamped on remove Jeff Kirsher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358422519-20981-11-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=matthew.vick@intel.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).