search for: add_feature

Displaying 13 results from an estimated 13 matches for "add_feature".

2008 Jun 25
3
[PATCH 1/4] tun: Interface to query tun/tap features.
The problem with introducing checksum offload and gso to tun is they need to set dev->features to enable GSO and/or checksumming, which is supposed to be done before register_netdevice(), ie. as part of TUNSETIFF. Unfortunately, TUNSETIFF has always just ignored flags it doesn't understand, so there's no good way of detecting whether the kernel supports new IFF_ flags. This patch
2008 Jun 25
3
[PATCH 1/4] tun: Interface to query tun/tap features.
The problem with introducing checksum offload and gso to tun is they need to set dev->features to enable GSO and/or checksumming, which is supposed to be done before register_netdevice(), ie. as part of TUNSETIFF. Unfortunately, TUNSETIFF has always just ignored flags it doesn't understand, so there's no good way of detecting whether the kernel supports new IFF_ flags. This patch
2009 Sep 29
0
[PATCH 4/4] lguest: GET_ID "support"
...\n"); + *in = VIRTIO_BLK_S_UNSUPP; + wlen = sizeof(*in); + } else if (out->type & VIRTIO_BLK_T_SCSI_CMD) { fprintf(stderr, "Scsi commands unsupported\n"); *in = VIRTIO_BLK_S_UNSUPP; wlen = sizeof(*in); @@ -1751,6 +1755,9 @@ static void setup_block_file(const char add_feature(dev, VIRTIO_BLK_F_SEG_MAX); conf.seg_max = cpu_to_le32(VIRTQUEUE_NUM - 2); + /* We have GET_ID, at least for testing! */ + add_feature(dev, VIRTIO_BLK_F_GET_ID); + /* * We only have 8 bits of configuration space for each device. But a * new feature for virtio_blk added a 1k 'identi...
2009 Sep 29
0
[PATCH 4/4] lguest: GET_ID "support"
...\n"); + *in = VIRTIO_BLK_S_UNSUPP; + wlen = sizeof(*in); + } else if (out->type & VIRTIO_BLK_T_SCSI_CMD) { fprintf(stderr, "Scsi commands unsupported\n"); *in = VIRTIO_BLK_S_UNSUPP; wlen = sizeof(*in); @@ -1751,6 +1755,9 @@ static void setup_block_file(const char add_feature(dev, VIRTIO_BLK_F_SEG_MAX); conf.seg_max = cpu_to_le32(VIRTQUEUE_NUM - 2); + /* We have GET_ID, at least for testing! */ + add_feature(dev, VIRTIO_BLK_F_GET_ID); + /* * We only have 8 bits of configuration space for each device. But a * new feature for virtio_blk added a 1k 'identi...
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
This patch changes virtio_pci to use a shared memory area for virtio config info instead of using the PCI configuration space. This is closer semantically to what the virtio API exposes and is it a lot easier to implement on both ends. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index eb9a8e0..7e6e453 100644
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
This patch changes virtio_pci to use a shared memory area for virtio config info instead of using the PCI configuration space. This is closer semantically to what the virtio API exposes and is it a lot easier to implement on both ends. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index eb9a8e0..7e6e453 100644
2008 May 30
2
[PATCH 1/3] virtio: VIRTIO_F_NOTIFY_ON_EMPTY to force callback on empty
virtio allows drivers to suppress callbacks (ie. interrupts) for efficiency (no locking, it's just an optimization). There's a similar mechanism for the host to suppress notifications coming from the guest: in that case, we ignore the suppression if the ring is completely full. It turns out that life is simpler if the host similarly ignores callback suppression when the ring is
2008 May 30
2
[PATCH 1/3] virtio: VIRTIO_F_NOTIFY_ON_EMPTY to force callback on empty
virtio allows drivers to suppress callbacks (ie. interrupts) for efficiency (no locking, it's just an optimization). There's a similar mechanism for the host to suppress notifications coming from the guest: in that case, we ignore the suppression if the ring is completely full. It turns out that life is simpler if the host similarly ignores callback suppression when the ring is
2009 Sep 29
0
[PATCH 2/4] lguest: get rid of offset hack in example launcher
...uest.c +++ b/Documentation/lguest/lguest.c @@ -6,6 +6,7 @@ :*/ #define _LARGEFILE64_SOURCE #define _GNU_SOURCE +#define VIRTIO_BLK_IDENTIFY_DEPRECATED #include <stdio.h> #include <string.h> #include <unistd.h> @@ -1750,8 +1751,21 @@ static void setup_block_file(const char add_feature(dev, VIRTIO_BLK_F_SEG_MAX); conf.seg_max = cpu_to_le32(VIRTQUEUE_NUM - 2); - /* Don't try to put whole struct: we have 8 bit limit. */ - set_config(dev, offsetof(struct virtio_blk_config, geometry), &conf); + /* + * We only have 8 bits of configuration space for each device. But a +...
2009 Sep 29
0
[PATCH 2/4] lguest: get rid of offset hack in example launcher
...uest.c +++ b/Documentation/lguest/lguest.c @@ -6,6 +6,7 @@ :*/ #define _LARGEFILE64_SOURCE #define _GNU_SOURCE +#define VIRTIO_BLK_IDENTIFY_DEPRECATED #include <stdio.h> #include <string.h> #include <unistd.h> @@ -1750,8 +1751,21 @@ static void setup_block_file(const char add_feature(dev, VIRTIO_BLK_F_SEG_MAX); conf.seg_max = cpu_to_le32(VIRTQUEUE_NUM - 2); - /* Don't try to put whole struct: we have 8 bit limit. */ - set_config(dev, offsetof(struct virtio_blk_config, geometry), &conf); + /* + * We only have 8 bits of configuration space for each device. But a +...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
...t;vq is first vq, dev->vq->next is * second. */ @@ -1071,6 +1067,37 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, vq->vring.used->flags = VRING_USED_F_NO_NOTIFY; } +/* The virtqueue descriptors are followed by feature bytes. */ +static void add_feature(struct device *dev, unsigned bit) +{ + u8 *features; + + /* We can't extend the feature bits once we've added config bytes */ + if (dev->desc->feature_len <= bit / CHAR_BIT) { + assert(dev->desc->config_len == 0); + dev->desc->feature_len = (bit /...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
...t;vq is first vq, dev->vq->next is * second. */ @@ -1071,6 +1067,37 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, vq->vring.used->flags = VRING_USED_F_NO_NOTIFY; } +/* The virtqueue descriptors are followed by feature bytes. */ +static void add_feature(struct device *dev, unsigned bit) +{ + u8 *features; + + /* We can't extend the feature bits once we've added config bytes */ + if (dev->desc->feature_len <= bit / CHAR_BIT) { + assert(dev->desc->config_len == 0); + dev->desc->feature_len = (bit /...
2016 Jun 29
2
xapian-letor: FeatureVector discussion
> > > > The approach I was thinking would look something like this: > > * instead of Features, which is really a namespace implemented as a > class, we separate out the calculation of the different features > into distinct subclasses of Feature, whose only job is to calculate > a single feature. Currently the FeatureManager calls these (via >