Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368655
b: refs/heads/master
c: 7158ff6
h: refs/heads/master
i:
  368653: a317606
  368651: 540f4b3
  368647: 278d190
  368639: ff4a465
v: v3
  • Loading branch information
Wei Liu authored and David S. Miller committed Mar 25, 2013
1 parent d14b049 commit b3f968c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2d617c0ccf658a55552955f07018ecfa0135210
refs/heads/master: 7158ff6d0c6aa3724fb51c6c11143d31e166eb1f
18 changes: 9 additions & 9 deletions trunk/drivers/net/xen-netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ static int xennet_get_responses(struct netfront_info *np,
struct sk_buff *skb = xennet_get_rx_skb(np, cons);
grant_ref_t ref = xennet_get_rx_ref(np, cons);
int max = MAX_SKB_FRAGS + (rx->status <= RX_COPY_THRESHOLD);
int frags = 1;
int slots = 1;
int err = 0;
unsigned long ret;

Expand Down Expand Up @@ -756,27 +756,27 @@ static int xennet_get_responses(struct netfront_info *np,
if (!(rx->flags & XEN_NETRXF_more_data))
break;

if (cons + frags == rp) {
if (cons + slots == rp) {
if (net_ratelimit())
dev_warn(dev, "Need more frags\n");
dev_warn(dev, "Need more slots\n");
err = -ENOENT;
break;
}

rx = RING_GET_RESPONSE(&np->rx, cons + frags);
skb = xennet_get_rx_skb(np, cons + frags);
ref = xennet_get_rx_ref(np, cons + frags);
frags++;
rx = RING_GET_RESPONSE(&np->rx, cons + slots);
skb = xennet_get_rx_skb(np, cons + slots);
ref = xennet_get_rx_ref(np, cons + slots);
slots++;
}

if (unlikely(frags > max)) {
if (unlikely(slots > max)) {
if (net_ratelimit())
dev_warn(dev, "Too many frags\n");
err = -E2BIG;
}

if (unlikely(err))
np->rx.rsp_cons = cons + frags;
np->rx.rsp_cons = cons + slots;

return err;
}
Expand Down

0 comments on commit b3f968c

Please sign in to comment.