I have rebased the current xen/next-2.6.32 netback stuff onto 2.6.37-rc5 in a new branch at: git://xenbits.xen.org/people/ianc/linux-2.6.git upstream/dom0/backend/netback This builds on my upstream/dom0/backend/core branch. (full pull request style details are at the end) I''ve added some proper commit messages to the early commits which were previously lacking them. In particular 8495d90cf5c3..5f7b85f2899e seem to have been Authored by Jeremy (according to the git metadata) but were not signed-off. Jeremy is it OK to add your sign-off to those three? Until those early commit messages are done the branch will be subject to rebasing. As it stands the branch won''t work because it still needs PageForeign. My intention is to replace this dependency with the new m2p overlay grant table map stuff added for gntdev. In the meantime if you need something right now I do have a working (if somewhat over-engineered) version which removed the dependency of PageForeign by always copying. This is in the upstream/dom0/backend/netback-copying branch in the same repository. I intend to throw this away when I''ve got the new m2p overlay stuff ready. If you wanted the old PageForeign style thing you could look in notupstream/foreign-memory while flagellating yourself. So my plan going forward is to: * switch to gnttab_{map,unmap}_refs + m2p overlay stuff. * do a checkpatch.pl sweep over the complete files. * do a "git mv" (or perhaps a suitable "git filter-branch") to move from drivers/xen/netback to drivers/net/xen-netback. * ensure netif.h has a reasonably current description of the ring protocol, I suspect it is missing stuff like the GSO prefix support. After that I intend to submit to linux-netdev as a single large patch for review. When it comes time to merge I''ll ask if they are willing to take the branch with history. Ian. The following changes since commit a8d67d067346b924e4d12d585257e2c33251ea04: Ian Campbell (1): xen/xenbus: fixup checkpatch issues in xenbus_probe* are available in the git repository at: git://xenbits.xen.org/people/ianc/linux-2.6.git upstream/dom0/backend/netback Bastian Blank (1): xen/netback: Fix null-pointer access in netback_uevent Christophe Saout (1): xen/netback: use dev_name() instead of removed ->bus_id. Dongxiao Xu (6): xen/netback: use smart polling instead of event notification xen/netback: Move global/static variables into struct xen_netbk. xen/netback: Introduce a new struct type page_ext. xen/netback: Multiple tasklets support. xen/netback: Use Kernel thread to replace the tasklet. Netback: Set allocated memory to zero from vmalloc. Ian Campbell (21): netback: add ethtool stat to track copied skbs. netback: make queue length parameter writeable in sysfs netback: parent sysfs device should be set before registering. xen: rename netbk module xen-netback. xen: netback: remove unused xen_network_done code xen: netback: factor disconnect from backend into new function. xen: netback: wait for hotplug scripts to complete before signalling connected to frontend xen/netback: Always pull through PKT_PROT_LEN bytes into the linear part of an skb. xen/netback: Allow setting of large MTU before rings have connected. xen/netback: correctly setup skb->ip_summed on receive xen: netback: handle NET_SKBUFF_DATA_USES_OFFSET correctly xen: netback: drop frag member from struct netbk_rx_meta xen/netback: linearise SKBs as we copy them into guest memory on guest-RX. xen: netback: drop more relics of flipping mode xen/rings: make protocol specific usage of shared sring explicit xen/netback: make protocol specific usage of shared sring explicit xen: netback: check if foreign pages are actually netback-created foreign pages. xen: netback: do not unleash netback threads until initialisation is complete xen: netback: save interrupt state in add_to_net_schedule_list_tail xen: netback: increase size of rx_meta array. xen: netback: take net_schedule_list_lock when removing entry from net_schedule_list James Harper (1): xen/netback: avoid null-pointer access in netback_uevent Jan Beulich (2): linux/netback: unmap tx ring gref when mapping of rx ring gref failed Provide a variant of __RING_SIZE() that is an integer constant expression Jeremy Fitzhardinge (26): xen/netback: Initial import of linux-2.6.18-xen.hg netback driver. xen/netback: first cut at porting to upstream and cleaning up xen: Add defines for multicall parameter offsets. xen/netback: don''t include xen/evtchn.h xen/netback: use mod_timer xen/netback: use NET_SKB_PAD rather than "16" xen/netback: completely drop flip support xen/netback: demacro MASK_PEND_IDX xen/netback: convert PEND_RING_IDX into a proper typedef name xen/netback: rename NR_PENDING_REQS to nr_pending_reqs() xen/netback: pre-initialize list and spinlocks; use empty list to indicate not on list xen/netback: remove CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER xen/netback: make netif_get/put inlines xen/netback: move code around xen/netback: document PKT_PROT_LEN netback: convert to net_device_ops xen/netback: reinstate missing code xen/netback: remove debug noise xen/netback: don''t screw around with packet gso state xen/netback: use dev_get/set_drvdata() inteface xen/netback: include linux/sched.h for TASK_* definitions xen/netback: use get_sset_count rather than obsolete get_stats_count netback: minor code formatting fixup xen/netback: make sure all the group structures are initialized before starting async code Revert "xen/netback: make sure all the group structures are initialized before starting async code" netback: only initialize for PV domains Keir Fraser (1): xen: netback: Fixes for delayed copy of tx network packets. Konrad Rzeszutek Wilk (1): Fix compile warnings: ignoring return value of ''xenbus_register_backend'' .. Paul Durrant (3): xen/netback: Fix basic indentation issue xen/netback: Add a new style of passing GSO packets to frontends. xen/netback: Make frontend features distinct from netback feature flags. Steven Smith (2): xen/netback: make sure that pg->mapping is never NULL for a page mapped from a foreign domain. xen/netback: try to pull a minimum of 72 bytes into the skb data area arch/x86/include/asm/xen/hypercall.h | 11 +- drivers/xen/Kconfig | 7 + drivers/xen/Makefile | 22 +- drivers/xen/netback/Makefile | 3 + drivers/xen/netback/common.h | 329 ++++++ drivers/xen/netback/interface.c | 475 +++++++++ drivers/xen/netback/netback.c | 1902 ++++++++++++++++++++++++++++++++++ drivers/xen/netback/xenbus.c | 518 +++++++++ include/xen/interface/io/netif.h | 4 + include/xen/interface/io/ring.h | 22 +- 10 files changed, 3278 insertions(+), 15 deletions(-) create mode 100644 drivers/xen/netback/Makefile create mode 100644 drivers/xen/netback/common.h create mode 100644 drivers/xen/netback/interface.c create mode 100644 drivers/xen/netback/netback.c create mode 100644 drivers/xen/netback/xenbus.c _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2010-Dec-17 16:35 UTC
[Xen-devel] [SPAM] Re: [PATCH] netback for upstream
On 12/17/2010 03:00 AM, Ian Campbell wrote:> I have rebased the current xen/next-2.6.32 netback stuff onto 2.6.37-rc5 > in a new branch at: > git://xenbits.xen.org/people/ianc/linux-2.6.git upstream/dom0/backend/netback > This builds on my upstream/dom0/backend/core branch. (full pull request > style details are at the end) > > I''ve added some proper commit messages to the early commits which were > previously lacking them. In particular 8495d90cf5c3..5f7b85f2899e seem > to have been Authored by Jeremy (according to the git metadata) but were > not signed-off. Jeremy is it OK to add your sign-off to those three?I''m pretty sure they were yours originally and I lost the authorship when importing from mq -> git.> Until those early commit messages are done the branch will be subject to > rebasing. > > As it stands the branch won''t work because it still needs PageForeign. > My intention is to replace this dependency with the new m2p overlay > grant table map stuff added for gntdev. > > In the meantime if you need something right now I do have a working (if > somewhat over-engineered) version which removed the dependency of > PageForeign by always copying. This is in the > upstream/dom0/backend/netback-copying branch in the same repository. I > intend to throw this away when I''ve got the new m2p overlay stuff ready.Would it make sense to develop the m2p overlay version on top of the copying branch and drop the foreign code altogether? It makes logical sense to go from simple -> more optimised within one history?> If you wanted the old PageForeign style thing you could look in > notupstream/foreign-memory while flagellating yourself.Thanks, but no.> So my plan going forward is to: > * switch to gnttab_{map,unmap}_refs + m2p overlay stuff. > * do a checkpatch.pl sweep over the complete files. > * do a "git mv" (or perhaps a suitable "git filter-branch") to > move from drivers/xen/netback to drivers/net/xen-netback. > * ensure netif.h has a reasonably current description of the ring > protocol, I suspect it is missing stuff like the GSO prefix > support. > > After that I intend to submit to linux-netdev as a single large patch > for review. When it comes time to merge I''ll ask if they are willing to > take the branch with history.Yep, seems reasonable.> Ian. > > > The following changes since commit a8d67d067346b924e4d12d585257e2c33251ea04: > Ian Campbell (1): > xen/xenbus: fixup checkpatch issues in xenbus_probe* > > are available in the git repository at: > > git://xenbits.xen.org/people/ianc/linux-2.6.git upstream/dom0/backend/netback > > Bastian Blank (1): > xen/netback: Fix null-pointer access in netback_uevent > > Christophe Saout (1): > xen/netback: use dev_name() instead of removed ->bus_id. > > Dongxiao Xu (6): > xen/netback: use smart polling instead of event notification > xen/netback: Move global/static variables into struct xen_netbk. > xen/netback: Introduce a new struct type page_ext. > xen/netback: Multiple tasklets support. > xen/netback: Use Kernel thread to replace the tasklet. > Netback: Set allocated memory to zero from vmalloc.I think we should drop the smartpoll stuff. It is still unfixed, and I have never pushed it into upstream netfront. Is the tasklet work is independent of that though?> Ian Campbell (21): > netback: add ethtool stat to track copied skbs. > netback: make queue length parameter writeable in sysfs > netback: parent sysfs device should be set before registering. > xen: rename netbk module xen-netback. > xen: netback: remove unused xen_network_done code > xen: netback: factor disconnect from backend into new function. > xen: netback: wait for hotplug scripts to complete before signalling connected to frontend > xen/netback: Always pull through PKT_PROT_LEN bytes into the linear part of an skb. > xen/netback: Allow setting of large MTU before rings have connected. > xen/netback: correctly setup skb->ip_summed on receive > xen: netback: handle NET_SKBUFF_DATA_USES_OFFSET correctly > xen: netback: drop frag member from struct netbk_rx_meta > xen/netback: linearise SKBs as we copy them into guest memory on guest-RX. > xen: netback: drop more relics of flipping mode > xen/rings: make protocol specific usage of shared sring explicit > xen/netback: make protocol specific usage of shared sring explicit > xen: netback: check if foreign pages are actually netback-created foreign pages. > xen: netback: do not unleash netback threads until initialisation is complete > xen: netback: save interrupt state in add_to_net_schedule_list_tail > xen: netback: increase size of rx_meta array. > xen: netback: take net_schedule_list_lock when removing entry from net_schedule_list > > James Harper (1): > xen/netback: avoid null-pointer access in netback_ueventI guess this is fixed to the extent that I haven''t seen any complaints lately, but I think there were still some unresolved issues.> Jan Beulich (2): > linux/netback: unmap tx ring gref when mapping of rx ring gref failed > Provide a variant of __RING_SIZE() that is an integer constant expressionThis is already upstream.> Jeremy Fitzhardinge (26): > xen/netback: Initial import of linux-2.6.18-xen.hg netback driver. > xen/netback: first cut at porting to upstream and cleaning up > xen: Add defines for multicall parameter offsets.Pretty sure these three are yours.> xen/netback: don''t include xen/evtchn.h > xen/netback: use mod_timer > xen/netback: use NET_SKB_PAD rather than "16" > xen/netback: completely drop flip support > xen/netback: demacro MASK_PEND_IDX > xen/netback: convert PEND_RING_IDX into a proper typedef name > xen/netback: rename NR_PENDING_REQS to nr_pending_reqs() > xen/netback: pre-initialize list and spinlocks; use empty list to indicate not on list > xen/netback: remove CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER > xen/netback: make netif_get/put inlines > xen/netback: move code around > xen/netback: document PKT_PROT_LEN > netback: convert to net_device_ops > xen/netback: reinstate missing code > xen/netback: remove debug noise > xen/netback: don''t screw around with packet gso state > xen/netback: use dev_get/set_drvdata() inteface > xen/netback: include linux/sched.h for TASK_* definitions > xen/netback: use get_sset_count rather than obsolete get_stats_count > netback: minor code formatting fixup > xen/netback: make sure all the group structures are initialized before starting async code > Revert "xen/netback: make sure all the group structures are initialized before starting async code" > netback: only initialize for PV domainsI can see a definite need for some folding there.> Keir Fraser (1): > xen: netback: Fixes for delayed copy of tx network packets. > > Konrad Rzeszutek Wilk (1): > Fix compile warnings: ignoring return value of ''xenbus_register_backend'' .. > > Paul Durrant (3): > xen/netback: Fix basic indentation issue > xen/netback: Add a new style of passing GSO packets to frontends. > xen/netback: Make frontend features distinct from netback feature flags.I guess it would be a good time to add Paul''s other patches? J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, 2010-12-17 at 16:35 +0000, Jeremy Fitzhardinge wrote:> On 12/17/2010 03:00 AM, Ian Campbell wrote: > > I have rebased the current xen/next-2.6.32 netback stuff onto 2.6.37-rc5 > > in a new branch at: > > git://xenbits.xen.org/people/ianc/linux-2.6.git upstream/dom0/backend/netback > > This builds on my upstream/dom0/backend/core branch. (full pull request > > style details are at the end) > > > > I''ve added some proper commit messages to the early commits which were > > previously lacking them. In particular 8495d90cf5c3..5f7b85f2899e seem > > to have been Authored by Jeremy (according to the git metadata) but were > > not signed-off. Jeremy is it OK to add your sign-off to those three? > > I''m pretty sure they were yours originally and I lost the authorship > when importing from mq -> git.ok. I''ll fix that up.> > Until those early commit messages are done the branch will be subject to > > rebasing. > > > > As it stands the branch won''t work because it still needs PageForeign. > > My intention is to replace this dependency with the new m2p overlay > > grant table map stuff added for gntdev. > > > > In the meantime if you need something right now I do have a working (if > > somewhat over-engineered) version which removed the dependency of > > PageForeign by always copying. This is in the > > upstream/dom0/backend/netback-copying branch in the same repository. I > > intend to throw this away when I''ve got the new m2p overlay stuff ready. > > Would it make sense to develop the m2p overlay version on top of the > copying branch and drop the foreign code altogether? It makes logical > sense to go from simple -> more optimised within one history?The copying version has it''s own set of complexity though, and did involve rewriting/reinventing a bunch of stuff. I''m not sure it is worth it since the m2p overlay version looks like it would just undo most of it to get back to a more foreign page like version. I''ll see, I''ve got the basic code written for the m2p overlay case already, just need to stop it crashing now ;-)> > If you wanted the old PageForeign style thing you could look in > > notupstream/foreign-memory while flagellating yourself. > > Thanks, but no.;-)> > Dongxiao Xu (6): > > xen/netback: use smart polling instead of event notification > > xen/netback: Move global/static variables into struct xen_netbk. > > xen/netback: Introduce a new struct type page_ext. > > xen/netback: Multiple tasklets support. > > xen/netback: Use Kernel thread to replace the tasklet. > > Netback: Set allocated memory to zero from vmalloc. > > I think we should drop the smartpoll stuff. It is still unfixed, and I > have never pushed it into upstream netfront.Hmm, yes. Will do.> Is the tasklet work is independent of that though?Yes. [...]> I can see a definite need for some folding there.I could do a little but I''d quite like to retain the overall history -- it''s useful to be able to track what has come from where in the future.> I guess it would be a good time to add Paul''s other patches?I was holding off until the baseline was done. If you want to add them to the 2.6.32 branch I was planning to do a catchup/resync when I''ve got the basics upstreamble anyway. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel