[PATCH OLK-6.6] ipvlan: disable l2e local xmit

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

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17138 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/QLS... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/17138 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/QLS...
participants (2)
-
patchwork bot
-
Zhang Changzhong