diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2014-09-04 13:31:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-05 20:43:45 -0400 |
commit | 62bccb8cdb69051b95a55ab0c489e3cab261c8ef (patch) | |
tree | f1a545f5635070e5022e2bc0ab7b1260644c8588 /drivers/net | |
parent | 37846ef0188335e49f2491a5bbf4e0dc7d407ea0 (diff) |
net-timestamp: Make the clone operation stand-alone from phy timestamping
The phy timestamping takes a different path than the regular timestamping
does in that it will create a clone first so that the packets needing to be
timestamped can be placed in a queue, or the context block could be used.
In order to support these use cases I am pulling the core of the code out
so it can be used in other drivers beyond just phy devices.
In addition I have added a destructor named sock_efree which is meant to
provide a simple way for dropping the reference to skb exceptions that
aren't part of either the receive or send windows for the socket, and I
have removed some duplication in spots where this destructor could be used
in place of sock_edemux.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/dp83640.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index d5991ac46ab0..87648b306551 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c | |||
@@ -1148,7 +1148,7 @@ static void dp83640_remove(struct phy_device *phydev) | |||
1148 | kfree_skb(skb); | 1148 | kfree_skb(skb); |
1149 | 1149 | ||
1150 | while ((skb = skb_dequeue(&dp83640->tx_queue)) != NULL) | 1150 | while ((skb = skb_dequeue(&dp83640->tx_queue)) != NULL) |
1151 | skb_complete_tx_timestamp(skb, NULL); | 1151 | kfree_skb(skb); |
1152 | 1152 | ||
1153 | clock = dp83640_clock_get(dp83640->clock); | 1153 | clock = dp83640_clock_get(dp83640->clock); |
1154 | 1154 | ||
@@ -1405,7 +1405,7 @@ static void dp83640_txtstamp(struct phy_device *phydev, | |||
1405 | 1405 | ||
1406 | case HWTSTAMP_TX_ONESTEP_SYNC: | 1406 | case HWTSTAMP_TX_ONESTEP_SYNC: |
1407 | if (is_sync(skb, type)) { | 1407 | if (is_sync(skb, type)) { |
1408 | skb_complete_tx_timestamp(skb, NULL); | 1408 | kfree_skb(skb); |
1409 | return; | 1409 | return; |
1410 | } | 1410 | } |
1411 | /* fall through */ | 1411 | /* fall through */ |
@@ -1416,7 +1416,7 @@ static void dp83640_txtstamp(struct phy_device *phydev, | |||
1416 | 1416 | ||
1417 | case HWTSTAMP_TX_OFF: | 1417 | case HWTSTAMP_TX_OFF: |
1418 | default: | 1418 | default: |
1419 | skb_complete_tx_timestamp(skb, NULL); | 1419 | kfree_skb(skb); |
1420 | break; | 1420 | break; |
1421 | } | 1421 | } |
1422 | } | 1422 | } |