free5gc / go-upf

Apache License 2.0
21 stars 38 forks source link

Feature/add mtu #18

Closed khirono closed 2 years ago

free5gc-org commented 2 years ago

@khirono

How will UPF handle when no MTU setting in config file?

khirono commented 2 years ago

In that case, this PR will have no influence to MTU. You can use default MTU value set in the gtp5g_link_setup.

static void gtp5g_link_setup(struct net_device *dev)
{
    dev->netdev_ops = &gtp5g_netdev_ops;
    dev->needs_free_netdev = true;

    dev->hard_header_len = 0;
    dev->addr_len = 0;
    dev->mtu = ETH_DATA_LEN -
        (sizeof(struct iphdr) +
         sizeof(struct udphdr) +
         sizeof(struct gtpv1_hdr));