Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1245899
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next v2 6/6] net: dsa: remove port_fdb_getnext |
| Date | 2015-10-13 18:50 +0200 |
| Message-ID | <qjaVX-3T8-1@gated-at.bofh.it> (permalink) |
| References | <qjaVX-3T8-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
No driver implements port_fdb_getnext anymore, and port_fdb_dump is
preferred anyway, so remove this function from DSA.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
include/net/dsa.h | 3 ---
net/dsa/slave.c | 25 +------------------------
2 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index c5c48c5..d8ab2f9 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -329,9 +329,6 @@ struct dsa_switch_driver {
struct switchdev_trans *trans);
int (*port_fdb_del)(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_fdb *fdb);
- int (*port_fdb_getnext)(struct dsa_switch *ds, int port,
- unsigned char *addr, u16 *vid,
- bool *is_static);
int (*port_fdb_dump)(struct dsa_switch *ds, int port,
struct switchdev_obj_port_fdb *fdb,
switchdev_obj_dump_cb_t *cb);
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index a4e3416..5908893 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -378,34 +378,11 @@ static int dsa_slave_port_fdb_dump(struct net_device *dev,
{
struct dsa_slave_priv *p = netdev_priv(dev);
struct dsa_switch *ds = p->parent;
- unsigned char addr[ETH_ALEN] = { 0 };
- u16 vid = 0;
- int ret;
if (ds->drv->port_fdb_dump)
return ds->drv->port_fdb_dump(ds, p->port, fdb, cb);
- if (!ds->drv->port_fdb_getnext)
- return -EOPNOTSUPP;
-
- for (;;) {
- bool is_static;
-
- ret = ds->drv->port_fdb_getnext(ds, p->port, addr, &vid,
- &is_static);
- if (ret < 0)
- break;
-
- fdb->addr = addr;
- fdb->vid = vid;
- fdb->ndm_state = is_static ? NUD_NOARP : NUD_REACHABLE;
-
- ret = cb(&fdb->obj);
- if (ret < 0)
- break;
- }
-
- return ret == -ENOENT ? 0 : ret;
+ return -EOPNOTSUPP;
}
static int dsa_slave_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
--
2.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH net-next v2 6/6] net: dsa: remove port_fdb_getnext Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-10-13 18:50 +0200 Re: [PATCH net-next v2 6/6] net: dsa: remove port_fdb_getnext Florian Fainelli <f.fainelli@gmail.com> - 2015-10-14 21:00 +0200
csiph-web