Deleted Added
full compact
flowtable.c (301538) flowtable.c (302372)
1/*-
2 * Copyright (c) 2014 Gleb Smirnoff <glebius@FreeBSD.org>
3 * Copyright (c) 2008-2010, BitGravity Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *

--- 19 unchanged lines hidden (view full) ---

28
29#include "opt_route.h"
30#include "opt_mpath.h"
31#include "opt_ddb.h"
32#include "opt_inet.h"
33#include "opt_inet6.h"
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2014 Gleb Smirnoff <glebius@FreeBSD.org>
3 * Copyright (c) 2008-2010, BitGravity Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *

--- 19 unchanged lines hidden (view full) ---

28
29#include "opt_route.h"
30#include "opt_mpath.h"
31#include "opt_ddb.h"
32#include "opt_inet.h"
33#include "opt_inet6.h"
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/net/flowtable.c 301538 2016-06-07 04:51:50Z sephe $");
36__FBSDID("$FreeBSD: head/sys/net/flowtable.c 302372 2016-07-06 14:09:49Z nwhitehorn $");
37
38#include <sys/param.h>
39#include <sys/types.h>
40#include <sys/bitstring.h>
41#include <sys/condvar.h>
42#include <sys/callout.h>
43#include <sys/hash.h>
44#include <sys/kernel.h>

--- 696 unchanged lines hidden (view full) ---

741{
742
743 ft->ft_table = malloc(ft->ft_size * sizeof(struct flist),
744 M_FTABLE, M_WAITOK);
745 for (int i = 0; i < ft->ft_size; i++)
746 ft->ft_table[i] = uma_zalloc(pcpu_zone_ptr, M_WAITOK | M_ZERO);
747
748 ft->ft_masks = uma_zalloc(pcpu_zone_ptr, M_WAITOK);
37
38#include <sys/param.h>
39#include <sys/types.h>
40#include <sys/bitstring.h>
41#include <sys/condvar.h>
42#include <sys/callout.h>
43#include <sys/hash.h>
44#include <sys/kernel.h>

--- 696 unchanged lines hidden (view full) ---

741{
742
743 ft->ft_table = malloc(ft->ft_size * sizeof(struct flist),
744 M_FTABLE, M_WAITOK);
745 for (int i = 0; i < ft->ft_size; i++)
746 ft->ft_table[i] = uma_zalloc(pcpu_zone_ptr, M_WAITOK | M_ZERO);
747
748 ft->ft_masks = uma_zalloc(pcpu_zone_ptr, M_WAITOK);
749 for (int i = 0; i < mp_ncpus; i++) {
749 CPU_FOREACH(i) {
750 bitstr_t **b;
751
752 b = zpcpu_get_cpu(ft->ft_masks, i);
753 *b = bit_alloc(ft->ft_size, M_FTABLE, M_WAITOK);
754 }
755 ft->ft_tmpmask = bit_alloc(ft->ft_size, M_FTABLE, M_WAITOK);
756}
757

--- 427 unchanged lines hidden ---
750 bitstr_t **b;
751
752 b = zpcpu_get_cpu(ft->ft_masks, i);
753 *b = bit_alloc(ft->ft_size, M_FTABLE, M_WAITOK);
754 }
755 ft->ft_tmpmask = bit_alloc(ft->ft_size, M_FTABLE, M_WAITOK);
756}
757

--- 427 unchanged lines hidden ---