From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Paul Durrant <paul.durrant@citrix.com>,
xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [GIT] netback: drop some more flipping mode stuff
Date: Wed, 30 Jun 2010 12:14:01 +0200 [thread overview]
Message-ID: <4C2B18E9.50801@goop.org> (raw)
In-Reply-To: <1277890375.11869.6.camel@zakaz.uk.xensource.com>
On 06/30/2010 11:32 AM, Ian Campbell wrote:
> The following changes since commit 2e8dc6f4bd9a4ee84ce1e09670d1c1240517113f:
> Ian Campbell (1):
> xen: netback: drop more relics of flipping mode
>
> are available in the git repository at:
>
> git://xenbits.xensource.com/people/ianc/linux-2.6.git for-jeremy/netback
>
Thanks. I un-pushed the must-copy from netback, since I never intended
to merge it into netback itself, so you may need to resync your branch
accordingly.
J
> Ian.
>
> Subject: [PATCH] xen: netback: drop more relics of flipping mode
>
> The mmu_update and gnttab_transfer arrays were only used by flipping
> mode. With those gone the multicall now consists of a single call to
> GNTTABOP_copy so drop the multicall as well and just make the one
> hypercall.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> Cc: Paul Durrant <paul.durrant@citrix.com>
> ---
> drivers/xen/netback/common.h | 3 --
> drivers/xen/netback/netback.c | 55 +++--------------------------------------
> 2 files changed, 4 insertions(+), 54 deletions(-)
>
> diff --git a/drivers/xen/netback/common.h b/drivers/xen/netback/common.h
> index 0dc1959..857778c 100644
> --- a/drivers/xen/netback/common.h
> +++ b/drivers/xen/netback/common.h
> @@ -306,9 +306,6 @@ struct xen_netbk {
> u16 pending_ring[MAX_PENDING_REQS];
> u16 dealloc_ring[MAX_PENDING_REQS];
>
> - struct multicall_entry rx_mcl[NET_RX_RING_SIZE+3];
> - struct mmu_update rx_mmu[NET_RX_RING_SIZE];
> - struct gnttab_transfer grant_trans_op[NET_RX_RING_SIZE];
> /*
> * Each head or fragment can be up to 4096 bytes. Given
> * MAX_BUFFER_OFFSET of 4096 the worst case is that each
> diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c
> index 9a7ada2..aacb286 100644
> --- a/drivers/xen/netback/netback.c
> +++ b/drivers/xen/netback/netback.c
> @@ -368,15 +368,9 @@ int netif_be_start_xmit(struct sk_buff *skb, struct net_device *dev)
> }
>
> struct netrx_pending_operations {
> - unsigned trans_prod, trans_cons;
> - unsigned mmu_prod, mmu_mcl;
> - unsigned mcl_prod, mcl_cons;
> unsigned copy_prod, copy_cons;
> unsigned meta_prod, meta_cons;
> - struct mmu_update *mmu;
> - struct gnttab_transfer *trans;
> struct gnttab_copy *copy;
> - struct multicall_entry *mcl;
> struct netbk_rx_meta *meta;
> int copy_off;
> grant_ref_t copy_gref;
> @@ -577,7 +571,6 @@ static void net_rx_action(unsigned long data)
> s8 status;
> u16 irq, flags;
> struct xen_netif_rx_response *resp;
> - struct multicall_entry *mcl;
> struct sk_buff_head rxq;
> struct sk_buff *skb;
> int notify_nr = 0;
> @@ -588,10 +581,7 @@ static void net_rx_action(unsigned long data)
> struct skb_cb_overlay *sco;
>
> struct netrx_pending_operations npo = {
> - .mmu = netbk->rx_mmu,
> - .trans = netbk->grant_trans_op,
> .copy = netbk->grant_copy_op,
> - .mcl = netbk->rx_mcl,
> .meta = netbk->meta,
> };
>
> @@ -617,50 +607,13 @@ static void net_rx_action(unsigned long data)
>
> BUG_ON(npo.meta_prod > ARRAY_SIZE(netbk->meta));
>
> - npo.mmu_mcl = npo.mcl_prod;
> - if (npo.mcl_prod) {
> - BUG_ON(xen_feature(XENFEAT_auto_translated_physmap));
> - BUG_ON(npo.mmu_prod > ARRAY_SIZE(netbk->rx_mmu));
> - mcl = npo.mcl + npo.mcl_prod++;
> -
> - BUG_ON(mcl[-1].op != __HYPERVISOR_update_va_mapping);
> - mcl[-1].args[MULTI_UVMFLAGS_INDEX] = UVMF_TLB_FLUSH|UVMF_ALL;
> -
> - mcl->op = __HYPERVISOR_mmu_update;
> - mcl->args[0] = (unsigned long)netbk->rx_mmu;
> - mcl->args[1] = npo.mmu_prod;
> - mcl->args[2] = 0;
> - mcl->args[3] = DOMID_SELF;
> - }
> -
> - if (npo.trans_prod) {
> - BUG_ON(npo.trans_prod > ARRAY_SIZE(netbk->grant_trans_op));
> - mcl = npo.mcl + npo.mcl_prod++;
> - mcl->op = __HYPERVISOR_grant_table_op;
> - mcl->args[0] = GNTTABOP_transfer;
> - mcl->args[1] = (unsigned long)netbk->grant_trans_op;
> - mcl->args[2] = npo.trans_prod;
> - }
> -
> - if (npo.copy_prod) {
> - BUG_ON(npo.copy_prod > ARRAY_SIZE(netbk->grant_copy_op));
> - mcl = npo.mcl + npo.mcl_prod++;
> - mcl->op = __HYPERVISOR_grant_table_op;
> - mcl->args[0] = GNTTABOP_copy;
> - mcl->args[1] = (unsigned long)netbk->grant_copy_op;
> - mcl->args[2] = npo.copy_prod;
> - }
> -
> - /* Nothing to do? */
> - if (!npo.mcl_prod)
> + if (!npo.copy_prod)
> return;
>
> - BUG_ON(npo.mcl_prod > ARRAY_SIZE(netbk->rx_mcl));
> -
> - ret = HYPERVISOR_multicall(npo.mcl, npo.mcl_prod);
> + BUG_ON(npo.copy_prod > ARRAY_SIZE(netbk->grant_copy_op));
> + ret = HYPERVISOR_grant_table_op(GNTTABOP_copy, &netbk->grant_copy_op,
> + npo.copy_prod);
> BUG_ON(ret != 0);
> - /* The mmu_machphys_update() must not fail. */
> - BUG_ON(npo.mmu_mcl && npo.mcl[npo.mmu_mcl].result != 0);
>
> while ((skb = __skb_dequeue(&rxq)) != NULL) {
> sco = (struct skb_cb_overlay *)skb->cb;
>
prev parent reply other threads:[~2010-06-30 10:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 9:32 [GIT] netback: drop some more flipping mode stuff Ian Campbell
2010-06-30 10:14 ` Jeremy Fitzhardinge [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C2B18E9.50801@goop.org \
--to=jeremy@goop.org \
--cc=Ian.Campbell@citrix.com \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.