Skip to content

Commit

Permalink
neigh: remove dynamic neigh table registration support
Browse files Browse the repository at this point in the history
Currently there are only three neigh tables in the whole kernel:
arp table, ndisc table and decnet neigh table. What's more,
we don't support registering multiple tables per family.
Therefore we can just make these tables statically built-in.

Cc: David S. Miller <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
congwang authored and davem330 committed Nov 11, 2014
1 parent b2e2f0c commit d7480fd
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 142 deletions.
11 changes: 9 additions & 2 deletions include/net/neighbour.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ struct neigh_table {
struct pneigh_entry **phash_buckets;
};

enum {
NEIGH_ARP_TABLE = 0,
NEIGH_ND_TABLE = 1,
NEIGH_DN_TABLE = 2,
NEIGH_NR_TABLES,
};

static inline int neigh_parms_family(struct neigh_parms *p)
{
return p->tbl->family;
Expand All @@ -240,8 +247,8 @@ static inline void *neighbour_priv(const struct neighbour *n)
#define NEIGH_UPDATE_F_ISROUTER 0x40000000
#define NEIGH_UPDATE_F_ADMIN 0x80000000

void neigh_table_init(struct neigh_table *tbl);
int neigh_table_clear(struct neigh_table *tbl);
void neigh_table_init(int index, struct neigh_table *tbl);
int neigh_table_clear(int index, struct neigh_table *tbl);
struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
struct net_device *dev);
struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
Expand Down
Loading

0 comments on commit d7480fd

Please sign in to comment.