neighbour.c (96916090f488986a4ebb8e9ffa6a3b50881d5ccd) | neighbour.c (5efdccbcda20d3e5fbaa85f726dcc9cfeb005577) |
---|---|
1/* 2 * Generic address resolution entity 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 7 * 8 * This program is free software; you can redistribute it and/or --- 1416 unchanged lines hidden (view full) --- 1425 kmem_cache_create(tbl->id, tbl->entry_size, 0, 1426 SLAB_HWCACHE_ALIGN|SLAB_PANIC, 1427 NULL); 1428 tbl->stats = alloc_percpu(struct neigh_statistics); 1429 if (!tbl->stats) 1430 panic("cannot create neighbour cache statistics"); 1431 1432#ifdef CONFIG_PROC_FS | 1/* 2 * Generic address resolution entity 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 7 * 8 * This program is free software; you can redistribute it and/or --- 1416 unchanged lines hidden (view full) --- 1425 kmem_cache_create(tbl->id, tbl->entry_size, 0, 1426 SLAB_HWCACHE_ALIGN|SLAB_PANIC, 1427 NULL); 1428 tbl->stats = alloc_percpu(struct neigh_statistics); 1429 if (!tbl->stats) 1430 panic("cannot create neighbour cache statistics"); 1431 1432#ifdef CONFIG_PROC_FS |
1433 tbl->pde = proc_create(tbl->id, 0, init_net.proc_net_stat, 1434 &neigh_stat_seq_fops); | 1433 tbl->pde = proc_create_data(tbl->id, 0, init_net.proc_net_stat, 1434 &neigh_stat_seq_fops, tbl); |
1435 if (!tbl->pde) 1436 panic("cannot create neighbour proc dir entry"); | 1435 if (!tbl->pde) 1436 panic("cannot create neighbour proc dir entry"); |
1437 tbl->pde->data = tbl; | |
1438#endif 1439 1440 tbl->hash_mask = 1; 1441 tbl->hash_buckets = neigh_hash_alloc(tbl->hash_mask + 1); 1442 1443 phsize = (PNEIGH_HASHMASK + 1) * sizeof(struct pneigh_entry *); 1444 tbl->phash_buckets = kzalloc(phsize, GFP_KERNEL); 1445 --- 1388 unchanged lines hidden --- | 1437#endif 1438 1439 tbl->hash_mask = 1; 1440 tbl->hash_buckets = neigh_hash_alloc(tbl->hash_mask + 1); 1441 1442 phsize = (PNEIGH_HASHMASK + 1) * sizeof(struct pneigh_entry *); 1443 tbl->phash_buckets = kzalloc(phsize, GFP_KERNEL); 1444 --- 1388 unchanged lines hidden --- |