Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jan 2011 14:35:54 +0000 (UTC)
From:      Janne Snabb <snabb@epipe.com>
To:        Grzegorz Rybicki <c2n.rybicki@gmail.com>
Cc:        freebsd-xen@freebsd.org
Subject:   Re: I have a problem with iSCSI on AMD64 Xen HVM
Message-ID:  <alpine.BSF.2.00.1101251425320.20212@tiktik.epipe.com>
In-Reply-To: <AANLkTink=S9WxJCVT%2BAOaMjiLPLg9gtSwF1VwdzexFG%2B@mail.gmail.com>
References:  <AANLkTink37iAtMeNZ5NEhgKwPFOgXOVr4epSFxp=7Kmr@mail.gmail.com> <AANLkTink=S9WxJCVT%2BAOaMjiLPLg9gtSwF1VwdzexFG%2B@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
unneeded.

--
Janne Snabb / EPIPE Communications
snabb@epipe.com - http://epipe.com/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1101251425320.20212>