]> git.baikalelectronics.ru Git - kernel.git/commit
geneve: configure MTU based on a lower device
authorAlexey Kodanev <alexey.kodanev@oracle.com>
Thu, 19 Apr 2018 12:42:32 +0000 (15:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Apr 2018 15:20:05 +0000 (11:20 -0400)
commit453c8f64aed5e0971576c3a186539960ab20bd97
treed8bcd490b48b2f93f91f7da0e8e96ac7336958f3
parentecc35ea5bd86c938dd32876b33ffe0cb62f5bf0a
geneve: configure MTU based on a lower device

Currently, on a new link creation or when 'remote' address parameter
is updated, an MTU is not changed and always equals 1500. When a lower
device has a larger MTU, it might not be efficient, e.g. for UDP, and
requires the manual MTU adjustments to match the MTU of the lower
device.

This patch tries to automate this process, finds a lower device using
the 'remote' address parameter, then uses its MTU to tune GENEVE's MTU:
  * on a new link creation
  * when 'remote' parameter is changed

Also with this patch, the MTU from a user, on a new link creation, is
passed to geneve_change_mtu() where it is verified, and MTU adjustments
with a lower device is skipped in that case. Prior that change, it was
possible to set the invalid MTU values on a new link creation.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/geneve.c