Commit Graph

185 Commits

Author SHA1 Message Date
adrian
6732387afd Do the invariant check before the mbuf is dereferenced. 2009-05-27 01:56:37 +00:00
adrian
fc20aee93b Flesh out some inline documentation which hopefully reflect the intended
reality of these functions.
2009-05-27 01:54:26 +00:00
adrian
712491866f Add in some INVARIANT checks in the TX mbuf descriptor "freelist" management code.
Slot 0 must always remain "free" and be a pointer to the first free entry in the
mbuf descriptor list. It is thus an error to have code allocate or push slot 0
back into the list.
2009-05-27 01:45:23 +00:00
adrian
7f0067a49a The merge in r189699 reverted part of the work done in a previous commit
(r188036.)

Re-revert that change so the Xen networking functions again.
2009-05-18 04:56:37 +00:00
adrian
646dc483a5 Disable some un-needed console debugging. 2009-05-18 04:50:31 +00:00
kmacy
4e4682a2b6 don't acquire tty lock with console lock held 2009-05-11 23:03:15 +00:00
kmacy
64224d156a xen console lock needs to be a spin lock in case it is acquired from an interrupt context 2009-05-11 22:55:49 +00:00
dfr
df0ed71781 Fix the Xen build for i386 PV mode. 2009-04-01 17:06:28 +00:00
dfr
598fb4217f Merge in support for Xen HVM on amd64 architecture. 2009-03-11 15:30:12 +00:00
kmacy
f8d6e74e3a fix non-witness compile 2009-02-05 21:18:39 +00:00
rrs
2688c69180 Adds support for SCTP checksum offload. This means
we, like TCP and UDP, move the checksum calculation
into the IP routines when there is no hardware support
we call into the normal SCTP checksum routine.

The next round of SCTP updates will use
this functionality. Of course the IGB driver needs
a few updates to support the new intel controller set
that actually does SCTP csum offload too.

Reviewed by:	gnn, rwatson, kmacy
2009-02-03 11:00:43 +00:00
kmacy
797fe35608 break out of loop if we run out of mbufs 2009-02-02 23:04:20 +00:00
ed
a964306db9 Last step of splitting up minor and unit numbers: remove minor().
Inside the kernel, the minor() function was responsible for obtaining
the device minor number of a character device. Because we made device
numbers dynamically allocated and independent of the unit number passed
to make_dev() a long time ago, it was actually a misnomer. If you really
want to obtain the device number, you should use dev2udev().

We already converted all the drivers to use dev2unit() to obtain the
device unit number, which is still used by a lot of drivers. I've
noticed not a single driver passes NULL to dev2unit(). Even if they
would, its behaviour would make little sense. This is why I've removed
the NULL check.

Ths commit removes minor(), minor2unit() and unit2minor() from the
kernel. Because there was a naming collision with uminor(), we can
rename umajor() and uminor() back to major() and minor(). This means
that the makedev(3) manual page also applies to kernel space code now.

I suspect umajor() and uminor() isn't used that often in external code,
but to make it easier for other parties to port their code, I've
increased __FreeBSD_version to 800062.
2009-01-28 17:57:16 +00:00
kmacy
9198d09682 merge 186535, 186537, and 186538 from releng_7_xen
Log:
 - merge in latest xenbus from dfr's xenhvm
 - fix race condition in xs_read_reply by converting tsleep to mtx_sleep

Log:
 unmask evtchn in bind_{virq, ipi}_to_irq

Log:
 - remove code for handling case of not being able to sleep
 - eliminate tsleep - make sleeps atomic
2008-12-29 06:31:03 +00:00
kmacy
77ba713706 Integrate 185578 from dfr
Use newbus to managed devices
2008-12-04 07:59:05 +00:00
dfr
e6c2c9e655 Don't call ether_ioctl() with locks held. Loop in xn_rxeof() until the backend
stops adding stuff to the ring otherwise we miss RX interrupts which kills
performance.
2008-11-30 12:21:46 +00:00
dfr
19b6af98ec Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
performance in Xen's HVM mode.
2008-11-22 16:14:52 +00:00
ed
db4c3eb350 Remove unused consdev structure fields.
The cn_unit and cn_tp fields don't seem to be used anywhere. Some
drivers set them, while others don't. Just remove them, in an attempt to
make our consdev code a little easier to understand.
2008-10-27 11:45:31 +00:00
kmacy
9f39b725b3 Add newline to sys/conf/files so that netfront.c compiles, s/ext_arg1/ext_args/ 2008-10-18 04:26:07 +00:00
kmacy
8234483524 update console to pre-MPSAFE tty interfaces 2008-10-15 05:43:13 +00:00
ed
4efdef565f Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
2008-09-27 08:51:18 +00:00
kmacy
3d2b6bb54b Update xen/interface includes to the latest in mercurial
MFC after:	1 month
2008-09-26 05:29:39 +00:00
kmacy
7db949181a reflect header change in netfront
MFC after:	1 month
2008-09-25 07:02:00 +00:00
attilio
dbf35e279f Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed thread
was always curthread and totally unuseful.

Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
2008-08-28 15:23:18 +00:00
kmacy
09865bc91a Evidently the block device starts at 767.
MFC after:	1 month
2008-08-24 04:42:41 +00:00
kmacy
6cd00a892a make block devices start at 0 2008-08-23 21:30:08 +00:00
kmacy
ebff248b66 For reasons that I have not delved in to Xen 3.2 netback now does header splitting
so packets > 128 bytes are now split in to multiple buffer. This fixes netfront
to handle multiple buffers per rx packet.

MFC after:	1 month
2008-08-21 02:40:26 +00:00
kmacy
e647d11859 change netfront to match xen31_6
fix console locking
2008-08-20 09:47:49 +00:00
kmacy
15e36b57cb mark blkfront_info as ready
MFC after:	1 month
2008-08-20 09:22:37 +00:00
kmacy
a6ed34cafa include vmparam.h for KERNBASE and fix typo 2008-08-20 09:11:58 +00:00
kmacy
35e29e10bb register netfront before xenbus does its probing
MFC after: 	1 month
2008-08-20 09:03:23 +00:00
ed
0fa96a5411 Integrate the Xen console driver.
I initially didn't want to integrate the Xen console driver, because it
did not receive any testing. Kip Macy suggested that I'd better check it
in right now, because this is the easiest way for him to test it while
he is working on the Xen import.

Requested by:	kmacy
2008-08-20 09:03:03 +00:00
kmacy
3bbb5703ff Make sure that machine addresses are vm_paddr_t
MFC after:	1 month
2008-08-17 23:33:33 +00:00
kmacy
b65933479a Compile fixes for xen build.
MFC after:	1 month.
2008-08-15 04:00:44 +00:00
kmacy
510c672e13 Import Xen paravirtual drivers.
MFC after:	2 weeks
2008-08-12 20:01:57 +00:00