Deleted Added
full compact
sfxge_rx.c (302408) sfxge_rx.c (310831)
1/*-
2 * Copyright (c) 2010-2016 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * This software was developed in part by Philip Paeps under contract for
6 * Solarflare Communications, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

27 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * The views and conclusions contained in the software and documentation are
30 * those of the authors and should not be interpreted as representing official
31 * policies, either expressed or implied, of the FreeBSD Project.
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2010-2016 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * This software was developed in part by Philip Paeps under contract for
6 * Solarflare Communications, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

27 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * The views and conclusions contained in the software and documentation are
30 * those of the authors and should not be interpreted as representing official
31 * policies, either expressed or implied, of the FreeBSD Project.
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: stable/11/sys/dev/sfxge/sfxge_rx.c 301493 2016-06-06 09:07:26Z arybchik $");
35__FBSDID("$FreeBSD: stable/11/sys/dev/sfxge/sfxge_rx.c 310831 2016-12-30 17:26:19Z arybchik $");
36
37#include "opt_rss.h"
38
39#include <sys/param.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/smp.h>
43#include <sys/socket.h>

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

1123 else if (reserved <= MJUM9BYTES)
1124 sc->rx_cluster_size = MJUM9BYTES;
1125 else
1126 sc->rx_cluster_size = MJUM16BYTES;
1127
1128 /*
1129 * Set up the scale table. Enable all hash types and hash insertion.
1130 */
36
37#include "opt_rss.h"
38
39#include <sys/param.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/smp.h>
43#include <sys/socket.h>

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

1123 else if (reserved <= MJUM9BYTES)
1124 sc->rx_cluster_size = MJUM9BYTES;
1125 else
1126 sc->rx_cluster_size = MJUM16BYTES;
1127
1128 /*
1129 * Set up the scale table. Enable all hash types and hash insertion.
1130 */
1131 for (index = 0; index < SFXGE_RX_SCALE_MAX; index++)
1131 for (index = 0; index < nitems(sc->rx_indir_table); index++)
1132#ifdef RSS
1133 sc->rx_indir_table[index] =
1134 rss_get_indirection_to_bucket(index) % sc->rxq_count;
1135#else
1136 sc->rx_indir_table[index] = index % sc->rxq_count;
1137#endif
1138 if ((rc = efx_rx_scale_tbl_set(sc->enp, sc->rx_indir_table,
1132#ifdef RSS
1133 sc->rx_indir_table[index] =
1134 rss_get_indirection_to_bucket(index) % sc->rxq_count;
1135#else
1136 sc->rx_indir_table[index] = index % sc->rxq_count;
1137#endif
1138 if ((rc = efx_rx_scale_tbl_set(sc->enp, sc->rx_indir_table,
1139 SFXGE_RX_SCALE_MAX)) != 0)
1139 nitems(sc->rx_indir_table))) != 0)
1140 goto fail;
1141 (void)efx_rx_scale_mode_set(sc->enp, EFX_RX_HASHALG_TOEPLITZ,
1142 (1 << EFX_RX_HASH_IPV4) | (1 << EFX_RX_HASH_TCPIPV4) |
1143 (1 << EFX_RX_HASH_IPV6) | (1 << EFX_RX_HASH_TCPIPV6), B_TRUE);
1144
1145#ifdef RSS
1146 rss_getkey(toep_key);
1147#endif

--- 273 unchanged lines hidden ---
1140 goto fail;
1141 (void)efx_rx_scale_mode_set(sc->enp, EFX_RX_HASHALG_TOEPLITZ,
1142 (1 << EFX_RX_HASH_IPV4) | (1 << EFX_RX_HASH_TCPIPV4) |
1143 (1 << EFX_RX_HASH_IPV6) | (1 << EFX_RX_HASH_TCPIPV6), B_TRUE);
1144
1145#ifdef RSS
1146 rss_getkey(toep_key);
1147#endif

--- 273 unchanged lines hidden ---