netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vxlan: small improvements
@ 2014-10-16  9:00 roy.qing.li
  2014-10-16 13:05 ` Stephen Hemminger
  2014-10-16 14:05 ` Eric Dumazet
  0 siblings, 2 replies; 3+ messages in thread
From: roy.qing.li @ 2014-10-16  9:00 UTC (permalink / raw)
  To: netdev

From: Li RongQing <roy.qing.li@gmail.com>

1. remove the dead codes, pr_fmt definition and vxlan_salt variable
2. pskb_may_pull() can change skb->data, so we have to reload eth in vxlan_xmit.

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
 drivers/net/vxlan.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 77ab844..3a07fbf 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -8,8 +8,6 @@
  * published by the Free Software Foundation.
  */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/module.h>
@@ -152,8 +150,6 @@ struct vxlan_dev {
 	struct hlist_head fdb_head[FDB_HASH_SIZE];
 };
 
-/* salt for hash table */
-static u32 vxlan_salt __read_mostly;
 static struct workqueue_struct *vxlan_wq;
 
 static void vxlan_sock_work(struct work_struct *work);
@@ -1890,6 +1886,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
 #endif
 	}
 
+	eth = eth_hdr(skb);
 	f = vxlan_find_mac(vxlan, eth->h_dest);
 	did_rsc = false;
 
@@ -2797,8 +2794,6 @@ static int __init vxlan_init_module(void)
 	if (!vxlan_wq)
 		return -ENOMEM;
 
-	get_random_bytes(&vxlan_salt, sizeof(vxlan_salt));
-
 	rc = register_pernet_subsys(&vxlan_net_ops);
 	if (rc)
 		goto out1;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vxlan: small improvements
  2014-10-16  9:00 [PATCH] vxlan: small improvements roy.qing.li
@ 2014-10-16 13:05 ` Stephen Hemminger
  2014-10-16 14:05 ` Eric Dumazet
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2014-10-16 13:05 UTC (permalink / raw)
  To: roy.qing.li; +Cc: netdev

On Thu, 16 Oct 2014 17:00:44 +0800
roy.qing.li@gmail.com wrote:

> From: Li RongQing <roy.qing.li@gmail.com>
> 
> 1. remove the dead codes, pr_fmt definition and vxlan_salt variable
> 2. pskb_may_pull() can change skb->data, so we have to reload eth in vxlan_xmit.
> 
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>

You are doing 4 things in one patch.

The pr_fmt definition is standard way to identify where log messages orginate

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vxlan: small improvements
  2014-10-16  9:00 [PATCH] vxlan: small improvements roy.qing.li
  2014-10-16 13:05 ` Stephen Hemminger
@ 2014-10-16 14:05 ` Eric Dumazet
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2014-10-16 14:05 UTC (permalink / raw)
  To: roy.qing.li; +Cc: netdev

On Thu, 2014-10-16 at 17:00 +0800, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
> 
> 1. remove the dead codes, pr_fmt definition and vxlan_salt variable
> 2. pskb_may_pull() can change skb->data, so we have to reload eth in vxlan_xmit.

I do not see this particular bug in my tree ???

Wait, you added this in a recent commit. Please add

Fixes: 91269e390d062 ("vxlan: using pskb_may_pull as early as possible")

Do not be shy, or hide, try to ease stable teams work, please ?

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-16 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16  9:00 [PATCH] vxlan: small improvements roy.qing.li
2014-10-16 13:05 ` Stephen Hemminger
2014-10-16 14:05 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).