netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue
@ 2015-03-06  9:14 sfeldma
  2015-03-06  9:14 ` [PATCH net-next 2/2] rocker: fix some sparse warnings sfeldma
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: sfeldma @ 2015-03-06  9:14 UTC (permalink / raw)
  To: netdev, davem, jiri

From: Scott Feldman <sfeldma@gmail.com>

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
 net/switchdev/switchdev.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index f4fd575..19e4e72 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -309,8 +309,12 @@ int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
 	 * IPv4 FIB offloading has been disabled completely.
 	 */
 
-	if (fi->fib_net->ipv4.fib_has_custom_rules |
-	    fi->fib_net->ipv4.fib_offload_disabled)
+#ifdef CONFIG_IP_MULTIPLE_TABLES
+	if (fi->fib_net->ipv4.fib_has_custom_rules)
+		return 0;
+#endif
+
+	if (fi->fib_net->ipv4.fib_offload_disabled)
 		return 0;
 
 	dev = netdev_switch_get_dev_by_nhs(fi);
-- 
1.7.10.4

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

* [PATCH net-next 2/2] rocker: fix some sparse warnings
  2015-03-06  9:14 [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue sfeldma
@ 2015-03-06  9:14 ` sfeldma
  2015-03-06 11:52   ` Jiri Pirko
  2015-03-06 17:44   ` David Miller
  2015-03-06 11:49 ` [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue Jiri Pirko
  2015-03-06 17:44 ` David Miller
  2 siblings, 2 replies; 6+ messages in thread
From: sfeldma @ 2015-03-06  9:14 UTC (permalink / raw)
  To: netdev, davem, jiri

From: Scott Feldman <sfeldma@gmail.com>

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
 drivers/net/ethernet/rocker/rocker.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index d04d3b3..cc1bbfd 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -2737,7 +2737,7 @@ static struct rocker_neigh_tbl_entry *
 {
 	struct rocker_neigh_tbl_entry *found;
 
-	hash_for_each_possible(rocker->neigh_tbl, found, entry, ip_addr)
+	hash_for_each_possible(rocker->neigh_tbl, found, entry, (u32)ip_addr)
 		if (found->ip_addr == ip_addr)
 			return found;
 
@@ -2749,7 +2749,7 @@ static void _rocker_neigh_add(struct rocker *rocker,
 {
 	entry->index = rocker->neigh_tbl_next_index++;
 	entry->ref_count++;
-	hash_add(rocker->neigh_tbl, &entry->entry, entry->ip_addr);
+	hash_add(rocker->neigh_tbl, &entry->entry, (u32)entry->ip_addr);
 }
 
 static void _rocker_neigh_del(struct rocker *rocker,
@@ -2868,7 +2868,7 @@ static int rocker_port_ipv4_resolve(struct rocker_port *rocker_port,
 				    __be32 ip_addr)
 {
 	struct net_device *dev = rocker_port->dev;
-	struct neighbour *n = __ipv4_neigh_lookup(dev, ip_addr);
+	struct neighbour *n = __ipv4_neigh_lookup(dev, (u32)ip_addr);
 	int err = 0;
 
 	if (!n)
-- 
1.7.10.4

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

* Re: [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue
  2015-03-06  9:14 [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue sfeldma
  2015-03-06  9:14 ` [PATCH net-next 2/2] rocker: fix some sparse warnings sfeldma
@ 2015-03-06 11:49 ` Jiri Pirko
  2015-03-06 17:44 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: Jiri Pirko @ 2015-03-06 11:49 UTC (permalink / raw)
  To: sfeldma; +Cc: netdev, davem

Fri, Mar 06, 2015 at 10:14:36AM CET, sfeldma@gmail.com wrote:
>From: Scott Feldman <sfeldma@gmail.com>
>
>Signed-off-by: Scott Feldman <sfeldma@gmail.com>


Acked-by: Jiri Pirko <jiri@resnulli.us>

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

* Re: [PATCH net-next 2/2] rocker: fix some sparse warnings
  2015-03-06  9:14 ` [PATCH net-next 2/2] rocker: fix some sparse warnings sfeldma
@ 2015-03-06 11:52   ` Jiri Pirko
  2015-03-06 17:44   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: Jiri Pirko @ 2015-03-06 11:52 UTC (permalink / raw)
  To: sfeldma; +Cc: netdev, davem

Fri, Mar 06, 2015 at 10:14:37AM CET, sfeldma@gmail.com wrote:
>From: Scott Feldman <sfeldma@gmail.com>
>
>Signed-off-by: Scott Feldman <sfeldma@gmail.com>

Acked-by: Jiri Pirko <jiri@resnulli.us>

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

* Re: [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue
  2015-03-06  9:14 [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue sfeldma
  2015-03-06  9:14 ` [PATCH net-next 2/2] rocker: fix some sparse warnings sfeldma
  2015-03-06 11:49 ` [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue Jiri Pirko
@ 2015-03-06 17:44 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-03-06 17:44 UTC (permalink / raw)
  To: sfeldma; +Cc: netdev, jiri

From: sfeldma@gmail.com
Date: Fri,  6 Mar 2015 01:14:36 -0800

> From: Scott Feldman <sfeldma@gmail.com>
> 
> Signed-off-by: Scott Feldman <sfeldma@gmail.com>

Applied.

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

* Re: [PATCH net-next 2/2] rocker: fix some sparse warnings
  2015-03-06  9:14 ` [PATCH net-next 2/2] rocker: fix some sparse warnings sfeldma
  2015-03-06 11:52   ` Jiri Pirko
@ 2015-03-06 17:44   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2015-03-06 17:44 UTC (permalink / raw)
  To: sfeldma; +Cc: netdev, jiri

From: sfeldma@gmail.com
Date: Fri,  6 Mar 2015 01:14:37 -0800

> From: Scott Feldman <sfeldma@gmail.com>
> 
> Signed-off-by: Scott Feldman <sfeldma@gmail.com>

Applied.

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

end of thread, other threads:[~2015-03-06 17:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-06  9:14 [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue sfeldma
2015-03-06  9:14 ` [PATCH net-next 2/2] rocker: fix some sparse warnings sfeldma
2015-03-06 11:52   ` Jiri Pirko
2015-03-06 17:44   ` David Miller
2015-03-06 11:49 ` [PATCH net-next 1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue Jiri Pirko
2015-03-06 17:44 ` David Miller

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).