net: switchdev: change fdb addr for a byte array
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 6 Aug 2015 05:44:02 +0000 (01:44 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Aug 2015 05:48:08 +0000 (22:48 -0700)
The address in the switchdev_obj_fdb structure is currently represented
as a pointer. Replacing it for a 6-byte array allows switchdev to carry
addresses directly read from hardware registers, not stored by the
switch chip driver (as in Rocker).

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker.c
include/net/switchdev.h
net/bridge/br_fdb.c
net/switchdev/switchdev.c

index b77e0e7..80bb25c 100644 (file)
@@ -4543,7 +4543,7 @@ static int rocker_port_fdb_dump(const struct rocker_port *rocker_port,
        hash_for_each_safe(rocker->fdb_tbl, bkt, tmp, found, entry) {
                if (found->key.pport != rocker_port->pport)
                        continue;
-               fdb->addr = found->key.addr;
+               ether_addr_copy(fdb->addr, found->key.addr);
                fdb->vid = rocker_port_vlan_to_vid(rocker_port,
                                                   found->key.vlan_id);
                err = obj->cb(rocker_port->dev, obj);
index 89da893..e90e1a0 100644 (file)
@@ -70,7 +70,7 @@ struct switchdev_obj {
                        u32 tb_id;
                } ipv4_fib;
                struct switchdev_obj_fdb {              /* PORT_FDB */
-                       const unsigned char *addr;
+                       u8 addr[ETH_ALEN];
                        u16 vid;
                } fdb;
        } u;
Simple merge
Simple merge