Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/if_ixlv.c
Show All 32 Lines | |||||
/*$FreeBSD$*/ | /*$FreeBSD$*/ | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_rss.h" | #include "opt_rss.h" | ||||
#include "ixl.h" | #include "ixl.h" | ||||
#include "ixlv.h" | #include "ixlv.h" | ||||
#ifdef RSS | |||||
#include <net/rss_config.h> | |||||
#endif /* RSS */ | |||||
/********************************************************************* | /********************************************************************* | ||||
* Driver version | * Driver version | ||||
*********************************************************************/ | *********************************************************************/ | ||||
char ixlv_driver_version[] = "1.2.0"; | char ixlv_driver_version[] = "1.2.0"; | ||||
/********************************************************************* | /********************************************************************* | ||||
* PCI Device ID Table | * PCI Device ID Table | ||||
* | * | ||||
▲ Show 20 Lines • Show All 2,546 Lines • ▼ Show 20 Lines | #ifdef RSS | ||||
if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4) | if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4) | ||||
set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); | set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); | ||||
if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) | if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) | ||||
set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); | set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); | ||||
if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) | if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) | ||||
set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); | set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); | ||||
if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) | if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) | ||||
set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); | set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); | ||||
#if 0 | |||||
if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) | if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) | ||||
set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; | set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; | ||||
#endif | |||||
#else | #else | ||||
set_hena = | set_hena = | ||||
((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | | ||||
((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | | ||||
((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP) | | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP) | | ||||
((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | | ||||
((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4) | | ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4) | | ||||
((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | | ||||
Show All 15 Lines | for (i = 0, j = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++, j++) { | ||||
j = 0; | j = 0; | ||||
#ifdef RSS | #ifdef RSS | ||||
/* | /* | ||||
* Fetch the RSS bucket id for the given indirection entry. | * Fetch the RSS bucket id for the given indirection entry. | ||||
* Cap it at the number of configured buckets (which is | * Cap it at the number of configured buckets (which is | ||||
* num_queues.) | * num_queues.) | ||||
*/ | */ | ||||
que_id = rss_get_indirection_to_bucket(i); | que_id = rss_get_indirection_to_bucket(i); | ||||
que_id = que_id % adapter->num_queues; | que_id = que_id % vsi->num_queues; | ||||
#else | #else | ||||
que_id = j; | que_id = j; | ||||
#endif | #endif | ||||
/* lut = 4-byte sliding window of 4 lut entries */ | /* lut = 4-byte sliding window of 4 lut entries */ | ||||
lut = (lut << 8) | (que_id & 0xF); | lut = (lut << 8) | (que_id & 0xF); | ||||
/* On i = 3, we have 4 entries in lut; write to the register */ | /* On i = 3, we have 4 entries in lut; write to the register */ | ||||
if ((i & 3) == 3) { | if ((i & 3) == 3) { | ||||
wr32(hw, I40E_VFQF_HLUT(i), lut); | wr32(hw, I40E_VFQF_HLUT(i), lut); | ||||
▲ Show 20 Lines • Show All 322 Lines • Show Last 20 Lines |