* [PATCH net-next 0/4] switchdev: more (minor) cleanups
@ 2015-05-13 6:03 sfeldma
2015-05-13 6:03 ` [PATCH net-next 1/4] switchdev: sparse warning: make __switchdev_port_obj_add static sfeldma
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: sfeldma @ 2015-05-13 6:03 UTC (permalink / raw)
To: netdev; +Cc: jiri, ronen.arad
From: Scott Feldman <sfeldma@gmail.com>
Fix some sparse warnings and include some documentation review comments that
didn't get picked up in the switchdev Spring Cleanup series.
Scott Feldman (4):
switchdev: sparse warning: make __switchdev_port_obj_add static
switchdev: sparse warning: pass ipv4 fib dst as network-byte order
switchdev: align comment with other comments in block
switchdev: apply review comments on documentation
Documentation/networking/switchdev.txt | 7 +++++--
drivers/net/ethernet/rocker/rocker.c | 7 ++++---
include/net/switchdev.h | 2 +-
net/switchdev/switchdev.c | 7 ++++---
4 files changed, 14 insertions(+), 9 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next 1/4] switchdev: sparse warning: make __switchdev_port_obj_add static
2015-05-13 6:03 [PATCH net-next 0/4] switchdev: more (minor) cleanups sfeldma
@ 2015-05-13 6:03 ` sfeldma
2015-05-13 6:03 ` [PATCH net-next 2/4] switchdev: sparse warning: pass ipv4 fib dst as network-byte order sfeldma
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: sfeldma @ 2015-05-13 6:03 UTC (permalink / raw)
To: netdev; +Cc: jiri, ronen.arad
From: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
net/switchdev/switchdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 65d49d4..a267f77 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -188,7 +188,8 @@ int switchdev_port_attr_set(struct net_device *dev, struct switchdev_attr *attr)
}
EXPORT_SYMBOL_GPL(switchdev_port_attr_set);
-int __switchdev_port_obj_add(struct net_device *dev, struct switchdev_obj *obj)
+static int __switchdev_port_obj_add(struct net_device *dev,
+ struct switchdev_obj *obj)
{
const struct switchdev_ops *ops = dev->switchdev_ops;
struct net_device *lower_dev;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 2/4] switchdev: sparse warning: pass ipv4 fib dst as network-byte order
2015-05-13 6:03 [PATCH net-next 0/4] switchdev: more (minor) cleanups sfeldma
2015-05-13 6:03 ` [PATCH net-next 1/4] switchdev: sparse warning: make __switchdev_port_obj_add static sfeldma
@ 2015-05-13 6:03 ` sfeldma
2015-05-13 6:03 ` [PATCH net-next 3/4] switchdev: align comment with other comments in block sfeldma
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: sfeldma @ 2015-05-13 6:03 UTC (permalink / raw)
To: netdev; +Cc: jiri, ronen.arad
From: Scott Feldman <sfeldma@gmail.com>
And let driver convert it to host-byte order as needed.
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
drivers/net/ethernet/rocker/rocker.c | 7 ++++---
net/switchdev/switchdev.c | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 1fc006b..ca53393 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4471,7 +4471,7 @@ static int rocker_port_obj_add(struct net_device *dev,
case SWITCHDEV_OBJ_IPV4_FIB:
fib4 = &obj->ipv4_fib;
err = rocker_port_fib_ipv4(rocker_port, obj->trans,
- fib4->dst, fib4->dst_len,
+ htonl(fib4->dst), fib4->dst_len,
fib4->fi, fib4->tb_id, 0);
break;
default:
@@ -4525,8 +4525,9 @@ static int rocker_port_obj_del(struct net_device *dev,
case SWITCHDEV_OBJ_IPV4_FIB:
fib4 = &obj->ipv4_fib;
err = rocker_port_fib_ipv4(rocker_port, SWITCHDEV_TRANS_NONE,
- fib4->dst, fib4->dst_len, fib4->fi,
- fib4->tb_id, ROCKER_OP_FLAG_REMOVE);
+ htonl(fib4->dst), fib4->dst_len,
+ fib4->fi, fib4->tb_id,
+ ROCKER_OP_FLAG_REMOVE);
break;
default:
err = -EOPNOTSUPP;
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index a267f77..77f1b6e 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -645,7 +645,7 @@ int switchdev_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
struct switchdev_obj fib_obj = {
.id = SWITCHDEV_OBJ_IPV4_FIB,
.ipv4_fib = {
- .dst = htonl(dst),
+ .dst = dst,
.dst_len = dst_len,
.fi = fi,
.tos = tos,
@@ -699,7 +699,7 @@ int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
struct switchdev_obj fib_obj = {
.id = SWITCHDEV_OBJ_IPV4_FIB,
.ipv4_fib = {
- .dst = htonl(dst),
+ .dst = dst,
.dst_len = dst_len,
.fi = fi,
.tos = tos,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 3/4] switchdev: align comment with other comments in block
2015-05-13 6:03 [PATCH net-next 0/4] switchdev: more (minor) cleanups sfeldma
2015-05-13 6:03 ` [PATCH net-next 1/4] switchdev: sparse warning: make __switchdev_port_obj_add static sfeldma
2015-05-13 6:03 ` [PATCH net-next 2/4] switchdev: sparse warning: pass ipv4 fib dst as network-byte order sfeldma
@ 2015-05-13 6:03 ` sfeldma
2015-05-13 6:03 ` [PATCH net-next 4/4] switchdev: apply review comments on documentation sfeldma
2015-05-13 16:26 ` [PATCH net-next 0/4] switchdev: more (minor) cleanups David Miller
4 siblings, 0 replies; 6+ messages in thread
From: sfeldma @ 2015-05-13 6:03 UTC (permalink / raw)
To: netdev; +Cc: jiri, ronen.arad
From: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
include/net/switchdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 3b217b4..9f9a7cc5 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -53,7 +53,7 @@ struct switchdev_obj {
enum switchdev_obj_id id;
enum switchdev_trans trans;
union {
- struct switchdev_obj_vlan { /* PORT_VLAN */
+ struct switchdev_obj_vlan { /* PORT_VLAN */
u16 flags;
u16 vid_start;
u16 vid_end;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 4/4] switchdev: apply review comments on documentation
2015-05-13 6:03 [PATCH net-next 0/4] switchdev: more (minor) cleanups sfeldma
` (2 preceding siblings ...)
2015-05-13 6:03 ` [PATCH net-next 3/4] switchdev: align comment with other comments in block sfeldma
@ 2015-05-13 6:03 ` sfeldma
2015-05-13 16:26 ` [PATCH net-next 0/4] switchdev: more (minor) cleanups David Miller
4 siblings, 0 replies; 6+ messages in thread
From: sfeldma @ 2015-05-13 6:03 UTC (permalink / raw)
To: netdev; +Cc: jiri, ronen.arad
From: Scott Feldman <sfeldma@gmail.com>
There were a few review comments on the switchdev.txt documentation that
didn't get included with the Spring Cleanup series, so include them now.
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
Documentation/networking/switchdev.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
index b3e18c8..616f892 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -99,7 +99,7 @@ kernel pick the default netdev name, and let udev set the final name based on a
port attribute.
Using port PHYS name (ndo_get_phys_port_name) for the key is particularly
-useful for dynically-named ports where the device names it's ports based on
+useful for dynamically-named ports where the device names its ports based on
external configuration. For example, if a physical 40G port is split logically
into 4 10G ports, resulting in 4 port netdevs, the device can give a unique
name for each port using port PHYS name. The udev rule would be:
@@ -131,7 +131,7 @@ NETIF_F_NETNS_LOCAL
If the switchdev driver (and device) only supports offloading of the default
network namespace (netns), the driver should set this feature flag to prevent
the port netdev from being moved out of the default netns. A netns-aware
-driver/device would not set this flag and be resposible for partitioning
+driver/device would not set this flag and be responsible for partitioning
hardware to preserve netns containment. This means hardware cannot forward
traffic from a port in one namespace to another port in another namespace.
@@ -177,6 +177,9 @@ entries are installed, for example, using iproute2 bridge cmd:
bridge fdb add ADDR dev DEV [vlan VID] [self]
+XXX: what should be done if offloading this rule to hardware fails (for
+example, due to full capacity in hardware tables) ?
+
Note: by default, the bridge does not filter on VLAN and only bridges untagged
traffic. To enable VLAN support, turn on VLAN filtering:
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/4] switchdev: more (minor) cleanups
2015-05-13 6:03 [PATCH net-next 0/4] switchdev: more (minor) cleanups sfeldma
` (3 preceding siblings ...)
2015-05-13 6:03 ` [PATCH net-next 4/4] switchdev: apply review comments on documentation sfeldma
@ 2015-05-13 16:26 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-05-13 16:26 UTC (permalink / raw)
To: sfeldma; +Cc: netdev, jiri, ronen.arad
From: sfeldma@gmail.com
Date: Tue, 12 May 2015 23:03:50 -0700
> Fix some sparse warnings and include some documentation review comments that
> didn't get picked up in the switchdev Spring Cleanup series.
Series applied, thanks Scott.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-13 16:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13 6:03 [PATCH net-next 0/4] switchdev: more (minor) cleanups sfeldma
2015-05-13 6:03 ` [PATCH net-next 1/4] switchdev: sparse warning: make __switchdev_port_obj_add static sfeldma
2015-05-13 6:03 ` [PATCH net-next 2/4] switchdev: sparse warning: pass ipv4 fib dst as network-byte order sfeldma
2015-05-13 6:03 ` [PATCH net-next 3/4] switchdev: align comment with other comments in block sfeldma
2015-05-13 6:03 ` [PATCH net-next 4/4] switchdev: apply review comments on documentation sfeldma
2015-05-13 16:26 ` [PATCH net-next 0/4] switchdev: more (minor) cleanups 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).