diff options
Diffstat (limited to 'net/sched/act_skbedit.c')
-rw-r--r-- | net/sched/act_skbedit.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c index cb4221171f93..aa0a4c056f31 100644 --- a/net/sched/act_skbedit.c +++ b/net/sched/act_skbedit.c | |||
@@ -11,8 +11,7 @@ | |||
11 | * more details. | 11 | * more details. |
12 | * | 12 | * |
13 | * You should have received a copy of the GNU General Public License along with | 13 | * You should have received a copy of the GNU General Public License along with |
14 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | 14 | * this program; if not, see <http://www.gnu.org/licenses/>. |
15 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
16 | * | 15 | * |
17 | * Author: Alexander Duyck <alexander.h.duyck@intel.com> | 16 | * Author: Alexander Duyck <alexander.h.duyck@intel.com> |
18 | */ | 17 | */ |
@@ -29,15 +28,8 @@ | |||
29 | #include <net/tc_act/tc_skbedit.h> | 28 | #include <net/tc_act/tc_skbedit.h> |
30 | 29 | ||
31 | #define SKBEDIT_TAB_MASK 15 | 30 | #define SKBEDIT_TAB_MASK 15 |
32 | static struct tcf_common *tcf_skbedit_ht[SKBEDIT_TAB_MASK + 1]; | ||
33 | static u32 skbedit_idx_gen; | 31 | static u32 skbedit_idx_gen; |
34 | static DEFINE_RWLOCK(skbedit_lock); | 32 | static struct tcf_hashinfo skbedit_hash_info; |
35 | |||
36 | static struct tcf_hashinfo skbedit_hash_info = { | ||
37 | .htab = tcf_skbedit_ht, | ||
38 | .hmask = SKBEDIT_TAB_MASK, | ||
39 | .lock = &skbedit_lock, | ||
40 | }; | ||
41 | 33 | ||
42 | static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a, | 34 | static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a, |
43 | struct tcf_result *res) | 35 | struct tcf_result *res) |
@@ -203,7 +195,6 @@ static struct tc_action_ops act_skbedit_ops = { | |||
203 | .dump = tcf_skbedit_dump, | 195 | .dump = tcf_skbedit_dump, |
204 | .cleanup = tcf_skbedit_cleanup, | 196 | .cleanup = tcf_skbedit_cleanup, |
205 | .init = tcf_skbedit_init, | 197 | .init = tcf_skbedit_init, |
206 | .walk = tcf_generic_walker, | ||
207 | }; | 198 | }; |
208 | 199 | ||
209 | MODULE_AUTHOR("Alexander Duyck, <alexander.h.duyck@intel.com>"); | 200 | MODULE_AUTHOR("Alexander Duyck, <alexander.h.duyck@intel.com>"); |
@@ -212,11 +203,15 @@ MODULE_LICENSE("GPL"); | |||
212 | 203 | ||
213 | static int __init skbedit_init_module(void) | 204 | static int __init skbedit_init_module(void) |
214 | { | 205 | { |
206 | int err = tcf_hashinfo_init(&skbedit_hash_info, SKBEDIT_TAB_MASK); | ||
207 | if (err) | ||
208 | return err; | ||
215 | return tcf_register_action(&act_skbedit_ops); | 209 | return tcf_register_action(&act_skbedit_ops); |
216 | } | 210 | } |
217 | 211 | ||
218 | static void __exit skbedit_cleanup_module(void) | 212 | static void __exit skbedit_cleanup_module(void) |
219 | { | 213 | { |
214 | tcf_hashinfo_destroy(&skbedit_hash_info); | ||
220 | tcf_unregister_action(&act_skbedit_ops); | 215 | tcf_unregister_action(&act_skbedit_ops); |
221 | } | 216 | } |
222 | 217 | ||