
From: Miaohe Lin <linmiaohe@huawei.com> EulerOS inclusion category: performance bugzilla: https://gitee.com/openeuler/kernel/issues/ICMI9V -------------------------------- Ipvlan l2e mode will cache skbuff for local xmit in ipvlan_xmit_mode_l2e. But when tso/gso is disabled, this would result in performance loss. So we should stop caching the skbuff when tso/gso is disabled. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> --- drivers/net/ipvlan/ipvlan_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c index 5d4831a..bd93e4d 100644 --- a/drivers/net/ipvlan/ipvlan_core.c +++ b/drivers/net/ipvlan/ipvlan_core.c @@ -814,8 +814,9 @@ static int ipvlan_xmit_mode_l2e(struct sk_buff *skb, struct net_device *dev) return NET_XMIT_DROP; } - if (unlikely(ipvlan_l2e_local_xmit_event(ipvlan, - &skb))) + if (unlikely((dev->features & + (NETIF_F_GSO | NETIF_F_TSO)) && + ipvlan_l2e_local_xmit_event(ipvlan, &skb))) return NET_XMIT_DROP; return ipvlan_rcv_frame(addr, &skb, true); } -- 2.9.5