Tag Archives: Real

[Realtek sdk-4.4.1] RTL8198D How to Fix pptp/l2tp HW checksum error issue

Problem description

For PPTP/L2TP device interfaces, the FC driver should not set netif_F_HW_Csum, because HW does not support calculating the TCP/UDP checksum encapsulated by PPTP/L2TP header. It provides a function to set which device interface does not set netif_F_HW_CSUM

Solution

File path: rtl819x/linux-4.4.x/drivers/net/ethernet/realtek/rtl86900/FleetConntrackDriver/src/rtk_fc_helper_ps.c

int rtk_set_hw_csum(char *dev_name)
{
    // It does not support hw checksum feature for wlan and pptp/l2tp interface
    // for RTK use application: PPP9~12 are used for PPTP/L2TP, hw checksum offload didn't
        support inner header update so we must NOT turn on it.
    if(strncmp(dev_name, "wlan", 4) && strncmp(dev_name, "ppp9", 4) && strncmp(dev_name,
        "ppp10", 5) && strncmp(dev_name, "ppp11", 5) && strncmp(dev_name, "ppp12", 5))
        return TRUE;
    else
        return FALSE;
}

SDK, PPTP/L2TP device interface name is ppp9 ~ ppp12. Therefore, if you modify the PPTP/L2TP device interface name (not ppp9 ~ ppp12), you should also modify the function RTK_set_hw_csum().