diff options
author | David S. Miller <davem@davemloft.net> | 2013-11-04 13:48:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-04 13:48:30 -0500 |
commit | 394efd19d5fcae936261bd48e5b33b21897aacf8 (patch) | |
tree | c48cf3ddbb07fd87309f1abdf31a27c71330e587 /drivers/net/xen-netback | |
parent | f421436a591d34fa5279b54a96ac07d70250cc8d (diff) | |
parent | be408cd3e1fef73e9408b196a79b9934697fe3b1 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/emulex/benet/be.h
drivers/net/netconsole.c
net/bridge/br_private.h
Three mostly trivial conflicts.
The net/bridge/br_private.h conflict was a function signature (argument
addition) change overlapping with the extern removals from Joe Perches.
In drivers/net/netconsole.c we had one change adjusting a printk message
whilst another changed "printk(KERN_INFO" into "pr_info(".
Lastly, the emulex change was a new inline function addition overlapping
with Joe Perches's extern removals.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback')
-rw-r--r-- | drivers/net/xen-netback/common.h | 1 | ||||
-rw-r--r-- | drivers/net/xen-netback/interface.c | 3 | ||||
-rw-r--r-- | drivers/net/xen-netback/netback.c | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index 55b8dec86233..08ae01b41c83 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h | |||
@@ -169,6 +169,7 @@ struct xenvif { | |||
169 | unsigned long credit_usec; | 169 | unsigned long credit_usec; |
170 | unsigned long remaining_credit; | 170 | unsigned long remaining_credit; |
171 | struct timer_list credit_timeout; | 171 | struct timer_list credit_timeout; |
172 | u64 credit_window_start; | ||
172 | 173 | ||
173 | /* Statistics */ | 174 | /* Statistics */ |
174 | unsigned long rx_gso_checksum_fixup; | 175 | unsigned long rx_gso_checksum_fixup; |
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index e4aa26748f80..b78ee10a956a 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c | |||
@@ -316,8 +316,7 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid, | |||
316 | vif->credit_bytes = vif->remaining_credit = ~0UL; | 316 | vif->credit_bytes = vif->remaining_credit = ~0UL; |
317 | vif->credit_usec = 0UL; | 317 | vif->credit_usec = 0UL; |
318 | init_timer(&vif->credit_timeout); | 318 | init_timer(&vif->credit_timeout); |
319 | /* Initialize 'expires' now: it's used to track the credit window. */ | 319 | vif->credit_window_start = get_jiffies_64(); |
320 | vif->credit_timeout.expires = jiffies; | ||
321 | 320 | ||
322 | dev->netdev_ops = &xenvif_netdev_ops; | 321 | dev->netdev_ops = &xenvif_netdev_ops; |
323 | dev->hw_features = NETIF_F_SG | | 322 | dev->hw_features = NETIF_F_SG | |
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 828fdab4f1a4..919b6509455c 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c | |||
@@ -1380,9 +1380,8 @@ static int checksum_setup(struct xenvif *vif, struct sk_buff *skb) | |||
1380 | 1380 | ||
1381 | static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) | 1381 | static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) |
1382 | { | 1382 | { |
1383 | unsigned long now = jiffies; | 1383 | u64 now = get_jiffies_64(); |
1384 | unsigned long next_credit = | 1384 | u64 next_credit = vif->credit_window_start + |
1385 | vif->credit_timeout.expires + | ||
1386 | msecs_to_jiffies(vif->credit_usec / 1000); | 1385 | msecs_to_jiffies(vif->credit_usec / 1000); |
1387 | 1386 | ||
1388 | /* Timer could already be pending in rare cases. */ | 1387 | /* Timer could already be pending in rare cases. */ |
@@ -1390,8 +1389,8 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) | |||
1390 | return true; | 1389 | return true; |
1391 | 1390 | ||
1392 | /* Passed the point where we can replenish credit? */ | 1391 | /* Passed the point where we can replenish credit? */ |
1393 | if (time_after_eq(now, next_credit)) { | 1392 | if (time_after_eq64(now, next_credit)) { |
1394 | vif->credit_timeout.expires = now; | 1393 | vif->credit_window_start = now; |
1395 | tx_add_credit(vif); | 1394 | tx_add_credit(vif); |
1396 | } | 1395 | } |
1397 | 1396 | ||
@@ -1403,6 +1402,7 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) | |||
1403 | tx_credit_callback; | 1402 | tx_credit_callback; |
1404 | mod_timer(&vif->credit_timeout, | 1403 | mod_timer(&vif->credit_timeout, |
1405 | next_credit); | 1404 | next_credit); |
1405 | vif->credit_window_start = next_credit; | ||
1406 | 1406 | ||
1407 | return true; | 1407 | return true; |
1408 | } | 1408 | } |