search for: ip_max_mtu

Displaying 8 results from an estimated 8 matches for "ip_max_mtu".

2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...gt; @@ -1748,6 +1736,9 @@ static bool virtnet_validate_features(struct virtio_device *vdev) > > return true; > > } > > > > +#define MIN_MTU ETH_MIN_MTU > > +#define MAX_MTU 65535 > > + > > Do we need a common macro for this? I think it's actually IP_MAX_MTU. > > static int virtnet_probe(struct virtio_device *vdev) > > { > > int i, err; > > @@ -1821,6 +1812,10 @@ static int virtnet_probe(struct virtio_device *vdev) > > > > dev->vlan_features = dev->features; > > > > + /* MTU range: 68 - 6...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...gt; @@ -1748,6 +1736,9 @@ static bool virtnet_validate_features(struct virtio_device *vdev) > > return true; > > } > > > > +#define MIN_MTU ETH_MIN_MTU > > +#define MAX_MTU 65535 > > + > > Do we need a common macro for this? I think it's actually IP_MAX_MTU. > > static int virtnet_probe(struct virtio_device *vdev) > > { > > int i, err; > > @@ -1821,6 +1812,10 @@ static int virtnet_probe(struct virtio_device *vdev) > > > > dev->vlan_features = dev->features; > > > > + /* MTU range: 68 - 6...
2017 Mar 29
1
[PATCH] virtio_net: fix support for small rings
...le buffer header is used. + */ +static unsigned int mergeable_min_buf_len(struct virtnet_info *vi, struct virtqueue *vq) +{ + const unsigned int hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + unsigned int rq_size = virtqueue_get_vring_size(vq); + unsigned int packet_len = vi->big_packets ? IP_MAX_MTU : vi->dev->max_mtu; + unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; + unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); + + return max(min_buf_len, hdr_len); +} + static int virtnet_find_vqs(struct virtnet_info *vi) { vq_callback_t **callbacks; @@ -2151,6 +2...
2017 Mar 29
1
[PATCH] virtio_net: fix support for small rings
...le buffer header is used. + */ +static unsigned int mergeable_min_buf_len(struct virtnet_info *vi, struct virtqueue *vq) +{ + const unsigned int hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + unsigned int rq_size = virtqueue_get_vring_size(vq); + unsigned int packet_len = vi->big_packets ? IP_MAX_MTU : vi->dev->max_mtu; + unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; + unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); + + return max(min_buf_len, hdr_len); +} + static int virtnet_find_vqs(struct virtnet_info *vi) { vq_callback_t **callbacks; @@ -2151,6 +2...
2017 Mar 29
1
[PATCH v2] virtio_net: fix support for small rings
...le buffer header is used. + */ +static unsigned int mergeable_min_buf_len(struct virtnet_info *vi, struct virtqueue *vq) +{ + const unsigned int hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + unsigned int rq_size = virtqueue_get_vring_size(vq); + unsigned int packet_len = vi->big_packets ? IP_MAX_MTU : vi->dev->max_mtu; + unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; + unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); + + return max(min_buf_len, hdr_len); +} + static int virtnet_find_vqs(struct virtnet_info *vi) { vq_callback_t **callbacks; @@ -2151,6 +2...
2017 Mar 29
1
[PATCH v2] virtio_net: fix support for small rings
...le buffer header is used. + */ +static unsigned int mergeable_min_buf_len(struct virtnet_info *vi, struct virtqueue *vq) +{ + const unsigned int hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + unsigned int rq_size = virtqueue_get_vring_size(vq); + unsigned int packet_len = vi->big_packets ? IP_MAX_MTU : vi->dev->max_mtu; + unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; + unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); + + return max(min_buf_len, hdr_len); +} + static int virtnet_find_vqs(struct virtnet_info *vi) { vq_callback_t **callbacks; @@ -2151,6 +2...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
hyperv_net: - set min/max_mtu virtio_net: - set min/max_mtu - remove virtnet_change_mtu vmxnet3: - set min/max_mtu CC: netdev at vger.kernel.org CC: virtualization at lists.linux-foundation.org CC: "K. Y. Srinivasan" <kys at microsoft.com> CC: Haiyang Zhang <haiyangz at microsoft.com> CC: "Michael S. Tsirkin" <mst at redhat.com> CC: Shrikrishna Khare
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
hyperv_net: - set min/max_mtu virtio_net: - set min/max_mtu - remove virtnet_change_mtu vmxnet3: - set min/max_mtu CC: netdev at vger.kernel.org CC: virtualization at lists.linux-foundation.org CC: "K. Y. Srinivasan" <kys at microsoft.com> CC: Haiyang Zhang <haiyangz at microsoft.com> CC: "Michael S. Tsirkin" <mst at redhat.com> CC: Shrikrishna Khare