Dor Laor wrote:
> Michael Tokarev wrote:
>> Right now (2.6.27), there's no way to change MTU of a
>> virtio-net interface, since the mtu-changing method is
>> not provided. Is there a simple way to add such a
>> beast?
>>
> It should be a nice easy patch for mtu < 4k.
> You can just implement a 'change_mtu' handler like:
>
> static int virtio_change_mtu(struct net_device *netdev, int new_mtu)
> {
> if(new_mtu < ETH_ZLEN || new_mtu > PAGE_SIZE)
> return -EINVAL;
> netdev->mtu = new_mtu;
> return 0;
> }
Well, this isn't enough I think. That is, new_mtu's upper cap should be
less than PAGE_SIZE due to various additional data structures. But it
is enough to start playing.
I just added the above method, which allowed me to set MTU to 3500
(arbitrary). But it still does not work. In guest, I see the
following while pinging it from host with `ping -s2000':
16:26:57.952684 IP truncated-ip - 528 bytes missing! 81.13.33.145 >
81.13.33.150: ICMP echo request, id 12869, seq 19, length 2008
16:26:58.954133 IP truncated-ip - 528 bytes missing! 81.13.33.145 >
81.13.33.150: ICMP echo request, id 12869, seq 20, length 2008
...
So something else has to be changed for this to work, it seems.
That's why I wrote:
>> I'm asking because I'm not familiar with the internals,
[...]
;)
Thanks!
/mjt
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html