Displaying 18 results from an estimated 18 matches for "features_for_ctrl_vq".
2014 Nov 19
3
[PATCH V2 net] virtio-net: validate features during probe
...eature(dev, f)) {
+ dev_err(&dev->dev,
+ "buggy hyperviser: feature 0x%x was advertised but its dependency 0x%x was not",
+ f, feature);
+ return -EINVAL;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int virtnet_check_features(struct virtio_device *dev)
+{
+ unsigned int features_for_ctrl_vq[] = {
+ VIRTIO_NET_F_CTRL_RX,
+ VIRTIO_NET_F_CTRL_VLAN,
+ VIRTIO_NET_F_GUEST_ANNOUNCE,
+ VIRTIO_NET_F_MQ,
+ VIRTIO_NET_F_CTRL_MAC_ADDR
+ };
+ unsigned int features_for_guest_csum[] = {
+ VIRTIO_NET_F_GUEST_TSO4,
+ VIRTIO_NET_F_GUEST_TSO6,
+ VIRTIO_NET_F_GUEST_ECN,
+ };
+ unsigned int featur...
2014 Nov 19
3
[PATCH V2 net] virtio-net: validate features during probe
...eature(dev, f)) {
+ dev_err(&dev->dev,
+ "buggy hyperviser: feature 0x%x was advertised but its dependency 0x%x was not",
+ f, feature);
+ return -EINVAL;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int virtnet_check_features(struct virtio_device *dev)
+{
+ unsigned int features_for_ctrl_vq[] = {
+ VIRTIO_NET_F_CTRL_RX,
+ VIRTIO_NET_F_CTRL_VLAN,
+ VIRTIO_NET_F_GUEST_ANNOUNCE,
+ VIRTIO_NET_F_MQ,
+ VIRTIO_NET_F_CTRL_MAC_ADDR
+ };
+ unsigned int features_for_guest_csum[] = {
+ VIRTIO_NET_F_GUEST_TSO4,
+ VIRTIO_NET_F_GUEST_TSO6,
+ VIRTIO_NET_F_GUEST_ECN,
+ };
+ unsigned int featur...
2014 Nov 17
1
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
...net.c b/drivers/net/virtio_net.c
index ec2a8b4..6fadd8c 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1948,6 +1948,31 @@ static int virtnet_restore(struct virtio_device *vdev)
}
#endif
+static void virtnet_sanitize_features(struct virtio_device *dev)
+{
+ unsigned int features_for_ctrl_vq[] = {
+ VIRTIO_NET_F_CTRL_RX,
+ VIRTIO_NET_F_CTRL_VLAN,
+ VIRTIO_NET_F_GUEST_ANNOUNCE,
+ VIRTIO_NET_F_MQ,
+ VIRTIO_NET_F_CTRL_MAC_ADDR
+ };
+ int i;
+
+ if (!virtio_has_feature(dev, VIRTIO_NET_F_CTRL_VQ)) {
+ for (i = 0; i < ARRAY_SIZE(features_for_ctrl_vq); i++) {
+ unsigned int f = fea...
2014 Nov 17
1
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
...net.c b/drivers/net/virtio_net.c
index ec2a8b4..6fadd8c 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1948,6 +1948,31 @@ static int virtnet_restore(struct virtio_device *vdev)
}
#endif
+static void virtnet_sanitize_features(struct virtio_device *dev)
+{
+ unsigned int features_for_ctrl_vq[] = {
+ VIRTIO_NET_F_CTRL_RX,
+ VIRTIO_NET_F_CTRL_VLAN,
+ VIRTIO_NET_F_GUEST_ANNOUNCE,
+ VIRTIO_NET_F_MQ,
+ VIRTIO_NET_F_CTRL_MAC_ADDR
+ };
+ int i;
+
+ if (!virtio_has_feature(dev, VIRTIO_NET_F_CTRL_VQ)) {
+ for (i = 0; i < ARRAY_SIZE(features_for_ctrl_vq); i++) {
+ unsigned int f = fea...
2014 Nov 19
4
[PATCH net] virtio-net: validate features during probe
...eature(dev, f)) {
+ dev_err(&dev->dev,
+ "buggy hyperviser: feature 0x%x was advertised but its dependency 0x%x was not",
+ f, feature);
+ return -EINVAL;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int virtnet_check_features(struct virtio_device *dev)
+{
+ unsigned int features_for_ctrl_vq[] = {
+ VIRTIO_NET_F_CTRL_RX,
+ VIRTIO_NET_F_CTRL_VLAN,
+ VIRTIO_NET_F_GUEST_ANNOUNCE,
+ VIRTIO_NET_F_MQ,
+ VIRTIO_NET_F_CTRL_MAC_ADDR
+ };
+ unsigned int features_for_guest_csum[] = {
+ VIRTIO_NET_F_GUEST_TSO4,
+ VIRTIO_NET_F_GUEST_TSO6,
+ VIRTIO_NET_F_GUEST_ECN,
+ VIRTIO_NET_F_GUEST_UFO,...
2014 Nov 19
4
[PATCH net] virtio-net: validate features during probe
...eature(dev, f)) {
+ dev_err(&dev->dev,
+ "buggy hyperviser: feature 0x%x was advertised but its dependency 0x%x was not",
+ f, feature);
+ return -EINVAL;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int virtnet_check_features(struct virtio_device *dev)
+{
+ unsigned int features_for_ctrl_vq[] = {
+ VIRTIO_NET_F_CTRL_RX,
+ VIRTIO_NET_F_CTRL_VLAN,
+ VIRTIO_NET_F_GUEST_ANNOUNCE,
+ VIRTIO_NET_F_MQ,
+ VIRTIO_NET_F_CTRL_MAC_ADDR
+ };
+ unsigned int features_for_guest_csum[] = {
+ VIRTIO_NET_F_GUEST_TSO4,
+ VIRTIO_NET_F_GUEST_TSO6,
+ VIRTIO_NET_F_GUEST_ECN,
+ VIRTIO_NET_F_GUEST_UFO,...
2014 Nov 18
1
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
...vers/net/virtio_net.c
>> +++ b/drivers/net/virtio_net.c
>> @@ -1948,6 +1948,31 @@ static int virtnet_restore(struct virtio_device *vdev)
>> }
>> #endif
>>
>> +static void virtnet_sanitize_features(struct virtio_device *dev)
>> +{
>> + unsigned int features_for_ctrl_vq[] = {
>> + VIRTIO_NET_F_CTRL_RX,
>> + VIRTIO_NET_F_CTRL_VLAN,
>> + VIRTIO_NET_F_GUEST_ANNOUNCE,
>> + VIRTIO_NET_F_MQ,
>> + VIRTIO_NET_F_CTRL_MAC_ADDR
>> + };
> This is not the only dependency: checksums
> have dependencies too. See virtio 1.0 spec.
>...
2014 Nov 18
1
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
...vers/net/virtio_net.c
>> +++ b/drivers/net/virtio_net.c
>> @@ -1948,6 +1948,31 @@ static int virtnet_restore(struct virtio_device *vdev)
>> }
>> #endif
>>
>> +static void virtnet_sanitize_features(struct virtio_device *dev)
>> +{
>> + unsigned int features_for_ctrl_vq[] = {
>> + VIRTIO_NET_F_CTRL_RX,
>> + VIRTIO_NET_F_CTRL_VLAN,
>> + VIRTIO_NET_F_GUEST_ANNOUNCE,
>> + VIRTIO_NET_F_MQ,
>> + VIRTIO_NET_F_CTRL_MAC_ADDR
>> + };
> This is not the only dependency: checksums
> have dependencies too. See virtio 1.0 spec.
>...
2014 Nov 17
4
[PATCH V3 1/2] virtio: introduce methods of sanitizing device features
Buggy host may advertised buggy host features (a usual case is that host
advertise a feature whose dependencies were missed). In this case, driver
should detect and disable the buggy features by itself.
This patch introduces driver specific sanitize_features() method which is
called just before features finalizing to detect and disable buggy features
advertised by host.
Virtio-net will be the
2014 Nov 17
4
[PATCH V3 1/2] virtio: introduce methods of sanitizing device features
Buggy host may advertised buggy host features (a usual case is that host
advertise a feature whose dependencies were missed). In this case, driver
should detect and disable the buggy features by itself.
This patch introduces driver specific sanitize_features() method which is
called just before features finalizing to detect and disable buggy features
advertised by host.
Virtio-net will be the
2014 Nov 17
0
[PATCH V3 2/2] virtio-net: sanitize buggy features advertised by host
...4..6fadd8c 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1948,6 +1948,31 @@ static int virtnet_restore(struct virtio_device *vdev)
> }
> #endif
>
> +static void virtnet_sanitize_features(struct virtio_device *dev)
> +{
> + unsigned int features_for_ctrl_vq[] = {
> + VIRTIO_NET_F_CTRL_RX,
> + VIRTIO_NET_F_CTRL_VLAN,
> + VIRTIO_NET_F_GUEST_ANNOUNCE,
> + VIRTIO_NET_F_MQ,
> + VIRTIO_NET_F_CTRL_MAC_ADDR
> + };
This is not the only dependency: checksums
have dependencies too. See virtio 1.0 spec.
> + int i;
> +
> + if (!...
2014 Nov 19
0
[PATCH V2 net] virtio-net: validate features during probe
...rtised but its dependency 0x%x was not",
s/hyperviser/hypervisor/ (also below)
> + f, feature);
> + return -EINVAL;
> + }
> + }
> + }
> +
> + return 0;
> +}
> +
> +static int virtnet_check_features(struct virtio_device *dev)
> +{
> + unsigned int features_for_ctrl_vq[] = {
> + VIRTIO_NET_F_CTRL_RX,
> + VIRTIO_NET_F_CTRL_VLAN,
> + VIRTIO_NET_F_GUEST_ANNOUNCE,
> + VIRTIO_NET_F_MQ,
> + VIRTIO_NET_F_CTRL_MAC_ADDR
> + };
> + unsigned int features_for_guest_csum[] = {
> + VIRTIO_NET_F_GUEST_TSO4,
> + VIRTIO_NET_F_GUEST_TSO6,
> +...
2014 Nov 19
1
[PATCH V2 net] virtio-net: validate features during probe
...)
Yes, thanks for the catching.
>
>> + f, feature);
>> + return -EINVAL;
>> + }
>> + }
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static int virtnet_check_features(struct virtio_device *dev)
>> +{
>> + unsigned int features_for_ctrl_vq[] = {
>> + VIRTIO_NET_F_CTRL_RX,
>> + VIRTIO_NET_F_CTRL_VLAN,
>> + VIRTIO_NET_F_GUEST_ANNOUNCE,
>> + VIRTIO_NET_F_MQ,
>> + VIRTIO_NET_F_CTRL_MAC_ADDR
>> + };
>> + unsigned int features_for_guest_csum[] = {
>> + VIRTIO_NET_F_GUEST_TSO4,
>>...
2014 Nov 19
1
[PATCH V2 net] virtio-net: validate features during probe
...)
Yes, thanks for the catching.
>
>> + f, feature);
>> + return -EINVAL;
>> + }
>> + }
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static int virtnet_check_features(struct virtio_device *dev)
>> +{
>> + unsigned int features_for_ctrl_vq[] = {
>> + VIRTIO_NET_F_CTRL_RX,
>> + VIRTIO_NET_F_CTRL_VLAN,
>> + VIRTIO_NET_F_GUEST_ANNOUNCE,
>> + VIRTIO_NET_F_MQ,
>> + VIRTIO_NET_F_CTRL_MAC_ADDR
>> + };
>> + unsigned int features_for_guest_csum[] = {
>> + VIRTIO_NET_F_GUEST_TSO4,
>>...
2014 Nov 19
0
[PATCH net] virtio-net: validate features during probe
...as advertised but its dependency 0x%x was not",
This line's way too long.
> + f, feature);
> + return -EINVAL;
> + }
> + }
> + }
> +
> + return 0;
> +}
> +
> +static int virtnet_check_features(struct virtio_device *dev)
> +{
> + unsigned int features_for_ctrl_vq[] = {
> + VIRTIO_NET_F_CTRL_RX,
> + VIRTIO_NET_F_CTRL_VLAN,
> + VIRTIO_NET_F_GUEST_ANNOUNCE,
> + VIRTIO_NET_F_MQ,
> + VIRTIO_NET_F_CTRL_MAC_ADDR
> + };
> + unsigned int features_for_guest_csum[] = {
> + VIRTIO_NET_F_GUEST_TSO4,
> + VIRTIO_NET_F_GUEST_TSO6,
> +...
2014 Nov 19
2
[PATCH net] virtio-net: validate features during probe
...rbids quoted string to be
split)
>
>> + f, feature);
>> + return -EINVAL;
>> + }
>> + }
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static int virtnet_check_features(struct virtio_device *dev)
>> +{
>> + unsigned int features_for_ctrl_vq[] = {
>> + VIRTIO_NET_F_CTRL_RX,
>> + VIRTIO_NET_F_CTRL_VLAN,
>> + VIRTIO_NET_F_GUEST_ANNOUNCE,
>> + VIRTIO_NET_F_MQ,
>> + VIRTIO_NET_F_CTRL_MAC_ADDR
>> + };
>> + unsigned int features_for_guest_csum[] = {
>> + VIRTIO_NET_F_GUEST_TSO4,
>>...
2014 Nov 19
2
[PATCH net] virtio-net: validate features during probe
...rbids quoted string to be
split)
>
>> + f, feature);
>> + return -EINVAL;
>> + }
>> + }
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static int virtnet_check_features(struct virtio_device *dev)
>> +{
>> + unsigned int features_for_ctrl_vq[] = {
>> + VIRTIO_NET_F_CTRL_RX,
>> + VIRTIO_NET_F_CTRL_VLAN,
>> + VIRTIO_NET_F_GUEST_ANNOUNCE,
>> + VIRTIO_NET_F_MQ,
>> + VIRTIO_NET_F_CTRL_MAC_ADDR
>> + };
>> + unsigned int features_for_guest_csum[] = {
>> + VIRTIO_NET_F_GUEST_TSO4,
>>...
2014 Nov 19
0
[PATCH net] virtio-net: validate features during probe
...feature);
> >> + return -EINVAL;
> >> + }
> >> + }
> >> + }
> >> +
> >> + return 0;
> >> +}
> >> +
> >> +static int virtnet_check_features(struct virtio_device *dev)
> >> +{
> >> + unsigned int features_for_ctrl_vq[] = {
> >> + VIRTIO_NET_F_CTRL_RX,
> >> + VIRTIO_NET_F_CTRL_VLAN,
> >> + VIRTIO_NET_F_GUEST_ANNOUNCE,
> >> + VIRTIO_NET_F_MQ,
> >> + VIRTIO_NET_F_CTRL_MAC_ADDR
> >> + };
> >> + unsigned int features_for_guest_csum[] = {
> >&g...