26 Mar, 2013
2 commits
-
This function is in fact counting the ring slots required for responses.
Separate the concepts of ring slots and skb frags make the code clearer, as
now netfront and netback can have different MAX_SKB_FRAGS, slot and frag are
not mapped 1:1 any more.Signed-off-by: Wei Liu
Reviewed-by: David Vrabel
Signed-off-by: David S. Miller -
This variable is supposed to hold reference to the last extra_info in the
loop. However there is only type of extra info here and the loop to process
extra info is missing, so this variable is never used and causes confusion.Remove it at the moment. We can add it back when necessary.
Signed-off-by: Wei Liu
Reviewed-by: David Vrabel
Signed-off-by: David S. Miller
08 Jan, 2013
1 commit
-
Using RX_COPY_THRESHOLD is incorrect if the SKB is actually smaller
than that. We have already accounted for this in
NETFRONT_SKB_CB(skb)->pull_to so use that instead.Fixes WARN_ON from skb_try_coalesce.
Signed-off-by: Ian Campbell
Cc: Sander Eikelenboom
Cc: Konrad Rzeszutek Wilk
Cc: annie li
Cc: xen-devel@lists.xen.org
Cc: netdev@vger.kernel.org
Cc: stable@kernel.org # 3.7.x only
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
08 Dec, 2012
1 commit
-
The __dev* removal patches for the network drivers ended up messing up
the function prototypes for a bunch of drivers. This patch fixes all of
them back up to be properly aligned.Bonus is that this almost removes 100 lines of code, always a nice
surprise.Signed-off-by: Greg Kroah-Hartman
Signed-off-by: David S. Miller
04 Dec, 2012
1 commit
-
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.Signed-off-by: Bill Pemberton
Cc: Konrad Rzeszutek Wilk
Cc: Jeremy Fitzhardinge
Cc: xen-devel@lists.xensource.com
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Greg Kroah-Hartman
22 Nov, 2012
1 commit
-
An SKB paged fragment can consist of a compound page with order > 0.
However the netchannel protocol deals only in PAGE_SIZE frames.Handle this in xennet_make_frags by iterating over the frames which
make up the page.This is the netfront equivalent to 6a8ed462f16b for netback.
Signed-off-by: Ian Campbell
Cc: netdev@vger.kernel.org
Cc: xen-devel@lists.xen.org
Cc: Eric Dumazet
Cc: Konrad Rzeszutek Wilk
Cc: ANNIE LI
Cc: Sander Eikelenboom
Cc: Stefan Bader
Acked-by: Eric Dumazet
Acked-by: Konrad Rzeszutek Wilk
Signed-off-by: David S. Miller
07 Oct, 2012
1 commit
-
Pull ADM Xen support from Konrad Rzeszutek Wilk:
Features:
* Allow a Linux guest to boot as initial domain and as normal guests
on Xen on ARM (specifically ARMv7 with virtualized extensions). PV
console, block and network frontend/backends are working.
Bug-fixes:
* Fix compile linux-next fallout.
* Fix PVHVM bootup crashing.The Xen-unstable hypervisor (so will be 4.3 in a ~6 months), supports
ARMv7 platforms.The goal in implementing this architecture is to exploit the hardware
as much as possible. That means use as little as possible of PV
operations (so no PV MMU) - and use existing PV drivers for I/Os
(network, block, console, etc). This is similar to how PVHVM guests
operate in X86 platform nowadays - except that on ARM there is no need
for QEMU. The end result is that we share a lot of the generic Xen
drivers and infrastructure.Details on how to compile/boot/etc are available at this Wiki:
http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions
and this blog has links to a technical discussion/presentations on the
overall architecture:http://blog.xen.org/index.php/2012/09/21/xensummit-sessions-new-pvh-virtualisation-mode-for-arm-cortex-a15arm-servers-and-x86/
* tag 'stable/for-linus-3.7-arm-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (21 commits)
xen/xen_initial_domain: check that xen_start_info is initialized
xen: mark xen_init_IRQ __init
xen/Makefile: fix dom-y build
arm: introduce a DTS for Xen unprivileged virtual machines
MAINTAINERS: add myself as Xen ARM maintainer
xen/arm: compile netback
xen/arm: compile blkfront and blkback
xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
xen/arm: receive Xen events on ARM
xen/arm: initialize grant_table on ARM
xen/arm: get privilege status
xen/arm: introduce CONFIG_XEN on ARM
xen: do not compile manage, balloon, pci, acpi, pcpu and cpu_hotplug on ARM
xen/arm: Introduce xen_ulong_t for unsigned long
xen/arm: Xen detection and shared_info page mapping
docs: Xen ARM DT bindings
xen/arm: empty implementation of grant_table arch specific functions
xen/arm: sync_bitops
xen/arm: page.h definitions
xen/arm: hypercalls
...
01 Sep, 2012
1 commit
-
Merge the 'net' tree to get the recent set of netfilter bug fixes in
order to assist with some merge hassles Pablo is going to have to deal
with for upcoming changes.Signed-off-by: David S. Miller
31 Aug, 2012
1 commit
-
I'm slightly concerned by the "only in exceptional circumstances"
comment on __pskb_pull_tail but the structure of an skb just created
by netfront shouldn't hit any of the especially slow cases.This approach still does slightly more work than the old way, since if
we pull up the entire first frag we now have to shuffle everything
down where before we just received into the right place in the first
place.Signed-off-by: Ian Campbell
Cc: Konrad Rzeszutek Wilk
Cc: Jeremy Fitzhardinge
Cc: Mel Gorman
Cc: xen-devel@lists.xensource.com
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Tested-by: Konrad Rzeszutek Wilk
Acked-by: Konrad Rzeszutek Wilk
Signed-off-by: David S. Miller
15 Aug, 2012
1 commit
-
I believe net/core/dev.c is a better place for netif_notify_peers(),
because other net event notify functions also stay in this file.And rename it to netdev_notify_peers().
Cc: David S. Miller
Cc: Ian Campbell
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller
09 Aug, 2012
1 commit
-
Signed-off-by: Stefano Stabellini
Acked-by: Konrad Rzeszutek Wilk
27 Jun, 2012
1 commit
-
Fixes:
[ 15.470311] WARNING: at /local/scratch/ianc/devel/kernels/linux/fs/sysfs/file.c:498 sysfs_attr_ns+0x95/0xa0()
[ 15.470326] sysfs: kobject eth0 without dirent
[ 15.470333] Modules linked in:
[ 15.470342] Pid: 12, comm: xenwatch Not tainted 3.4.0-x86_32p-xenU #93
and
[ 9.150554] BUG: unable to handle kernel paging request at 2b359000
[ 9.150577] IP: [] linkwatch_do_dev+0x81/0xc0
[ 9.150592] *pdpt = 000000002c3c9027 *pde = 0000000000000000
[ 9.150604] Oops: 0002 [#1] SMP
[ 9.150613] Modules linked in:This is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675190
Reported-by: George Shuklin
Signed-off-by: Ian Campbell
Tested-by: William Dauchy
Cc: stable@kernel.org
Cc: 675190@bugs.debian.org
Signed-off-by: David S. Miller
23 May, 2012
1 commit
-
Netfront driver can be also useful in dom0, eg when all NICs are assigned to
some domU (aka driver domain). Then using netback in domU and netfront in dom0
is the only way to get network access in dom0.Signed-off-by: Marek Marczykowski
Acked-by: Ian Campbell
Acked-by: Konrad Rzeszutek Wilk
Signed-off-by: David S. Miller
07 Apr, 2012
2 commits
-
Pull xen fixes from Konrad Rzeszutek Wilk:
"Two fixes for regressions:
* one is a workaround that will be removed in v3.5 with proper fix in
the tip/x86 tree,
* the other is to fix drivers to load on PV (a previous patch made
them only load in PVonHVM mode).The rest are just minor fixes in the various drivers and some cleanup
in the core code."* tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen/pcifront: avoid pci_frontend_enable_msix() falsely returning success
xen/pciback: fix XEN_PCI_OP_enable_msix result
xen/smp: Remove unnecessary call to smp_processor_id()
xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'
xen: only check xen_platform_pci_unplug if hvm -
commit b9136d207f08
xen: initialize platform-pci even if xen_emul_unplug=neverbreaks blkfront/netfront by not loading them because of
xen_platform_pci_unplug=0 and it is never set for PV guest.Signed-off-by: Andrew Jones
Signed-off-by: Igor Mammedov
Signed-off-by: Konrad Rzeszutek Wilk
25 Mar, 2012
1 commit
-
Pull more xen updates from Konrad Rzeszutek Wilk:
"One tiny feature that accidentally got lost in the initial git pull:
* Add fast-EOI acking of interrupts (clear a bit instead of
hypercall)
And bug-fixes:
* Fix CPU bring-up code missing a call to notify other subsystems.
* Fix reading /sys/hypervisor even if PVonHVM drivers are not loaded.
* In Xen ACPI processor driver: remove too verbose WARN messages, fix
up the Kconfig dependency to be a module by default, and add
dependency on CPU_FREQ.
* Disable CPU frequency drivers from loading when booting under Xen
(as we want the Xen ACPI processor to be used instead).
* Cleanups in tmem code."* tag 'stable/for-linus-3.4-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen/acpi: Fix Kconfig dependency on CPU_FREQ
xen: initialize platform-pci even if xen_emul_unplug=never
xen/smp: Fix bringup bug in AP code.
xen/acpi: Remove the WARN's as they just create noise.
xen/tmem: cleanup
xen: support pirq_eoi_map
xen/acpi-processor: Do not depend on CPU frequency scaling drivers.
xen/cpufreq: Disable the cpu frequency scaling drivers from loading.
provide disable_cpufreq() function to disable the API.
22 Mar, 2012
1 commit
-
When xen_emul_unplug=never is specified on kernel command line
reading files from /sys/hypervisor is broken (returns -EBUSY).
It is caused by xen_bus dependency on platform-pci and
platform-pci isn't initialized when xen_emul_unplug=never is
specified.Fix it by allowing platform-pci to ignore xen_emul_unplug=never,
and do not intialize xen_[blk|net]front instead.Signed-off-by: Igor Mammedov
Acked-by: Stefano Stabellini
Signed-off-by: Konrad Rzeszutek Wilk
05 Feb, 2012
1 commit
01 Feb, 2012
1 commit
-
alloc_etherdev has a generic OOM/unable to alloc message.
Remove the duplicative messages after alloc_etherdev calls.Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
27 Jan, 2012
1 commit
-
Signed-off-by: Wei Liu
Signed-off-by: David S. Miller
25 Jan, 2012
1 commit
-
add polling interface to xen-netfront device to support netconsole
This patch also alters the spin_lock usage to use irqsave variant.
Documentation/networking/netdevices.txt states that start_xmit
can be called with interrupts disabled by netconsole and therefore using
the irqsave/restore locking in this function is looks correct.Signed-off-by: Tina.Yang
Cc: Jeremy Fitzhardinge
Signed-off-by: Zhenzhong.Duan
Tested-by: gurudas.pai
[v1: Copy-n-pasted Ian Campbell comments]
Signed-off-by: Konrad Rzeszutek Wilk
Acked-by: Ian Campbell
Signed-off-by: David S. Miller
11 Jan, 2012
1 commit
-
* 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (37 commits)
xen/pciback: Expand the warning message to include domain id.
xen/pciback: Fix "device has been assigned to X domain!" warning
xen/pciback: Move the PCI_DEV_FLAGS_ASSIGNED ops to the "[un|]bind"
xen/xenbus: don't reimplement kvasprintf via a fixed size buffer
xenbus: maximum buffer size is XENSTORE_PAYLOAD_MAX
xen/xenbus: Reject replies with payload > XENSTORE_PAYLOAD_MAX.
Xen: consolidate and simplify struct xenbus_driver instantiation
xen-gntalloc: introduce missing kfree
xen/xenbus: Fix compile error - missing header for xen_initial_domain()
xen/netback: Enable netback on HVM guests
xen/grant-table: Support mappings required by blkback
xenbus: Use grant-table wrapper functions
xenbus: Support HVM backends
xen/xenbus-frontend: Fix compile error with randconfig
xen/xenbus-frontend: Make error message more clear
xen/privcmd: Remove unused support for arch specific privcmp mmap
xen: Add xenbus_backend device
xen: Add xenbus device driver
xen: Add privcmd device driver
xen/gntalloc: fix reference counts on multi-page mappings
...
05 Jan, 2012
1 commit
-
The 'name', 'owner', and 'mod_name' members are redundant with the
identically named fields in the 'driver' sub-structure. Rather than
switching each instance to specify these fields explicitly, introduce
a macro to simplify this.Eliminate further redundancy by allowing the drvname argument to
DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from
the ID table will be used for .driver.name).Also eliminate the questionable xenbus_register_{back,front}end()
wrappers - their sole remaining purpose was the checking of the
'owner' field, proper setting of which shouldn't be an issue anymore
when the macro gets used.v2: Restore DRV_NAME for the driver name in xen-pciback.
Signed-off-by: Jan Beulich
Cc: Jens Axboe
Cc: Dmitry Torokhov
Cc: Florian Tobias Schandinat
Cc: Ian Campbell
Cc: David S. Miller
Signed-off-by: Konrad Rzeszutek Wilk
13 Dec, 2011
1 commit
-
After a guest is live migrated, the xen-netfront driver emits a gratuitous
ARP message, so that networking hardware on the target host's subnet can
take notice, and public routing to the guest is re-established. However,
if the packet appears on the backend interface before the backend is added
to the target host's bridge, the packet is lost, and the migrated guest's
peers become unable to talk to the guest.A sufficient two-parts condition to prevent the above is:
(1) ensure that the backend only moves to Connected xenbus state after its
hotplug scripts completed, ie. the netback interface got added to the
bridge; and(2) ensure the frontend only queues the gARP when it sees the backend move
to Connected.These two together provide complete ordering. Sub-condition (1) is already
satisfied by commit f942dc2552b8 in Linus' tree, based on commit
6b0b80ca7165 from [1].In general, the full condition is sufficient, not necessary, because,
according to [2], live migration has been working for a long time without
satisfying sub-condition (2). However, after 6b0b80ca7165 was backported
to the RHEL-5 host to ensure (1), (2) still proved necessary in the RHEL-6
guest. This patch intends to provide (2) for upstream.The Reviewed-by line comes from [3].
[1] git://xenbits.xen.org/people/ianc/linux-2.6.git#upstream/dom0/backend/netback-history
[2] http://old-list-archives.xen.org/xen-devel/2011-06/msg01969.html
[3] http://old-list-archives.xen.org/xen-devel/2011-07/msg00484.htmlSigned-off-by: Laszlo Ersek
Reviewed-by: Ian Campbell
Signed-off-by: David S. Miller
17 Nov, 2011
2 commits
-
Save some punctuation by using bool type's property equivalent to
doubled negation operator.Reported-by: Ben Hutchings
Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller -
v2: add couple missing conversions in drivers
split unexporting netdev_fix_features()
implemented %pNF
convert sock::sk_route_(no?)capsSigned-off-by: Michał Mirosław
Signed-off-by: David S. Miller
19 Oct, 2011
1 commit
-
To ease skb->truesize sanitization, its better to be able to localize
all references to skb frags size.Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
06 Oct, 2011
1 commit
-
Signed-off-by: Ian Campbell
Cc: Jeremy Fitzhardinge
Cc: Konrad Rzeszutek Wilk
Cc: xen-devel@lists.xensource.com
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller
22 Jun, 2011
1 commit
-
Convert xen driver to 64 bit statistics interface.
Use stats_sync to ensure that 64 bit update is read atomically on 32 bit platform.
Put hot statistics into per-cpu table.Signed-off-by: Stephen Hemminger
Acked-by: Ian Campbell
Signed-off-by: David S. Miller
26 May, 2011
1 commit
-
Konrad reports:
[ 0.930811] RTNL: assertion failed at /home/konrad/ssd/linux/net/core/dev.c (5258)
[ 0.930821] Pid: 22, comm: xenwatch Not tainted 2.6.39-05193-gd762f43 #1
[ 0.930825] Call Trace:
[ 0.930834] [] __netdev_update_features+0xae/0xe0
[ 0.930840] [] netdev_update_features+0x11/0x30
[ 0.930847] [] netback_changed+0x4e5/0x800 [xen_netfront]
[ 0.930854] [] xenbus_otherend_changed+0xa8/0xb0
[ 0.930860] [] ? _raw_spin_unlock_irqrestore+0x19/0x20
[ 0.930866] [] backend_changed+0xe/0x10
[ 0.930871] [] xenwatch_thread+0xba/0x180
[ 0.930876] [] ? wake_up_bit+0x40/0x40
[ 0.930881] [] ? split+0xf0/0xf0
[ 0.930886] [] kthread+0x96/0xa0
[ 0.930891] [] kernel_thread_helper+0x4/0x10
[ 0.930896] [] ? int_ret_from_sys_call+0x7/0x1b
[ 0.930901] [] ? retint_restore_args+0x5/0x6
[ 0.930906] [] ? gs_change+0x13/0x13This update happens in xenbus watch callback context and hence does not already
hold the rtnl. Take the lock as necessary.Signed-off-by: Ian Campbell
Tested-by: Konrad Rzeszutek Wilk
Signed-off-by: David S. Miller
05 Apr, 2011
1 commit
-
We need to assume that all features will be available when registering the
netdev otherwise they are ommitted from the initial set of
dev->wanted_features. When we connect to the backed we reduce the set as
necessary due to the call to netdev_update_features() in xennet_connect().Signed-off-by: Ian Campbell
Signed-off-by: David S. Miller
04 Apr, 2011
1 commit
-
Must declare xennet_fix_features() and xennet_set_features() before
using them.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
02 Apr, 2011
1 commit
-
Not tested in any way. The original code for offload setting seems broken
as it resets the features on every netback reconnect.This will set GSO_ROBUST at device creation time (earlier than connect time).
RX checksum offload is forced on - so advertise as it is.
Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller
31 Mar, 2011
1 commit
-
The IRQF_SAMPLE_RANDOM flag is marked as deprecated and will be removed.
Every input point to the kernel's entropy pool have to better document the
type of entropy source it is.drivers/char/random.c now implements a set of interfaces that can be used for
devices to collect enviromental noise. IRQF_SAMPLE_RANDOM will be replaced
with these add_*_randomness exported functions.Network drivers are not a good source of entropy. They use as a source of
entropy essentially a remote host. Which means that the source of entropy can
be potentially controlled by an attacker. Also, with heavy workloads the
entropy decreases due to less hardware interrupts happening thanks to irq
mitigation and NAPI.If a system relies in its network interface as a entropy source it has a false
sense of security. Systems that don't have devices whose drivers are good
sources of entropy, should either use a hardware random number generator or
feed the kernel's entropy pool from userspace using other sources of entropy
such as EGD, video_entropyd, timer_entropyd and audio-entropyd.Signed-off-by: Javier Martinez Canillas
Signed-off-by: David S. Miller
16 Mar, 2011
1 commit
-
netback is the host side counterpart to the frontend driver in
drivers/net/xen-netfront.c. The PV protocol is also implemented by
frontend drivers in other OSes too, such as the BSDs and even Windows.The patch is based on the driver from the xen.git pvops kernel tree but
has been put through the checkpatch.pl wringer plus several manual
cleanup passes and review iterations. The driver has been moved from
drivers/xen/netback to drivers/net/xen-netback.One major change from xen.git is that the guest transmit path (i.e. what
looks like receive to netback) has been significantly reworked to remove
the dependency on the out of tree PageForeign page flag (a core kernel
patch which enables a per page destructor callback on the final
put_page). This page flag was used in order to implement a grant map
based transmit path (where guest pages are mapped directly into SKB
frags). Instead this version of netback uses grant copy operations into
regular memory belonging to the backend domain. Reinstating the grant
map functionality is something which I would like to revisit in the
future.Note that this driver depends on 2e820f58f7ad "xen/irq: implement
bind_interdomain_evtchn_to_irqhandler for backend drivers" which is in
linux next via the "xen-two" tree and is intended for the 2.6.39 merge
window:
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/backends
this branch has only that single commit since 2.6.38-rc2 and is safe for
cross merging into the net branch.Signed-off-by: Ian Campbell
Reviewed-by: Ben Hutchings
Signed-off-by: David S. Miller
15 Mar, 2011
2 commits
-
commit e9a799ea4a5551d2 (xen: netfront: ethtool stats fields should be
unsigned long) made rx_gso_checksum_fixup an unsigned long.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Fixup the rx_gso_checksum_fixup field added in e0ce4af920eb to be
unsigned long as suggested by Ben Hutchings inSigned-off-by: Ian Campbell
Cc: Ben Hutchings
Signed-off-by: David S. Miller
28 Jan, 2011
1 commit
-
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).However there have been cases of buggy guests which mark a frame as
GSO but do not set csum_blank. If we detect that we a receiving such a
frame (which manifests as ip_summed != PARTIAL && skb_is_gso) then
force the SKB to partial and recalculate the checksum, since we cannot
rely on the peer having done so if they have not set csum_blank.Add an ethtool stat to track occurances of this event.
Signed-off-by: Ian Campbell
Cc: Jeremy Fitzhardinge
Cc: David Miller
Cc: xen-devel@lists.xensource.com
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller
10 Jan, 2011
1 commit
-
Now that there is a single function that can compute the device
features relevant to a packet, we don't want to run it for each
offload. This converts netif_needs_gso() to take the features
of the device, rather than computing them itself.Signed-off-by: Jesse Gross
Signed-off-by: David S. Miller
16 Dec, 2010
1 commit
-
Without this, gcc 4.5 won't compile xen-netfront and xen-blkfront, where
this is being used to specify array sizes.Signed-off-by: Jan Beulich
Signed-off-by: Jeremy Fitzhardinge
Cc: Jens Axboe
Cc: David Miller
Cc: Stable Kernel
Signed-off-by: Linus Torvalds