On Mon, 24 Jan 2011, Grzegorz Rybicki wrote:

> xennet_get_responses: too many frags 11 > max 5

The following in sys/dev/xen/netfront/netfront.c xennet_get_responses()
looks a little bit suspicious:

>       int max = 5 /* MAX_TX_REQ_FRAGS + (rx->status <= RX_COPY_THRESHOLD) */;

...together with the check at the end of the function (the only place
where "max" is used) which produces the error message you see:

>       if (unlikely(frags > max)) {
>               if (net_ratelimit())
>                       WPRINTK("Too many frags\n");
>               printf("%s: too many frags %d > max %d\n", __func__, frags,
>                       max);
>               err = E2BIG;
>       }

MAX_TX_REQ_FRAGS is defined as follows in the same file:

> #define MAX_TX_REQ_FRAGS (65536 / PAGE_SIZE + 2)

...which produces already 18. Where does this "max = 5" come from?
Either "max" is wrong or I do not understand the comment on the
line where it is defined.

There are some interesting and probably related comments in the
same file about the Linux netback driver's lacking capabilities of
handling many fragments. But why do we care about that when receiving?

I would guestimate that either "max" should be higher than what it
currently is (5) or the check which produces the error might be

Janne Snabb / EPIPE Communications
sn...@epipe.com - http://epipe.com/
freebsd-xen@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"

Reply via email to