* [GIT PULL]: Netback fixes
@ 2011-01-05 12:53 Ian Campbell
2011-01-05 12:54 ` [PATCH] xen: netback: Drop GSO SKBs which do not have csum_blank Ian Campbell
2011-01-19 12:50 ` [GIT PULL]: Netback fixes Ian Campbell
0 siblings, 2 replies; 3+ messages in thread
From: Ian Campbell @ 2011-01-05 12:53 UTC (permalink / raw)
To: xen-devel, Jeremy Fitzhardinge; +Cc: Paul Durrant
The following git pull request consists of Paul Durrant's 5 patches from
before Xmas plus a new patch of my own (actually an old long forgotten
patch) which I will post as a reply. (There is also an equivalent
netfront fix which I will send to netdev for upstream separately).
These patches are for the xen/next/2.6.32 branch. Although the
preparations for upstreaming netback are progressing well I don't think
it is a suitable base for further development yet and these fixes are
useful in their own right (I have also included them in my upstream
branch).
Ian.
The following changes since commit 3af2f5d05b1236d11e952152ac1f505e6b0e8935:
Ian Campbell (1):
xen: netback: take net_schedule_list_lock when removing entry from net_schedule_list
are available in the git repository at:
git://xenbits.xen.org/people/ianc/linux-2.6.git for-jeremy/netback
Ian Campbell (1):
xen: netback: Drop GSO SKBs which do not have csum_blank.
Paul Durrant (5):
xen: netback: Re-define PKT_PROT_LEN to be bigger.
xen: netback: Don't count packets we don't actually receive.
xen: netback: Remove the 500ms timeout to restart the netif queue.
xen: netback: Add a missing test to tx_work_todo.
xen: netback: Re-factor net_tx_action_dealloc() slightly.
drivers/xen/netback/netback.c | 74 +++++++++++++++++++---------------------
1 files changed, 35 insertions(+), 39 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] xen: netback: Drop GSO SKBs which do not have csum_blank.
2011-01-05 12:53 [GIT PULL]: Netback fixes Ian Campbell
@ 2011-01-05 12:54 ` Ian Campbell
2011-01-19 12:50 ` [GIT PULL]: Netback fixes Ian Campbell
1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2011-01-05 12:54 UTC (permalink / raw)
To: xen-devel; +Cc: Jeremy Fitzhardinge, Ian Campbell
The Linux network stack expects all GSO SKBs to have ip_summed ==
CHECKSUM_PARTIAL (which implies that the frame contains a partial
checksum) and the Xen network ring protocol similarly expects an SKB
which has GSO set to also have NETRX_csum_blank (which also implies a
partial checksum). Therefore drop such frames on receive otherwise
they will trigger the warning in skb_gso_segment.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com
---
drivers/xen/netback/netback.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c
index 1e362f7..851721a 100644
--- a/drivers/xen/netback/netback.c
+++ b/drivers/xen/netback/netback.c
@@ -1513,6 +1513,10 @@ static void net_tx_submit(struct xen_netbk *netbk)
kfree_skb(skb);
continue;
}
+ } else if (skb_is_gso(skb)) {
+ DPRINTK("Dropping GSO but not CHECKSUM_PARTIAL skb\n");
+ kfree_skb(skb);
+ continue;
}
if (unlikely(netbk_copy_skb_mode == NETBK_ALWAYS_COPY_SKB) &&
--
1.5.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [GIT PULL]: Netback fixes
2011-01-05 12:53 [GIT PULL]: Netback fixes Ian Campbell
2011-01-05 12:54 ` [PATCH] xen: netback: Drop GSO SKBs which do not have csum_blank Ian Campbell
@ 2011-01-19 12:50 ` Ian Campbell
1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2011-01-19 12:50 UTC (permalink / raw)
To: xen-devel; +Cc: Jeremy Fitzhardinge, Paul Durrant
On Wed, 2011-01-05 at 12:53 +0000, Ian Campbell wrote:
> The following git pull request consists of Paul Durrant's 5 patches from
> before Xmas plus a new patch of my own (actually an old long forgotten
> patch) which I will post as a reply. (There is also an equivalent
> netfront fix which I will send to netdev for upstream separately).
>
> These patches are for the xen/next/2.6.32 branch. Although the
> preparations for upstreaming netback are progressing well I don't think
> it is a suitable base for further development yet and these fixes are
> useful in their own right (I have also included them in my upstream
> branch).
I have updated the branch with one additional patch which augments
Paul's "Remove the 500ms timeout to restart the netif queue." patch to
remove the final vestiges of the timer. The patch follows the updated
pull request below.
The following changes since commit 3af2f5d05b1236d11e952152ac1f505e6b0e8935:
Ian Campbell (1):
xen: netback: take net_schedule_list_lock when removing entry from net_schedule_list
are available in the git repository at:
git://xenbits.xen.org/people/ianc/linux-2.6.git for-jeremy/netback
Ian Campbell (2):
xen: netback: Drop GSO SKBs which do not have csum_blank.
xen: netback: completely remove tx_queue_timer
Paul Durrant (5):
xen: netback: Re-define PKT_PROT_LEN to be bigger.
xen: netback: Don't count packets we don't actually receive.
xen: netback: Remove the 500ms timeout to restart the netif queue.
xen: netback: Add a missing test to tx_work_todo.
xen: netback: Re-factor net_tx_action_dealloc() slightly.
drivers/xen/netback/common.h | 3 --
drivers/xen/netback/interface.c | 13 +------
drivers/xen/netback/netback.c | 74 ++++++++++++++++++--------------------
3 files changed, 36 insertions(+), 54 deletions(-)
Ian.
>From c9c31adc46fbdba37801e97ae39b084eab306508 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Wed, 19 Jan 2011 12:43:38 +0000
Subject: [PATCH] xen: netback: completely remove tx_queue_timer
"xen: netback: Remove the 500ms timeout to restart the netif queue." missed
removing the timer initialisation.
Also remove the related comment which has been obsolete since the default for
MODPARM_copy_skb was switched to true some time ago.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Paul Durrant <Paul.Durrant@citrix.com>
---
drivers/xen/netback/common.h | 3 ---
drivers/xen/netback/interface.c | 13 +------------
2 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/drivers/xen/netback/common.h b/drivers/xen/netback/common.h
index feacf5f..3240cdf 100644
--- a/drivers/xen/netback/common.h
+++ b/drivers/xen/netback/common.h
@@ -100,9 +100,6 @@ struct xen_netif {
unsigned long remaining_credit;
struct timer_list credit_timeout;
- /* Enforce draining of the transmit queue. */
- struct timer_list tx_queue_timeout;
-
/* Statistics */
int nr_copied_skbs;
diff --git a/drivers/xen/netback/interface.c b/drivers/xen/netback/interface.c
index 2e8508a..efdc21c 100644
--- a/drivers/xen/netback/interface.c
+++ b/drivers/xen/netback/interface.c
@@ -41,15 +41,7 @@
* Module parameter 'queue_length':
*
* Enables queuing in the network stack when a client has run out of receive
- * descriptors. Although this feature can improve receive bandwidth by avoiding
- * packet loss, it can also result in packets sitting in the 'tx_queue' for
- * unbounded time. This is bad if those packets hold onto foreign resources.
- * For example, consider a packet that holds onto resources belonging to the
- * guest for which it is queued (e.g., packet received on vif1.0, destined for
- * vif1.1 which is not activated in the guest): in this situation the guest
- * will never be destroyed, unless vif1.1 is taken down. To avoid this, we
- * run a timer (tx_queue_timeout) to drain the queue when the interface is
- * blocked.
+ * descriptors.
*/
static unsigned long netbk_queue_length = 32;
module_param_named(queue_length, netbk_queue_length, ulong, 0644);
@@ -295,8 +287,6 @@ struct xen_netif *netif_alloc(struct device *parent, domid_t domid, unsigned int
/* Initialize 'expires' now: it's used to track the credit window. */
netif->credit_timeout.expires = jiffies;
- init_timer(&netif->tx_queue_timeout);
-
dev->netdev_ops = &netback_ops;
netif_set_features(netif);
SET_ETHTOOL_OPS(dev, &network_ethtool_ops);
@@ -458,7 +448,6 @@ void netif_disconnect(struct xen_netif *netif)
wait_event(netif->waiting_to_free, atomic_read(&netif->refcnt) == 0);
del_timer_sync(&netif->credit_timeout);
- del_timer_sync(&netif->tx_queue_timeout);
if (netif->irq)
unbind_from_irqhandler(netif->irq, netif);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-19 12:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05 12:53 [GIT PULL]: Netback fixes Ian Campbell
2011-01-05 12:54 ` [PATCH] xen: netback: Drop GSO SKBs which do not have csum_blank Ian Campbell
2011-01-19 12:50 ` [GIT PULL]: Netback fixes Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).