[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1497451621-4479-1-git-send-email-cugyly@163.com>
Date:   Wed, 14 Jun 2017 22:47:01 +0800
From:   yuan linyu <cugyly@....com>
To:     netdev@...r.kernel.org
Cc:     "David S . Miller" <davem@...emloft.net>,
        yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
Subject: [PATCH net-next 06/11] openvswitch: skb_put_zero() used to optimize code
From: yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
Signed-off-by: yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
---
 net/openvswitch/datapath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 9ddc9f8..d772e9a 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -413,7 +413,7 @@ static void pad_packet(struct datapath *dp, struct sk_buff *skb)
 		size_t plen = NLA_ALIGN(skb->len) - skb->len;
 
 		if (plen > 0)
-			memset(skb_put(skb, plen), 0, plen);
+			skb_put_zero(skb, plen);
 	}
 }
 
-- 
2.7.4
Powered by blists - more mailing lists
 
