search for: next_credit

Displaying 3 results from an estimated 3 matches for "next_credit".

2013 Oct 28
3
[PATCH net V2] xen-netback: use jiffies_64 value to calculate credit timeout
...ack.c b/drivers/net/xen-netback/netback.c index f3e591c..8644aca 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -1185,18 +1185,17 @@ out: static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) { - unsigned long now = jiffies; - unsigned long next_credit = - vif->credit_timeout.expires + - msecs_to_jiffies(vif->credit_usec / 1000); + u64 now = get_jiffies_64(); + u64 next_credit = vif->credit_window_start + + (u64)msecs_to_jiffies(vif->credit_usec / 1000); /* Timer could already be pending in rare cases. */ if (timer_pending(&a...
2013 Oct 16
0
答复: Re: DomU's network interface will hung when Dom0 running 32bit
...ffff at 32-bit > >> machine. > >> If DomU''s network interface send lesser package (<0.5k/s if > >> jiffies=250 and credit_bytes=ULONG_MAX), jiffies will beyond out > >> (credit_timeout.expires + MAX_SIGNAL_LONG) and time_after_eq(now, > >> next_credit) will failure (should be true). So one timer which will > >> not be trigger in short time, and later process will be aborted when > >> timer_pending(&vif->credit_timeout) is true. The result will be > >> DomU''s network interface will be hung in long time (...
2013 Jun 24
3
[PATCH v2] xen-netback: add a pseudo pps rate limit
...a; tx_add_credit(vif); + tx_add_packets(vif); xen_netbk_check_rx_xenvif(vif); } @@ -1419,6 +1425,38 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) return false; } +static bool tx_packets_exceeded(struct xenvif *vif) +{ + unsigned long now = jiffies; + unsigned long next_credit = + vif->credit_timeout.expires + + msecs_to_jiffies(vif->credit_usec / 1000); + + /* Timer could already be pending in rare cases. */ + if (timer_pending(&vif->credit_timeout)) + return true; + + /* Passed the point where we can replenish credit? */ + if (time_after_eq(now, next_cr...