mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-06-09 (ice, i40e, ixgbe, iavf) Jake moves from individual virtchnl RSS configuration values, for ice, i40e, and iavf, to a common libie location and values. Martyna and Dawid add counters for link_down_events to ice, i40e, and ixgbe drivers. The counter increments only on actual physical link-down events visible to the PHY. It does not increment when the user performs a software-only interface down/up (e.g. ip link set dev down). The counter does increment in cases where the interface is reinitialized in a way that causes a real link drop - such as eg. when attaching an XDP program, reconfiguring channels, or toggling certain priv-flags. For ice: Arkadiusz and Karol separate PTP and DPLL functionality to their respective APIs. Michal adds a separate handler for Flow Director command processing. For iavf: Ahmed converts driver to utilize core's IRQ affinity API. For ixgbe: Alok Tiwari fixes issues with some comments; typos, copy/paste errors, etc. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ixgbe: Fix typos and clarify comments in X550 driver code iavf: convert to NAPI IRQ affinity API ice: add a separate Rx handler for flow director commands ice: add ice driver PTP pin documentation ice: change SMA pins to SDP in PTP API ice: redesign dpll sma/u.fl pins control ixgbe: add link_down_events statistic i40e: add link_down_events statistic ice: add link_down_events statistic net: intel: move RSS packet classifier types to libie net: intel: rename 'hena' to 'hashcfg' for clarity ==================== Link: https://patch.msgid.link/20250609212652.1138933-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -927,6 +927,19 @@ To enable/disable UDP Segmentation Offload, issue the following command::
|
||||
|
||||
# ethtool -K <ethX> tx-udp-segmentation [off|on]
|
||||
|
||||
PTP pin interface
|
||||
-----------------
|
||||
All adapters support standard PTP pin interface. SDPs (Software Definable Pin)
|
||||
are single ended pins with both periodic output and external timestamp
|
||||
supported. There are also specific differential input/output pins (TIME_SYNC,
|
||||
1PPS) with only one of the functions supported.
|
||||
|
||||
There are adapters with DPLL, where pins are connected to the DPLL instead of
|
||||
being exposed on the board. You have to be aware that in those configurations,
|
||||
only SDP pins are exposed and each pin has its own fixed direction.
|
||||
To see input signal on those PTP pins, you need to configure DPLL properly.
|
||||
Output signal is only visible on DPLL and to send it to the board SMA/U.FL pins,
|
||||
DPLL output pins have to be manually configured.
|
||||
|
||||
GNSS module
|
||||
-----------
|
||||
|
||||
@@ -548,6 +548,7 @@ struct i40e_pf {
|
||||
u16 empr_count; /* EMP reset count */
|
||||
u16 pfr_count; /* PF reset count */
|
||||
u16 sw_int_count; /* SW interrupt count */
|
||||
u32 link_down_events;
|
||||
|
||||
struct mutex switch_mutex;
|
||||
u16 lan_vsi; /* our default LAN VSI */
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
/* ethtool support for i40e */
|
||||
|
||||
#include <linux/net/intel/libie/pctype.h>
|
||||
#include "i40e_devids.h"
|
||||
#include "i40e_diag.h"
|
||||
#include "i40e_txrx_common.h"
|
||||
@@ -2749,6 +2750,15 @@ skip_ol_tests:
|
||||
netif_info(pf, drv, netdev, "testing failed\n");
|
||||
}
|
||||
|
||||
static void i40e_get_link_ext_stats(struct net_device *netdev,
|
||||
struct ethtool_link_ext_stats *stats)
|
||||
{
|
||||
struct i40e_netdev_priv *np = netdev_priv(netdev);
|
||||
struct i40e_pf *pf = np->vsi->back;
|
||||
|
||||
stats->link_down_events = pf->link_down_events;
|
||||
}
|
||||
|
||||
static void i40e_get_wol(struct net_device *netdev,
|
||||
struct ethtool_wolinfo *wol)
|
||||
{
|
||||
@@ -3146,16 +3156,16 @@ static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd)
|
||||
|
||||
switch (cmd->flow_type) {
|
||||
case TCP_V4_FLOW:
|
||||
flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
|
||||
flow_pctype = LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP;
|
||||
break;
|
||||
case UDP_V4_FLOW:
|
||||
flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
|
||||
flow_pctype = LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP;
|
||||
break;
|
||||
case TCP_V6_FLOW:
|
||||
flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_TCP;
|
||||
flow_pctype = LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP;
|
||||
break;
|
||||
case UDP_V6_FLOW:
|
||||
flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_UDP;
|
||||
flow_pctype = LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP;
|
||||
break;
|
||||
case SCTP_V4_FLOW:
|
||||
case AH_ESP_V4_FLOW:
|
||||
@@ -3412,28 +3422,28 @@ static int i40e_get_ethtool_fdir_entry(struct i40e_pf *pf,
|
||||
|
||||
switch (rule->flow_type) {
|
||||
case SCTP_V4_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV4_SCTP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP;
|
||||
break;
|
||||
case TCP_V4_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP;
|
||||
break;
|
||||
case UDP_V4_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP;
|
||||
break;
|
||||
case SCTP_V6_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV6_SCTP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP;
|
||||
break;
|
||||
case TCP_V6_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV6_TCP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP;
|
||||
break;
|
||||
case UDP_V6_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV6_UDP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP;
|
||||
break;
|
||||
case IP_USER_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV4_OTHER;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER;
|
||||
break;
|
||||
case IPV6_USER_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV6_OTHER;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER;
|
||||
break;
|
||||
default:
|
||||
/* If we have stored a filter with a flow type not listed here
|
||||
@@ -3643,40 +3653,40 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
|
||||
|
||||
switch (nfc->flow_type) {
|
||||
case TCP_V4_FLOW:
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_IPV4_TCP, flow_pctypes);
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP, flow_pctypes);
|
||||
if (test_bit(I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE,
|
||||
pf->hw.caps))
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK,
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK,
|
||||
flow_pctypes);
|
||||
break;
|
||||
case TCP_V6_FLOW:
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_IPV6_TCP, flow_pctypes);
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP, flow_pctypes);
|
||||
if (test_bit(I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE,
|
||||
pf->hw.caps))
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK,
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK,
|
||||
flow_pctypes);
|
||||
break;
|
||||
case UDP_V4_FLOW:
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_IPV4_UDP, flow_pctypes);
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP, flow_pctypes);
|
||||
if (test_bit(I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE,
|
||||
pf->hw.caps)) {
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP,
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP,
|
||||
flow_pctypes);
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP,
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP,
|
||||
flow_pctypes);
|
||||
}
|
||||
hena |= BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4);
|
||||
hena |= BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV4);
|
||||
break;
|
||||
case UDP_V6_FLOW:
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_IPV6_UDP, flow_pctypes);
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP, flow_pctypes);
|
||||
if (test_bit(I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE,
|
||||
pf->hw.caps)) {
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP,
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP,
|
||||
flow_pctypes);
|
||||
set_bit(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP,
|
||||
set_bit(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP,
|
||||
flow_pctypes);
|
||||
}
|
||||
hena |= BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6);
|
||||
hena |= BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV6);
|
||||
break;
|
||||
case AH_ESP_V4_FLOW:
|
||||
case AH_V4_FLOW:
|
||||
@@ -3685,7 +3695,7 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
|
||||
if ((nfc->data & RXH_L4_B_0_1) ||
|
||||
(nfc->data & RXH_L4_B_2_3))
|
||||
return -EINVAL;
|
||||
hena |= BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_OTHER);
|
||||
hena |= BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER);
|
||||
break;
|
||||
case AH_ESP_V6_FLOW:
|
||||
case AH_V6_FLOW:
|
||||
@@ -3694,15 +3704,15 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
|
||||
if ((nfc->data & RXH_L4_B_0_1) ||
|
||||
(nfc->data & RXH_L4_B_2_3))
|
||||
return -EINVAL;
|
||||
hena |= BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_OTHER);
|
||||
hena |= BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER);
|
||||
break;
|
||||
case IPV4_FLOW:
|
||||
hena |= BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) |
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4);
|
||||
hena |= BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER) |
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV4);
|
||||
break;
|
||||
case IPV6_FLOW:
|
||||
hena |= BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) |
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6);
|
||||
hena |= BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER) |
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV6);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -4312,36 +4322,36 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
|
||||
|
||||
switch (fsp->flow_type & ~FLOW_EXT) {
|
||||
case SCTP_V4_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV4_SCTP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP;
|
||||
fdir_filter_count = &pf->fd_sctp4_filter_cnt;
|
||||
break;
|
||||
case TCP_V4_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP;
|
||||
fdir_filter_count = &pf->fd_tcp4_filter_cnt;
|
||||
break;
|
||||
case UDP_V4_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP;
|
||||
fdir_filter_count = &pf->fd_udp4_filter_cnt;
|
||||
break;
|
||||
case SCTP_V6_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV6_SCTP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP;
|
||||
fdir_filter_count = &pf->fd_sctp6_filter_cnt;
|
||||
break;
|
||||
case TCP_V6_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV6_TCP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP;
|
||||
fdir_filter_count = &pf->fd_tcp6_filter_cnt;
|
||||
break;
|
||||
case UDP_V6_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV6_UDP;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP;
|
||||
fdir_filter_count = &pf->fd_udp6_filter_cnt;
|
||||
break;
|
||||
case IP_USER_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV4_OTHER;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER;
|
||||
fdir_filter_count = &pf->fd_ip4_filter_cnt;
|
||||
flex_l3 = true;
|
||||
break;
|
||||
case IPV6_USER_FLOW:
|
||||
index = I40E_FILTER_PCTYPE_NONF_IPV6_OTHER;
|
||||
index = LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER;
|
||||
fdir_filter_count = &pf->fd_ip6_filter_cnt;
|
||||
flex_l3 = true;
|
||||
break;
|
||||
@@ -4677,8 +4687,8 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
|
||||
* separate support, we'll always assume and enforce that the two flow
|
||||
* types must have matching input sets.
|
||||
*/
|
||||
if (index == I40E_FILTER_PCTYPE_NONF_IPV4_OTHER)
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_FRAG_IPV4,
|
||||
if (index == LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER)
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_FRAG_IPV4,
|
||||
new_mask);
|
||||
|
||||
/* Add the new offset and update table, if necessary */
|
||||
@@ -5809,6 +5819,7 @@ static const struct ethtool_ops i40e_ethtool_ops = {
|
||||
.get_regs = i40e_get_regs,
|
||||
.nway_reset = i40e_nway_reset,
|
||||
.get_link = ethtool_op_get_link,
|
||||
.get_link_ext_stats = i40e_get_link_ext_stats,
|
||||
.get_wol = i40e_get_wol,
|
||||
.set_wol = i40e_set_wol,
|
||||
.set_eeprom = i40e_set_eeprom,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <generated/utsrelease.h>
|
||||
#include <linux/crash_dump.h>
|
||||
#include <linux/net/intel/libie/pctype.h>
|
||||
#include <linux/if_bridge.h>
|
||||
#include <linux/if_macvlan.h>
|
||||
#include <linux/module.h>
|
||||
@@ -9188,47 +9189,47 @@ static void i40e_fdir_filter_exit(struct i40e_pf *pf)
|
||||
i40e_reset_fdir_filter_cnt(pf);
|
||||
|
||||
/* Reprogram the default input set for TCP/IPv4 */
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV4_TCP,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP,
|
||||
I40E_L3_SRC_MASK | I40E_L3_DST_MASK |
|
||||
I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
|
||||
|
||||
/* Reprogram the default input set for TCP/IPv6 */
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV6_TCP,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP,
|
||||
I40E_L3_V6_SRC_MASK | I40E_L3_V6_DST_MASK |
|
||||
I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
|
||||
|
||||
/* Reprogram the default input set for UDP/IPv4 */
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV4_UDP,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP,
|
||||
I40E_L3_SRC_MASK | I40E_L3_DST_MASK |
|
||||
I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
|
||||
|
||||
/* Reprogram the default input set for UDP/IPv6 */
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV6_UDP,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP,
|
||||
I40E_L3_V6_SRC_MASK | I40E_L3_V6_DST_MASK |
|
||||
I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
|
||||
|
||||
/* Reprogram the default input set for SCTP/IPv4 */
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV4_SCTP,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP,
|
||||
I40E_L3_SRC_MASK | I40E_L3_DST_MASK |
|
||||
I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
|
||||
|
||||
/* Reprogram the default input set for SCTP/IPv6 */
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV6_SCTP,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP,
|
||||
I40E_L3_V6_SRC_MASK | I40E_L3_V6_DST_MASK |
|
||||
I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
|
||||
|
||||
/* Reprogram the default input set for Other/IPv4 */
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV4_OTHER,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER,
|
||||
I40E_L3_SRC_MASK | I40E_L3_DST_MASK);
|
||||
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_FRAG_IPV4,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_FRAG_IPV4,
|
||||
I40E_L3_SRC_MASK | I40E_L3_DST_MASK);
|
||||
|
||||
/* Reprogram the default input set for Other/IPv6 */
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV6_OTHER,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER,
|
||||
I40E_L3_SRC_MASK | I40E_L3_DST_MASK);
|
||||
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_FRAG_IPV6,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_FRAG_IPV6,
|
||||
I40E_L3_SRC_MASK | I40E_L3_DST_MASK);
|
||||
}
|
||||
|
||||
@@ -9656,7 +9657,7 @@ static void i40e_reenable_fdir_atr(struct i40e_pf *pf)
|
||||
* settings. It is safe to restore the default input set
|
||||
* because there are no active TCPv4 filter rules.
|
||||
*/
|
||||
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV4_TCP,
|
||||
i40e_write_fd_input_set(pf, LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP,
|
||||
I40E_L3_SRC_MASK | I40E_L3_DST_MASK |
|
||||
I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
|
||||
|
||||
@@ -9959,6 +9960,9 @@ static void i40e_link_event(struct i40e_pf *pf)
|
||||
new_link == netif_carrier_ok(vsi->netdev)))
|
||||
return;
|
||||
|
||||
if (!new_link && old_link)
|
||||
pf->link_down_events++;
|
||||
|
||||
i40e_print_link_message(vsi, new_link);
|
||||
|
||||
/* Notify the base of the switch tree connected to
|
||||
@@ -12507,7 +12511,7 @@ static int i40e_pf_config_rss(struct i40e_pf *pf)
|
||||
/* By default we enable TCP/UDP with IPv4/IPv6 ptypes */
|
||||
hena = (u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0)) |
|
||||
((u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1)) << 32);
|
||||
hena |= i40e_pf_get_default_rss_hena(pf);
|
||||
hena |= i40e_pf_get_default_rss_hashcfg(pf);
|
||||
|
||||
i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (u32)hena);
|
||||
i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32));
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright(c) 2013 - 2018 Intel Corporation. */
|
||||
|
||||
#include <linux/bpf_trace.h>
|
||||
#include <linux/net/intel/libie/pctype.h>
|
||||
#include <linux/net/intel/libie/rx.h>
|
||||
#include <linux/prefetch.h>
|
||||
#include <linux/sctp.h>
|
||||
@@ -397,12 +398,12 @@ static int i40e_add_del_fdir_udp(struct i40e_vsi *vsi,
|
||||
ret = i40e_prepare_fdir_filter
|
||||
(pf, fd_data, add, raw_packet,
|
||||
I40E_UDPIP_DUMMY_PACKET_LEN,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV4_UDP);
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP);
|
||||
else
|
||||
ret = i40e_prepare_fdir_filter
|
||||
(pf, fd_data, add, raw_packet,
|
||||
I40E_UDPIP6_DUMMY_PACKET_LEN,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV6_UDP);
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP);
|
||||
|
||||
if (ret) {
|
||||
kfree(raw_packet);
|
||||
@@ -444,12 +445,12 @@ static int i40e_add_del_fdir_tcp(struct i40e_vsi *vsi,
|
||||
ret = i40e_prepare_fdir_filter
|
||||
(pf, fd_data, add, raw_packet,
|
||||
I40E_TCPIP_DUMMY_PACKET_LEN,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV4_TCP);
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP);
|
||||
else
|
||||
ret = i40e_prepare_fdir_filter
|
||||
(pf, fd_data, add, raw_packet,
|
||||
I40E_TCPIP6_DUMMY_PACKET_LEN,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV6_TCP);
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP);
|
||||
|
||||
if (ret) {
|
||||
kfree(raw_packet);
|
||||
@@ -499,12 +500,12 @@ static int i40e_add_del_fdir_sctp(struct i40e_vsi *vsi,
|
||||
ret = i40e_prepare_fdir_filter
|
||||
(pf, fd_data, add, raw_packet,
|
||||
I40E_SCTPIP_DUMMY_PACKET_LEN,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV4_SCTP);
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP);
|
||||
else
|
||||
ret = i40e_prepare_fdir_filter
|
||||
(pf, fd_data, add, raw_packet,
|
||||
I40E_SCTPIP6_DUMMY_PACKET_LEN,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV6_SCTP);
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP);
|
||||
|
||||
if (ret) {
|
||||
kfree(raw_packet);
|
||||
@@ -543,11 +544,11 @@ static int i40e_add_del_fdir_ip(struct i40e_vsi *vsi,
|
||||
int i;
|
||||
|
||||
if (ipv4) {
|
||||
iter_start = I40E_FILTER_PCTYPE_NONF_IPV4_OTHER;
|
||||
iter_end = I40E_FILTER_PCTYPE_FRAG_IPV4;
|
||||
iter_start = LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER;
|
||||
iter_end = LIBIE_FILTER_PCTYPE_FRAG_IPV4;
|
||||
} else {
|
||||
iter_start = I40E_FILTER_PCTYPE_NONF_IPV6_OTHER;
|
||||
iter_end = I40E_FILTER_PCTYPE_FRAG_IPV6;
|
||||
iter_start = LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER;
|
||||
iter_end = LIBIE_FILTER_PCTYPE_FRAG_IPV6;
|
||||
}
|
||||
|
||||
for (i = iter_start; i <= iter_end; i++) {
|
||||
@@ -2948,9 +2949,9 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
|
||||
flex_ptype = FIELD_PREP(I40E_TXD_FLTR_QW0_QINDEX_MASK,
|
||||
tx_ring->queue_index);
|
||||
flex_ptype |= (tx_flags & I40E_TX_FLAGS_IPV4) ?
|
||||
(I40E_FILTER_PCTYPE_NONF_IPV4_TCP <<
|
||||
(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP <<
|
||||
I40E_TXD_FLTR_QW0_PCTYPE_SHIFT) :
|
||||
(I40E_FILTER_PCTYPE_NONF_IPV6_TCP <<
|
||||
(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP <<
|
||||
I40E_TXD_FLTR_QW0_PCTYPE_SHIFT);
|
||||
|
||||
flex_ptype |= tx_ring->vsi->id << I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#ifndef _I40E_TXRX_H_
|
||||
#define _I40E_TXRX_H_
|
||||
|
||||
#include <linux/net/intel/libie/pctype.h>
|
||||
#include <net/xdp.h>
|
||||
#include "i40e_type.h"
|
||||
|
||||
@@ -71,30 +72,30 @@ enum i40e_dyn_idx {
|
||||
#define I40E_SW_ITR I40E_IDX_ITR2
|
||||
|
||||
/* Supported RSS offloads */
|
||||
#define I40E_DEFAULT_RSS_HENA ( \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_SCTP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_L2_PAYLOAD))
|
||||
#define I40E_DEFAULT_RSS_HASHCFG ( \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV4) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV6) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_L2_PAYLOAD))
|
||||
|
||||
#define I40E_DEFAULT_RSS_HENA_EXPANDED (I40E_DEFAULT_RSS_HENA | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \
|
||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
|
||||
#define I40E_DEFAULT_RSS_HASHCFG_EXPANDED (I40E_DEFAULT_RSS_HASHCFG | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
|
||||
|
||||
#define i40e_pf_get_default_rss_hena(pf) \
|
||||
#define i40e_pf_get_default_rss_hashcfg(pf) \
|
||||
(test_bit(I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE, (pf)->hw.caps) ? \
|
||||
I40E_DEFAULT_RSS_HENA_EXPANDED : I40E_DEFAULT_RSS_HENA)
|
||||
I40E_DEFAULT_RSS_HASHCFG_EXPANDED : I40E_DEFAULT_RSS_HASHCFG)
|
||||
|
||||
/* Supported Rx Buffer Sizes (a multiple of 128) */
|
||||
#define I40E_RXBUFFER_256 256
|
||||
|
||||
@@ -929,38 +929,6 @@ struct i40e_filter_program_desc {
|
||||
#define I40E_TXD_FLTR_QW0_PCTYPE_MASK (0x3FUL << \
|
||||
I40E_TXD_FLTR_QW0_PCTYPE_SHIFT)
|
||||
|
||||
/* Packet Classifier Types for filters */
|
||||
enum i40e_filter_pctype {
|
||||
/* Note: Values 0-28 are reserved for future use.
|
||||
* Value 29, 30, 32 are not supported on XL710 and X710.
|
||||
*/
|
||||
I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP = 29,
|
||||
I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP = 30,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV4_UDP = 31,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK = 32,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV4_TCP = 33,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV4_SCTP = 34,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV4_OTHER = 35,
|
||||
I40E_FILTER_PCTYPE_FRAG_IPV4 = 36,
|
||||
/* Note: Values 37-38 are reserved for future use.
|
||||
* Value 39, 40, 42 are not supported on XL710 and X710.
|
||||
*/
|
||||
I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP = 39,
|
||||
I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP = 40,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK = 42,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
|
||||
I40E_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
|
||||
I40E_FILTER_PCTYPE_FRAG_IPV6 = 46,
|
||||
/* Note: Value 47 is reserved for future use */
|
||||
I40E_FILTER_PCTYPE_FCOE_OX = 48,
|
||||
I40E_FILTER_PCTYPE_FCOE_RX = 49,
|
||||
I40E_FILTER_PCTYPE_FCOE_OTHER = 50,
|
||||
/* Note: Values 51-62 are reserved for future use */
|
||||
I40E_FILTER_PCTYPE_L2_PAYLOAD = 63,
|
||||
};
|
||||
|
||||
enum i40e_filter_program_desc_dest {
|
||||
I40E_FILTER_PROGRAM_DESC_DEST_DROP_PACKET = 0x0,
|
||||
I40E_FILTER_PROGRAM_DESC_DEST_DIRECT_PACKET_QINDEX = 0x1,
|
||||
|
||||
@@ -812,7 +812,7 @@ static int i40e_alloc_vsi_res(struct i40e_vf *vf, u8 idx)
|
||||
}
|
||||
|
||||
if (!idx) {
|
||||
u64 hena = i40e_pf_get_default_rss_hena(pf);
|
||||
u64 hashcfg = i40e_pf_get_default_rss_hashcfg(pf);
|
||||
u8 broadcast[ETH_ALEN];
|
||||
|
||||
vf->lan_vsi_idx = vsi->idx;
|
||||
@@ -841,8 +841,9 @@ static int i40e_alloc_vsi_res(struct i40e_vf *vf, u8 idx)
|
||||
dev_info(&pf->pdev->dev,
|
||||
"Could not allocate VF broadcast filter\n");
|
||||
spin_unlock_bh(&vsi->mac_filter_hash_lock);
|
||||
wr32(&pf->hw, I40E_VFQF_HENA1(0, vf->vf_id), (u32)hena);
|
||||
wr32(&pf->hw, I40E_VFQF_HENA1(1, vf->vf_id), (u32)(hena >> 32));
|
||||
wr32(&pf->hw, I40E_VFQF_HENA1(0, vf->vf_id), (u32)hashcfg);
|
||||
wr32(&pf->hw, I40E_VFQF_HENA1(1, vf->vf_id),
|
||||
(u32)(hashcfg >> 32));
|
||||
/* program mac filter only for VF VSI */
|
||||
ret = i40e_sync_vsi_filters(vsi);
|
||||
if (ret)
|
||||
@@ -3447,15 +3448,15 @@ err:
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_vc_get_rss_hena
|
||||
* i40e_vc_get_rss_hashcfg
|
||||
* @vf: pointer to the VF info
|
||||
* @msg: pointer to the msg buffer
|
||||
*
|
||||
* Return the RSS HENA bits allowed by the hardware
|
||||
* Return the RSS Hash configuration bits allowed by the hardware
|
||||
**/
|
||||
static int i40e_vc_get_rss_hena(struct i40e_vf *vf, u8 *msg)
|
||||
static int i40e_vc_get_rss_hashcfg(struct i40e_vf *vf, u8 *msg)
|
||||
{
|
||||
struct virtchnl_rss_hena *vrh = NULL;
|
||||
struct virtchnl_rss_hashcfg *vrh = NULL;
|
||||
struct i40e_pf *pf = vf->pf;
|
||||
int aq_ret = 0;
|
||||
int len = 0;
|
||||
@@ -3464,7 +3465,7 @@ static int i40e_vc_get_rss_hena(struct i40e_vf *vf, u8 *msg)
|
||||
aq_ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
len = sizeof(struct virtchnl_rss_hena);
|
||||
len = sizeof(struct virtchnl_rss_hashcfg);
|
||||
|
||||
vrh = kzalloc(len, GFP_KERNEL);
|
||||
if (!vrh) {
|
||||
@@ -3472,26 +3473,26 @@ static int i40e_vc_get_rss_hena(struct i40e_vf *vf, u8 *msg)
|
||||
len = 0;
|
||||
goto err;
|
||||
}
|
||||
vrh->hena = i40e_pf_get_default_rss_hena(pf);
|
||||
vrh->hashcfg = i40e_pf_get_default_rss_hashcfg(pf);
|
||||
err:
|
||||
/* send the response back to the VF */
|
||||
aq_ret = i40e_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HENA_CAPS,
|
||||
aq_ret = i40e_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS,
|
||||
aq_ret, (u8 *)vrh, len);
|
||||
kfree(vrh);
|
||||
return aq_ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_vc_set_rss_hena
|
||||
* i40e_vc_set_rss_hashcfg
|
||||
* @vf: pointer to the VF info
|
||||
* @msg: pointer to the msg buffer
|
||||
*
|
||||
* Set the RSS HENA bits for the VF
|
||||
* Set the RSS Hash configuration bits for the VF
|
||||
**/
|
||||
static int i40e_vc_set_rss_hena(struct i40e_vf *vf, u8 *msg)
|
||||
static int i40e_vc_set_rss_hashcfg(struct i40e_vf *vf, u8 *msg)
|
||||
{
|
||||
struct virtchnl_rss_hena *vrh =
|
||||
(struct virtchnl_rss_hena *)msg;
|
||||
struct virtchnl_rss_hashcfg *vrh =
|
||||
(struct virtchnl_rss_hashcfg *)msg;
|
||||
struct i40e_pf *pf = vf->pf;
|
||||
struct i40e_hw *hw = &pf->hw;
|
||||
int aq_ret = 0;
|
||||
@@ -3500,13 +3501,14 @@ static int i40e_vc_set_rss_hena(struct i40e_vf *vf, u8 *msg)
|
||||
aq_ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(0, vf->vf_id), (u32)vrh->hena);
|
||||
i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(0, vf->vf_id),
|
||||
(u32)vrh->hashcfg);
|
||||
i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(1, vf->vf_id),
|
||||
(u32)(vrh->hena >> 32));
|
||||
(u32)(vrh->hashcfg >> 32));
|
||||
|
||||
/* send the response to the VF */
|
||||
err:
|
||||
return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_SET_RSS_HENA, aq_ret);
|
||||
return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_SET_RSS_HASHCFG, aq_ret);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4253,11 +4255,11 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
|
||||
case VIRTCHNL_OP_CONFIG_RSS_LUT:
|
||||
ret = i40e_vc_config_rss_lut(vf, msg);
|
||||
break;
|
||||
case VIRTCHNL_OP_GET_RSS_HENA_CAPS:
|
||||
ret = i40e_vc_get_rss_hena(vf, msg);
|
||||
case VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS:
|
||||
ret = i40e_vc_get_rss_hashcfg(vf, msg);
|
||||
break;
|
||||
case VIRTCHNL_OP_SET_RSS_HENA:
|
||||
ret = i40e_vc_set_rss_hena(vf, msg);
|
||||
case VIRTCHNL_OP_SET_RSS_HASHCFG:
|
||||
ret = i40e_vc_set_rss_hashcfg(vf, msg);
|
||||
break;
|
||||
case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING:
|
||||
ret = i40e_vc_enable_vlan_stripping(vf, msg);
|
||||
|
||||
@@ -114,8 +114,6 @@ struct iavf_q_vector {
|
||||
u16 reg_idx; /* register index of the interrupt */
|
||||
char name[IFNAMSIZ + 15];
|
||||
bool arm_wb_state;
|
||||
cpumask_t affinity_mask;
|
||||
struct irq_affinity_notify affinity_notify;
|
||||
};
|
||||
|
||||
/* Helper macros to switch between ints/sec and what the register uses.
|
||||
@@ -315,8 +313,8 @@ struct iavf_adapter {
|
||||
#define IAVF_FLAG_AQ_CONFIGURE_RSS BIT_ULL(9) /* direct AQ config */
|
||||
#define IAVF_FLAG_AQ_GET_CONFIG BIT_ULL(10)
|
||||
/* Newer style, RSS done by the PF so we can ignore hardware vagaries. */
|
||||
#define IAVF_FLAG_AQ_GET_HENA BIT_ULL(11)
|
||||
#define IAVF_FLAG_AQ_SET_HENA BIT_ULL(12)
|
||||
#define IAVF_FLAG_AQ_GET_RSS_HASHCFG BIT_ULL(11)
|
||||
#define IAVF_FLAG_AQ_SET_RSS_HASHCFG BIT_ULL(12)
|
||||
#define IAVF_FLAG_AQ_SET_RSS_KEY BIT_ULL(13)
|
||||
#define IAVF_FLAG_AQ_SET_RSS_LUT BIT_ULL(14)
|
||||
#define IAVF_FLAG_AQ_SET_RSS_HFUNC BIT_ULL(15)
|
||||
@@ -456,7 +454,7 @@ struct iavf_adapter {
|
||||
u32 aq_wait_count;
|
||||
/* RSS stuff */
|
||||
enum virtchnl_rss_algorithm hfunc;
|
||||
u64 hena;
|
||||
u64 rss_hashcfg;
|
||||
u16 rss_key_size;
|
||||
u16 rss_lut_size;
|
||||
u8 *rss_key;
|
||||
@@ -600,8 +598,8 @@ void iavf_set_promiscuous(struct iavf_adapter *adapter);
|
||||
bool iavf_promiscuous_mode_changed(struct iavf_adapter *adapter);
|
||||
void iavf_request_stats(struct iavf_adapter *adapter);
|
||||
int iavf_request_reset(struct iavf_adapter *adapter);
|
||||
void iavf_get_hena(struct iavf_adapter *adapter);
|
||||
void iavf_set_hena(struct iavf_adapter *adapter);
|
||||
void iavf_get_rss_hashcfg(struct iavf_adapter *adapter);
|
||||
void iavf_set_rss_hashcfg(struct iavf_adapter *adapter);
|
||||
void iavf_set_rss_key(struct iavf_adapter *adapter);
|
||||
void iavf_set_rss_lut(struct iavf_adapter *adapter);
|
||||
void iavf_set_rss_hfunc(struct iavf_adapter *adapter);
|
||||
|
||||
@@ -527,33 +527,6 @@ static void iavf_map_rings_to_vectors(struct iavf_adapter *adapter)
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_MAP_VECTORS;
|
||||
}
|
||||
|
||||
/**
|
||||
* iavf_irq_affinity_notify - Callback for affinity changes
|
||||
* @notify: context as to what irq was changed
|
||||
* @mask: the new affinity mask
|
||||
*
|
||||
* This is a callback function used by the irq_set_affinity_notifier function
|
||||
* so that we may register to receive changes to the irq affinity masks.
|
||||
**/
|
||||
static void iavf_irq_affinity_notify(struct irq_affinity_notify *notify,
|
||||
const cpumask_t *mask)
|
||||
{
|
||||
struct iavf_q_vector *q_vector =
|
||||
container_of(notify, struct iavf_q_vector, affinity_notify);
|
||||
|
||||
cpumask_copy(&q_vector->affinity_mask, mask);
|
||||
}
|
||||
|
||||
/**
|
||||
* iavf_irq_affinity_release - Callback for affinity notifier release
|
||||
* @ref: internal core kernel usage
|
||||
*
|
||||
* This is a callback function used by the irq_set_affinity_notifier function
|
||||
* to inform the current notification subscriber that they will no longer
|
||||
* receive notifications.
|
||||
**/
|
||||
static void iavf_irq_affinity_release(struct kref *ref) {}
|
||||
|
||||
/**
|
||||
* iavf_request_traffic_irqs - Initialize MSI-X interrupts
|
||||
* @adapter: board private structure
|
||||
@@ -568,7 +541,6 @@ iavf_request_traffic_irqs(struct iavf_adapter *adapter, char *basename)
|
||||
unsigned int vector, q_vectors;
|
||||
unsigned int rx_int_idx = 0, tx_int_idx = 0;
|
||||
int irq_num, err;
|
||||
int cpu;
|
||||
|
||||
iavf_irq_disable(adapter);
|
||||
/* Decrement for Other and TCP Timer vectors */
|
||||
@@ -603,17 +575,6 @@ iavf_request_traffic_irqs(struct iavf_adapter *adapter, char *basename)
|
||||
"Request_irq failed, error: %d\n", err);
|
||||
goto free_queue_irqs;
|
||||
}
|
||||
/* register for affinity change notifications */
|
||||
q_vector->affinity_notify.notify = iavf_irq_affinity_notify;
|
||||
q_vector->affinity_notify.release =
|
||||
iavf_irq_affinity_release;
|
||||
irq_set_affinity_notifier(irq_num, &q_vector->affinity_notify);
|
||||
/* Spread the IRQ affinity hints across online CPUs. Note that
|
||||
* get_cpu_mask returns a mask with a permanent lifetime so
|
||||
* it's safe to use as a hint for irq_update_affinity_hint.
|
||||
*/
|
||||
cpu = cpumask_local_spread(q_vector->v_idx, -1);
|
||||
irq_update_affinity_hint(irq_num, get_cpu_mask(cpu));
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -622,8 +583,6 @@ free_queue_irqs:
|
||||
while (vector) {
|
||||
vector--;
|
||||
irq_num = adapter->msix_entries[vector + NONQ_VECS].vector;
|
||||
irq_set_affinity_notifier(irq_num, NULL);
|
||||
irq_update_affinity_hint(irq_num, NULL);
|
||||
free_irq(irq_num, &adapter->q_vectors[vector]);
|
||||
}
|
||||
return err;
|
||||
@@ -665,6 +624,7 @@ static int iavf_request_misc_irq(struct iavf_adapter *adapter)
|
||||
**/
|
||||
static void iavf_free_traffic_irqs(struct iavf_adapter *adapter)
|
||||
{
|
||||
struct iavf_q_vector *q_vector;
|
||||
int vector, irq_num, q_vectors;
|
||||
|
||||
if (!adapter->msix_entries)
|
||||
@@ -673,10 +633,10 @@ static void iavf_free_traffic_irqs(struct iavf_adapter *adapter)
|
||||
q_vectors = adapter->num_msix_vectors - NONQ_VECS;
|
||||
|
||||
for (vector = 0; vector < q_vectors; vector++) {
|
||||
q_vector = &adapter->q_vectors[vector];
|
||||
netif_napi_set_irq_locked(&q_vector->napi, -1);
|
||||
irq_num = adapter->msix_entries[vector + NONQ_VECS].vector;
|
||||
irq_set_affinity_notifier(irq_num, NULL);
|
||||
irq_update_affinity_hint(irq_num, NULL);
|
||||
free_irq(irq_num, &adapter->q_vectors[vector]);
|
||||
free_irq(irq_num, q_vector);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1823,12 +1783,13 @@ static int iavf_init_rss(struct iavf_adapter *adapter)
|
||||
/* Enable PCTYPES for RSS, TCP/UDP with IPv4/IPv6 */
|
||||
if (adapter->vf_res->vf_cap_flags &
|
||||
VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2)
|
||||
adapter->hena = IAVF_DEFAULT_RSS_HENA_EXPANDED;
|
||||
adapter->rss_hashcfg =
|
||||
IAVF_DEFAULT_RSS_HASHCFG_EXPANDED;
|
||||
else
|
||||
adapter->hena = IAVF_DEFAULT_RSS_HENA;
|
||||
adapter->rss_hashcfg = IAVF_DEFAULT_RSS_HASHCFG;
|
||||
|
||||
wr32(hw, IAVF_VFQF_HENA(0), (u32)adapter->hena);
|
||||
wr32(hw, IAVF_VFQF_HENA(1), (u32)(adapter->hena >> 32));
|
||||
wr32(hw, IAVF_VFQF_HENA(0), (u32)adapter->rss_hashcfg);
|
||||
wr32(hw, IAVF_VFQF_HENA(1), (u32)(adapter->rss_hashcfg >> 32));
|
||||
}
|
||||
|
||||
iavf_fill_rss_lut(adapter);
|
||||
@@ -1846,7 +1807,7 @@ static int iavf_init_rss(struct iavf_adapter *adapter)
|
||||
**/
|
||||
static int iavf_alloc_q_vectors(struct iavf_adapter *adapter)
|
||||
{
|
||||
int q_idx = 0, num_q_vectors;
|
||||
int q_idx = 0, num_q_vectors, irq_num;
|
||||
struct iavf_q_vector *q_vector;
|
||||
|
||||
num_q_vectors = adapter->num_msix_vectors - NONQ_VECS;
|
||||
@@ -1856,14 +1817,15 @@ static int iavf_alloc_q_vectors(struct iavf_adapter *adapter)
|
||||
return -ENOMEM;
|
||||
|
||||
for (q_idx = 0; q_idx < num_q_vectors; q_idx++) {
|
||||
irq_num = adapter->msix_entries[q_idx + NONQ_VECS].vector;
|
||||
q_vector = &adapter->q_vectors[q_idx];
|
||||
q_vector->adapter = adapter;
|
||||
q_vector->vsi = &adapter->vsi;
|
||||
q_vector->v_idx = q_idx;
|
||||
q_vector->reg_idx = q_idx;
|
||||
cpumask_copy(&q_vector->affinity_mask, cpu_possible_mask);
|
||||
netif_napi_add_locked(adapter->netdev, &q_vector->napi,
|
||||
iavf_napi_poll);
|
||||
netif_napi_add_config_locked(adapter->netdev, &q_vector->napi,
|
||||
iavf_napi_poll, q_idx);
|
||||
netif_napi_set_irq_locked(&q_vector->napi, irq_num);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2195,12 +2157,12 @@ static int iavf_process_aq_command(struct iavf_adapter *adapter)
|
||||
adapter->aq_required &= ~IAVF_FLAG_AQ_CONFIGURE_RSS;
|
||||
return 0;
|
||||
}
|
||||
if (adapter->aq_required & IAVF_FLAG_AQ_GET_HENA) {
|
||||
iavf_get_hena(adapter);
|
||||
if (adapter->aq_required & IAVF_FLAG_AQ_GET_RSS_HASHCFG) {
|
||||
iavf_get_rss_hashcfg(adapter);
|
||||
return 0;
|
||||
}
|
||||
if (adapter->aq_required & IAVF_FLAG_AQ_SET_HENA) {
|
||||
iavf_set_hena(adapter);
|
||||
if (adapter->aq_required & IAVF_FLAG_AQ_SET_RSS_HASHCFG) {
|
||||
iavf_set_rss_hashcfg(adapter);
|
||||
return 0;
|
||||
}
|
||||
if (adapter->aq_required & IAVF_FLAG_AQ_SET_RSS_KEY) {
|
||||
@@ -5376,6 +5338,7 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
goto err_alloc_etherdev;
|
||||
}
|
||||
|
||||
netif_set_affinity_auto(netdev);
|
||||
SET_NETDEV_DEV(netdev, &pdev->dev);
|
||||
|
||||
pci_set_drvdata(pdev, netdev);
|
||||
|
||||
@@ -1648,7 +1648,8 @@ int iavf_napi_poll(struct napi_struct *napi, int budget)
|
||||
* continue to poll, otherwise we must stop polling so the
|
||||
* interrupt can move to the correct cpu.
|
||||
*/
|
||||
if (!cpumask_test_cpu(cpu_id, &q_vector->affinity_mask)) {
|
||||
if (!cpumask_test_cpu(cpu_id,
|
||||
&q_vector->napi.config->affinity_mask)) {
|
||||
/* Tell napi that we are done polling */
|
||||
napi_complete_done(napi, work_done);
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#ifndef _IAVF_TXRX_H_
|
||||
#define _IAVF_TXRX_H_
|
||||
|
||||
#include <linux/net/intel/libie/pctype.h>
|
||||
|
||||
/* Interrupt Throttling and Rate Limiting Goodies */
|
||||
#define IAVF_DEFAULT_IRQ_WORK 256
|
||||
|
||||
@@ -59,26 +61,26 @@ enum iavf_dyn_idx_t {
|
||||
#define IAVF_PE_ITR IAVF_IDX_ITR2
|
||||
|
||||
/* Supported RSS offloads */
|
||||
#define IAVF_DEFAULT_RSS_HENA ( \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_UDP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_SCTP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_TCP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_FRAG_IPV4) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_UDP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_TCP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_FRAG_IPV6) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_L2_PAYLOAD))
|
||||
#define IAVF_DEFAULT_RSS_HASHCFG ( \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV4) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV6) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_L2_PAYLOAD))
|
||||
|
||||
#define IAVF_DEFAULT_RSS_HENA_EXPANDED (IAVF_DEFAULT_RSS_HENA | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \
|
||||
BIT_ULL(IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
|
||||
#define IAVF_DEFAULT_RSS_HASHCFG_EXPANDED (IAVF_DEFAULT_RSS_HASHCFG | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
|
||||
|
||||
/* How many Rx Buffers do we bundle into one write to the hardware ? */
|
||||
#define IAVF_RX_INCREMENT(r, i) \
|
||||
|
||||
@@ -463,38 +463,6 @@ enum iavf_tx_ctx_desc_cmd_bits {
|
||||
IAVF_TX_CTX_DESC_SWPE = 0x40
|
||||
};
|
||||
|
||||
/* Packet Classifier Types for filters */
|
||||
enum iavf_filter_pctype {
|
||||
/* Note: Values 0-28 are reserved for future use.
|
||||
* Value 29, 30, 32 are not supported on XL710 and X710.
|
||||
*/
|
||||
IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP = 29,
|
||||
IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP = 30,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV4_UDP = 31,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK = 32,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV4_TCP = 33,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV4_SCTP = 34,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV4_OTHER = 35,
|
||||
IAVF_FILTER_PCTYPE_FRAG_IPV4 = 36,
|
||||
/* Note: Values 37-38 are reserved for future use.
|
||||
* Value 39, 40, 42 are not supported on XL710 and X710.
|
||||
*/
|
||||
IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP = 39,
|
||||
IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP = 40,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK = 42,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
|
||||
IAVF_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
|
||||
IAVF_FILTER_PCTYPE_FRAG_IPV6 = 46,
|
||||
/* Note: Value 47 is reserved for future use */
|
||||
IAVF_FILTER_PCTYPE_FCOE_OX = 48,
|
||||
IAVF_FILTER_PCTYPE_FCOE_RX = 49,
|
||||
IAVF_FILTER_PCTYPE_FCOE_OTHER = 50,
|
||||
/* Note: Values 51-62 are reserved for future use */
|
||||
IAVF_FILTER_PCTYPE_L2_PAYLOAD = 63,
|
||||
};
|
||||
|
||||
#define IAVF_TXD_CTX_QW1_TSO_LEN_SHIFT 30
|
||||
#define IAVF_TXD_CTX_QW1_TSO_LEN_MASK (0x3FFFFULL << \
|
||||
IAVF_TXD_CTX_QW1_TSO_LEN_SHIFT)
|
||||
|
||||
@@ -1128,12 +1128,12 @@ void iavf_request_stats(struct iavf_adapter *adapter)
|
||||
}
|
||||
|
||||
/**
|
||||
* iavf_get_hena
|
||||
* iavf_get_rss_hashcfg
|
||||
* @adapter: adapter structure
|
||||
*
|
||||
* Request hash enable capabilities from PF
|
||||
* Request RSS Hash enable bits from PF
|
||||
**/
|
||||
void iavf_get_hena(struct iavf_adapter *adapter)
|
||||
void iavf_get_rss_hashcfg(struct iavf_adapter *adapter)
|
||||
{
|
||||
if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) {
|
||||
/* bail because we already have a command pending */
|
||||
@@ -1141,20 +1141,20 @@ void iavf_get_hena(struct iavf_adapter *adapter)
|
||||
adapter->current_op);
|
||||
return;
|
||||
}
|
||||
adapter->current_op = VIRTCHNL_OP_GET_RSS_HENA_CAPS;
|
||||
adapter->aq_required &= ~IAVF_FLAG_AQ_GET_HENA;
|
||||
iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_RSS_HENA_CAPS, NULL, 0);
|
||||
adapter->current_op = VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS;
|
||||
adapter->aq_required &= ~IAVF_FLAG_AQ_GET_RSS_HASHCFG;
|
||||
iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS, NULL, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* iavf_set_hena
|
||||
* iavf_set_rss_hashcfg
|
||||
* @adapter: adapter structure
|
||||
*
|
||||
* Request the PF to set our RSS hash capabilities
|
||||
**/
|
||||
void iavf_set_hena(struct iavf_adapter *adapter)
|
||||
void iavf_set_rss_hashcfg(struct iavf_adapter *adapter)
|
||||
{
|
||||
struct virtchnl_rss_hena vrh;
|
||||
struct virtchnl_rss_hashcfg vrh;
|
||||
|
||||
if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) {
|
||||
/* bail because we already have a command pending */
|
||||
@@ -1162,10 +1162,10 @@ void iavf_set_hena(struct iavf_adapter *adapter)
|
||||
adapter->current_op);
|
||||
return;
|
||||
}
|
||||
vrh.hena = adapter->hena;
|
||||
adapter->current_op = VIRTCHNL_OP_SET_RSS_HENA;
|
||||
adapter->aq_required &= ~IAVF_FLAG_AQ_SET_HENA;
|
||||
iavf_send_pf_msg(adapter, VIRTCHNL_OP_SET_RSS_HENA, (u8 *)&vrh,
|
||||
vrh.hashcfg = adapter->rss_hashcfg;
|
||||
adapter->current_op = VIRTCHNL_OP_SET_RSS_HASHCFG;
|
||||
adapter->aq_required &= ~IAVF_FLAG_AQ_SET_RSS_HASHCFG;
|
||||
iavf_send_pf_msg(adapter, VIRTCHNL_OP_SET_RSS_HASHCFG, (u8 *)&vrh,
|
||||
sizeof(vrh));
|
||||
}
|
||||
|
||||
@@ -2735,11 +2735,12 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
|
||||
if (v_opcode != adapter->current_op)
|
||||
return;
|
||||
break;
|
||||
case VIRTCHNL_OP_GET_RSS_HENA_CAPS: {
|
||||
struct virtchnl_rss_hena *vrh = (struct virtchnl_rss_hena *)msg;
|
||||
case VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS: {
|
||||
struct virtchnl_rss_hashcfg *vrh =
|
||||
(struct virtchnl_rss_hashcfg *)msg;
|
||||
|
||||
if (msglen == sizeof(*vrh))
|
||||
adapter->hena = vrh->hena;
|
||||
adapter->rss_hashcfg = vrh->hashcfg;
|
||||
else
|
||||
dev_warn(&adapter->pdev->dev,
|
||||
"Invalid message %d from PF\n", v_opcode);
|
||||
|
||||
@@ -614,6 +614,7 @@ struct ice_pf {
|
||||
u16 globr_count; /* Global reset count */
|
||||
u16 empr_count; /* EMP reset count */
|
||||
u16 pfr_count; /* PF reset count */
|
||||
u32 link_down_events;
|
||||
|
||||
u8 wol_ena : 1; /* software state of WoL */
|
||||
u32 wakeup_reason; /* last wakeup reason */
|
||||
|
||||
@@ -623,7 +623,10 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ice_alloc_rx_bufs(ring, num_bufs);
|
||||
if (ring->vsi->type == ICE_VSI_CTRL)
|
||||
ice_init_ctrl_rx_descs(ring, num_bufs);
|
||||
else
|
||||
ice_alloc_rx_bufs(ring, num_bufs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,18 @@
|
||||
|
||||
#define ICE_DPLL_RCLK_NUM_MAX 4
|
||||
|
||||
/**
|
||||
* enum ice_dpll_pin_sw - enumerate ice software pin indices:
|
||||
* @ICE_DPLL_PIN_SW_1_IDX: index of first SW pin
|
||||
* @ICE_DPLL_PIN_SW_2_IDX: index of second SW pin
|
||||
* @ICE_DPLL_PIN_SW_NUM: number of SW pins in pair
|
||||
*/
|
||||
enum ice_dpll_pin_sw {
|
||||
ICE_DPLL_PIN_SW_1_IDX,
|
||||
ICE_DPLL_PIN_SW_2_IDX,
|
||||
ICE_DPLL_PIN_SW_NUM
|
||||
};
|
||||
|
||||
/** ice_dpll_pin - store info about pins
|
||||
* @pin: dpll pin structure
|
||||
* @pf: pointer to pf, which has registered the dpll_pin
|
||||
@@ -31,7 +43,12 @@ struct ice_dpll_pin {
|
||||
struct dpll_pin_properties prop;
|
||||
u32 freq;
|
||||
s32 phase_adjust;
|
||||
struct ice_dpll_pin *input;
|
||||
struct ice_dpll_pin *output;
|
||||
enum dpll_pin_direction direction;
|
||||
u8 status;
|
||||
bool active;
|
||||
bool hidden;
|
||||
};
|
||||
|
||||
/** ice_dpll - store info required for DPLL control
|
||||
@@ -93,14 +110,18 @@ struct ice_dplls {
|
||||
struct ice_dpll pps;
|
||||
struct ice_dpll_pin *inputs;
|
||||
struct ice_dpll_pin *outputs;
|
||||
struct ice_dpll_pin sma[ICE_DPLL_PIN_SW_NUM];
|
||||
struct ice_dpll_pin ufl[ICE_DPLL_PIN_SW_NUM];
|
||||
struct ice_dpll_pin rclk;
|
||||
u8 num_inputs;
|
||||
u8 num_outputs;
|
||||
int cgu_state_acq_err_num;
|
||||
u8 sma_data;
|
||||
u8 base_rclk_idx;
|
||||
int cgu_state_acq_err_num;
|
||||
u64 clock_id;
|
||||
s32 input_phase_adj_max;
|
||||
s32 output_phase_adj_max;
|
||||
bool generic;
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
|
||||
|
||||
@@ -836,6 +836,15 @@ static void ice_set_msglevel(struct net_device *netdev, u32 data)
|
||||
#endif /* !CONFIG_DYNAMIC_DEBUG */
|
||||
}
|
||||
|
||||
static void ice_get_link_ext_stats(struct net_device *netdev,
|
||||
struct ethtool_link_ext_stats *stats)
|
||||
{
|
||||
struct ice_netdev_priv *np = netdev_priv(netdev);
|
||||
struct ice_pf *pf = np->vsi->back;
|
||||
|
||||
stats->link_down_events = pf->link_down_events;
|
||||
}
|
||||
|
||||
static int ice_get_eeprom_len(struct net_device *netdev)
|
||||
{
|
||||
struct ice_netdev_priv *np = netdev_priv(netdev);
|
||||
@@ -4784,6 +4793,7 @@ static const struct ethtool_ops ice_ethtool_ops = {
|
||||
.set_msglevel = ice_set_msglevel,
|
||||
.self_test = ice_self_test,
|
||||
.get_link = ethtool_op_get_link,
|
||||
.get_link_ext_stats = ice_get_link_ext_stats,
|
||||
.get_eeprom_len = ice_get_eeprom_len,
|
||||
.get_eeprom = ice_get_eeprom,
|
||||
.get_coalesce = ice_get_coalesce,
|
||||
|
||||
@@ -2573,38 +2573,38 @@ ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle,
|
||||
* convert its values to their appropriate flow L3, L4 values.
|
||||
*/
|
||||
#define ICE_FLOW_AVF_RSS_IPV4_MASKS \
|
||||
(BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_OTHER) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_FRAG_IPV4))
|
||||
(BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV4))
|
||||
#define ICE_FLOW_AVF_RSS_TCP_IPV4_MASKS \
|
||||
(BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP))
|
||||
(BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP))
|
||||
#define ICE_FLOW_AVF_RSS_UDP_IPV4_MASKS \
|
||||
(BIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV4_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV4_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_UDP))
|
||||
(BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP))
|
||||
#define ICE_FLOW_AVF_RSS_ALL_IPV4_MASKS \
|
||||
(ICE_FLOW_AVF_RSS_TCP_IPV4_MASKS | ICE_FLOW_AVF_RSS_UDP_IPV4_MASKS | \
|
||||
ICE_FLOW_AVF_RSS_IPV4_MASKS | BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP))
|
||||
ICE_FLOW_AVF_RSS_IPV4_MASKS | BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP))
|
||||
|
||||
#define ICE_FLOW_AVF_RSS_IPV6_MASKS \
|
||||
(BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_OTHER) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_FRAG_IPV6))
|
||||
(BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV6))
|
||||
#define ICE_FLOW_AVF_RSS_UDP_IPV6_MASKS \
|
||||
(BIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_UDP))
|
||||
(BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP))
|
||||
#define ICE_FLOW_AVF_RSS_TCP_IPV6_MASKS \
|
||||
(BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_TCP))
|
||||
(BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP))
|
||||
#define ICE_FLOW_AVF_RSS_ALL_IPV6_MASKS \
|
||||
(ICE_FLOW_AVF_RSS_TCP_IPV6_MASKS | ICE_FLOW_AVF_RSS_UDP_IPV6_MASKS | \
|
||||
ICE_FLOW_AVF_RSS_IPV6_MASKS | BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_SCTP))
|
||||
ICE_FLOW_AVF_RSS_IPV6_MASKS | BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP))
|
||||
|
||||
/**
|
||||
* ice_add_avf_rss_cfg - add an RSS configuration for AVF driver
|
||||
* @hw: pointer to the hardware structure
|
||||
* @vsi: VF's VSI
|
||||
* @avf_hash: hash bit fields (ICE_AVF_FLOW_FIELD_*) to configure
|
||||
* @avf_hash: hash bit fields (LIBIE_FILTER_PCTYPE_*) to configure
|
||||
*
|
||||
* This function will take the hash bitmap provided by the AVF driver via a
|
||||
* message, convert it to ICE-compatible values, and configure RSS flow
|
||||
@@ -2621,8 +2621,7 @@ int ice_add_avf_rss_cfg(struct ice_hw *hw, struct ice_vsi *vsi, u64 avf_hash)
|
||||
return -EINVAL;
|
||||
|
||||
vsi_handle = vsi->idx;
|
||||
if (avf_hash == ICE_AVF_FLOW_FIELD_INVALID ||
|
||||
!ice_is_vsi_valid(hw, vsi_handle))
|
||||
if (!avf_hash || !ice_is_vsi_valid(hw, vsi_handle))
|
||||
return -EINVAL;
|
||||
|
||||
/* Make sure no unsupported bits are specified */
|
||||
@@ -2658,11 +2657,11 @@ int ice_add_avf_rss_cfg(struct ice_hw *hw, struct ice_vsi *vsi, u64 avf_hash)
|
||||
ICE_FLOW_HASH_UDP_PORT;
|
||||
hash_flds &= ~ICE_FLOW_AVF_RSS_UDP_IPV4_MASKS;
|
||||
} else if (hash_flds &
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP)) {
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP)) {
|
||||
rss_hash = ICE_FLOW_HASH_IPV4 |
|
||||
ICE_FLOW_HASH_SCTP_PORT;
|
||||
hash_flds &=
|
||||
~BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP);
|
||||
~BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP);
|
||||
}
|
||||
} else if (hash_flds & ICE_FLOW_AVF_RSS_ALL_IPV6_MASKS) {
|
||||
if (hash_flds & ICE_FLOW_AVF_RSS_IPV6_MASKS) {
|
||||
@@ -2679,11 +2678,11 @@ int ice_add_avf_rss_cfg(struct ice_hw *hw, struct ice_vsi *vsi, u64 avf_hash)
|
||||
ICE_FLOW_HASH_UDP_PORT;
|
||||
hash_flds &= ~ICE_FLOW_AVF_RSS_UDP_IPV6_MASKS;
|
||||
} else if (hash_flds &
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_SCTP)) {
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP)) {
|
||||
rss_hash = ICE_FLOW_HASH_IPV6 |
|
||||
ICE_FLOW_HASH_SCTP_PORT;
|
||||
hash_flds &=
|
||||
~BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_SCTP);
|
||||
~BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#ifndef _ICE_FLOW_H_
|
||||
#define _ICE_FLOW_H_
|
||||
|
||||
#include <linux/net/intel/libie/pctype.h>
|
||||
|
||||
#include "ice_flex_type.h"
|
||||
#include "ice_parser.h"
|
||||
|
||||
@@ -264,57 +266,27 @@ enum ice_flow_field {
|
||||
#define ICE_FLOW_HASH_FLD_GTPU_DWN_TEID \
|
||||
BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID)
|
||||
|
||||
/* Flow headers and fields for AVF support */
|
||||
enum ice_flow_avf_hdr_field {
|
||||
/* Values 0 - 28 are reserved for future use */
|
||||
ICE_AVF_FLOW_FIELD_INVALID = 0,
|
||||
ICE_AVF_FLOW_FIELD_UNICAST_IPV4_UDP = 29,
|
||||
ICE_AVF_FLOW_FIELD_MULTICAST_IPV4_UDP,
|
||||
ICE_AVF_FLOW_FIELD_IPV4_UDP,
|
||||
ICE_AVF_FLOW_FIELD_IPV4_TCP_SYN_NO_ACK,
|
||||
ICE_AVF_FLOW_FIELD_IPV4_TCP,
|
||||
ICE_AVF_FLOW_FIELD_IPV4_SCTP,
|
||||
ICE_AVF_FLOW_FIELD_IPV4_OTHER,
|
||||
ICE_AVF_FLOW_FIELD_FRAG_IPV4,
|
||||
/* Values 37-38 are reserved */
|
||||
ICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP = 39,
|
||||
ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP,
|
||||
ICE_AVF_FLOW_FIELD_IPV6_UDP,
|
||||
ICE_AVF_FLOW_FIELD_IPV6_TCP_SYN_NO_ACK,
|
||||
ICE_AVF_FLOW_FIELD_IPV6_TCP,
|
||||
ICE_AVF_FLOW_FIELD_IPV6_SCTP,
|
||||
ICE_AVF_FLOW_FIELD_IPV6_OTHER,
|
||||
ICE_AVF_FLOW_FIELD_FRAG_IPV6,
|
||||
ICE_AVF_FLOW_FIELD_RSVD47,
|
||||
ICE_AVF_FLOW_FIELD_FCOE_OX,
|
||||
ICE_AVF_FLOW_FIELD_FCOE_RX,
|
||||
ICE_AVF_FLOW_FIELD_FCOE_OTHER,
|
||||
/* Values 51-62 are reserved */
|
||||
ICE_AVF_FLOW_FIELD_L2_PAYLOAD = 63,
|
||||
ICE_AVF_FLOW_FIELD_MAX
|
||||
};
|
||||
|
||||
/* Supported RSS offloads This macro is defined to support
|
||||
* VIRTCHNL_OP_GET_RSS_HENA_CAPS ops. PF driver sends the RSS hardware
|
||||
* VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS ops. PF driver sends the RSS hardware
|
||||
* capabilities to the caller of this ops.
|
||||
*/
|
||||
#define ICE_DEFAULT_RSS_HENA ( \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_OTHER) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_FRAG_IPV4) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_TCP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_SCTP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_OTHER) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_FRAG_IPV6) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV4_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV4_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_IPV6_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP) | \
|
||||
BIT_ULL(ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP))
|
||||
#define ICE_DEFAULT_RSS_HASHCFG ( \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV4) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_FRAG_IPV6) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \
|
||||
BIT_ULL(LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
|
||||
|
||||
enum ice_rss_cfg_hdr_type {
|
||||
ICE_RSS_OUTER_HEADERS, /* take outer headers as inputset. */
|
||||
|
||||
@@ -484,8 +484,7 @@ static irqreturn_t ice_msix_clean_ctrl_vsi(int __always_unused irq, void *data)
|
||||
if (!q_vector->tx.tx_ring)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
#define FDIR_RX_DESC_CLEAN_BUDGET 64
|
||||
ice_clean_rx_irq(q_vector->rx.rx_ring, FDIR_RX_DESC_CLEAN_BUDGET);
|
||||
ice_clean_ctrl_rx_irq(q_vector->rx.rx_ring);
|
||||
ice_clean_ctrl_tx_irq(q_vector->tx.tx_ring);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -1579,7 +1578,7 @@ static void ice_vsi_set_vf_rss_flow_fld(struct ice_vsi *vsi)
|
||||
return;
|
||||
}
|
||||
|
||||
status = ice_add_avf_rss_cfg(&pf->hw, vsi, ICE_DEFAULT_RSS_HENA);
|
||||
status = ice_add_avf_rss_cfg(&pf->hw, vsi, ICE_DEFAULT_RSS_HASHCFG);
|
||||
if (status)
|
||||
dev_dbg(dev, "ice_add_avf_rss_cfg failed for vsi = %d, error = %d\n",
|
||||
vsi->vsi_num, status);
|
||||
|
||||
@@ -1144,6 +1144,9 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi, bool link_up,
|
||||
if (link_up == old_link && link_speed == old_link_speed)
|
||||
return 0;
|
||||
|
||||
if (!link_up && old_link)
|
||||
pf->link_down_events++;
|
||||
|
||||
ice_ptp_link_change(pf, link_up);
|
||||
|
||||
if (ice_is_dcb_active(pf)) {
|
||||
|
||||
@@ -40,21 +40,19 @@ static const struct ice_ptp_pin_desc ice_pin_desc_e810[] = {
|
||||
{ ONE_PPS, { -1, 5 }, { 0, 1 }},
|
||||
};
|
||||
|
||||
static const char ice_pin_names_nvm[][64] = {
|
||||
"GNSS",
|
||||
"SMA1",
|
||||
"U.FL1",
|
||||
"SMA2",
|
||||
"U.FL2",
|
||||
static const char ice_pin_names_dpll[][64] = {
|
||||
"SDP20",
|
||||
"SDP21",
|
||||
"SDP22",
|
||||
"SDP23",
|
||||
};
|
||||
|
||||
static const struct ice_ptp_pin_desc ice_pin_desc_e810_sma[] = {
|
||||
static const struct ice_ptp_pin_desc ice_pin_desc_dpll[] = {
|
||||
/* name, gpio, delay */
|
||||
{ GNSS, { 1, -1 }, { 0, 0 }},
|
||||
{ SMA1, { 1, 0 }, { 0, 1 }},
|
||||
{ UFL1, { -1, 0 }, { 0, 1 }},
|
||||
{ SMA2, { 3, 2 }, { 0, 1 }},
|
||||
{ UFL2, { 3, -1 }, { 0, 0 }},
|
||||
{ SDP0, { -1, 0 }, { 0, 1 }},
|
||||
{ SDP1, { 1, -1 }, { 0, 0 }},
|
||||
{ SDP2, { -1, 2 }, { 0, 1 }},
|
||||
{ SDP3, { 3, -1 }, { 0, 0 }},
|
||||
};
|
||||
|
||||
static struct ice_pf *ice_get_ctrl_pf(struct ice_pf *pf)
|
||||
@@ -92,101 +90,6 @@ static int ice_ptp_find_pin_idx(struct ice_pf *pf, enum ptp_pin_function func,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_ptp_update_sma_data - update SMA pins data according to pins setup
|
||||
* @pf: Board private structure
|
||||
* @sma_pins: parsed SMA pins status
|
||||
* @data: SMA data to update
|
||||
*/
|
||||
static void ice_ptp_update_sma_data(struct ice_pf *pf, unsigned int sma_pins[],
|
||||
u8 *data)
|
||||
{
|
||||
const char *state1, *state2;
|
||||
|
||||
/* Set the right state based on the desired configuration.
|
||||
* When bit is set, functionality is disabled.
|
||||
*/
|
||||
*data &= ~ICE_ALL_SMA_MASK;
|
||||
if (!sma_pins[UFL1 - 1]) {
|
||||
if (sma_pins[SMA1 - 1] == PTP_PF_EXTTS) {
|
||||
state1 = "SMA1 Rx, U.FL1 disabled";
|
||||
*data |= ICE_SMA1_TX_EN;
|
||||
} else if (sma_pins[SMA1 - 1] == PTP_PF_PEROUT) {
|
||||
state1 = "SMA1 Tx U.FL1 disabled";
|
||||
*data |= ICE_SMA1_DIR_EN;
|
||||
} else {
|
||||
state1 = "SMA1 disabled, U.FL1 disabled";
|
||||
*data |= ICE_SMA1_MASK;
|
||||
}
|
||||
} else {
|
||||
/* U.FL1 Tx will always enable SMA1 Rx */
|
||||
state1 = "SMA1 Rx, U.FL1 Tx";
|
||||
}
|
||||
|
||||
if (!sma_pins[UFL2 - 1]) {
|
||||
if (sma_pins[SMA2 - 1] == PTP_PF_EXTTS) {
|
||||
state2 = "SMA2 Rx, U.FL2 disabled";
|
||||
*data |= ICE_SMA2_TX_EN | ICE_SMA2_UFL2_RX_DIS;
|
||||
} else if (sma_pins[SMA2 - 1] == PTP_PF_PEROUT) {
|
||||
state2 = "SMA2 Tx, U.FL2 disabled";
|
||||
*data |= ICE_SMA2_DIR_EN | ICE_SMA2_UFL2_RX_DIS;
|
||||
} else {
|
||||
state2 = "SMA2 disabled, U.FL2 disabled";
|
||||
*data |= ICE_SMA2_MASK;
|
||||
}
|
||||
} else {
|
||||
if (!sma_pins[SMA2 - 1]) {
|
||||
state2 = "SMA2 disabled, U.FL2 Rx";
|
||||
*data |= ICE_SMA2_DIR_EN | ICE_SMA2_TX_EN;
|
||||
} else {
|
||||
state2 = "SMA2 Tx, U.FL2 Rx";
|
||||
*data |= ICE_SMA2_DIR_EN;
|
||||
}
|
||||
}
|
||||
|
||||
dev_dbg(ice_pf_to_dev(pf), "%s, %s\n", state1, state2);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_ptp_set_sma_cfg - set the configuration of the SMA control logic
|
||||
* @pf: Board private structure
|
||||
*
|
||||
* Return: 0 on success, negative error code otherwise
|
||||
*/
|
||||
static int ice_ptp_set_sma_cfg(struct ice_pf *pf)
|
||||
{
|
||||
const struct ice_ptp_pin_desc *ice_pins = pf->ptp.ice_pin_desc;
|
||||
struct ptp_pin_desc *pins = pf->ptp.pin_desc;
|
||||
unsigned int sma_pins[ICE_SMA_PINS_NUM] = {};
|
||||
int err;
|
||||
u8 data;
|
||||
|
||||
/* Read initial pin state value */
|
||||
err = ice_read_sma_ctrl(&pf->hw, &data);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Get SMA/U.FL pins states */
|
||||
for (int i = 0; i < pf->ptp.info.n_pins; i++)
|
||||
if (pins[i].func) {
|
||||
int name_idx = ice_pins[i].name_idx;
|
||||
|
||||
switch (name_idx) {
|
||||
case SMA1:
|
||||
case UFL1:
|
||||
case SMA2:
|
||||
case UFL2:
|
||||
sma_pins[name_idx - 1] = pins[i].func;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ice_ptp_update_sma_data(pf, sma_pins, &data);
|
||||
return ice_write_sma_ctrl(&pf->hw, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_ptp_cfg_tx_interrupt - Configure Tx timestamp interrupt for the device
|
||||
* @pf: Board private structure
|
||||
@@ -1878,63 +1781,6 @@ static void ice_ptp_enable_all_perout(struct ice_pf *pf)
|
||||
true);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_ptp_disable_shared_pin - Disable enabled pin that shares GPIO
|
||||
* @pf: Board private structure
|
||||
* @pin: Pin index
|
||||
* @func: Assigned function
|
||||
*
|
||||
* Return: 0 on success, negative error code otherwise
|
||||
*/
|
||||
static int ice_ptp_disable_shared_pin(struct ice_pf *pf, unsigned int pin,
|
||||
enum ptp_pin_function func)
|
||||
{
|
||||
unsigned int gpio_pin;
|
||||
|
||||
switch (func) {
|
||||
case PTP_PF_PEROUT:
|
||||
gpio_pin = pf->ptp.ice_pin_desc[pin].gpio[1];
|
||||
break;
|
||||
case PTP_PF_EXTTS:
|
||||
gpio_pin = pf->ptp.ice_pin_desc[pin].gpio[0];
|
||||
break;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < pf->ptp.info.n_pins; i++) {
|
||||
struct ptp_pin_desc *pin_desc = &pf->ptp.pin_desc[i];
|
||||
unsigned int chan = pin_desc->chan;
|
||||
|
||||
/* Skip pin idx from the request */
|
||||
if (i == pin)
|
||||
continue;
|
||||
|
||||
if (pin_desc->func == PTP_PF_PEROUT &&
|
||||
pf->ptp.ice_pin_desc[i].gpio[1] == gpio_pin) {
|
||||
pf->ptp.perout_rqs[chan].period.sec = 0;
|
||||
pf->ptp.perout_rqs[chan].period.nsec = 0;
|
||||
pin_desc->func = PTP_PF_NONE;
|
||||
pin_desc->chan = 0;
|
||||
dev_dbg(ice_pf_to_dev(pf), "Disabling pin %u with shared output GPIO pin %u\n",
|
||||
i, gpio_pin);
|
||||
return ice_ptp_cfg_perout(pf, &pf->ptp.perout_rqs[chan],
|
||||
false);
|
||||
} else if (pf->ptp.pin_desc->func == PTP_PF_EXTTS &&
|
||||
pf->ptp.ice_pin_desc[i].gpio[0] == gpio_pin) {
|
||||
pf->ptp.extts_rqs[chan].flags &= ~PTP_ENABLE_FEATURE;
|
||||
pin_desc->func = PTP_PF_NONE;
|
||||
pin_desc->chan = 0;
|
||||
dev_dbg(ice_pf_to_dev(pf), "Disabling pin %u with shared input GPIO pin %u\n",
|
||||
i, gpio_pin);
|
||||
return ice_ptp_cfg_extts(pf, &pf->ptp.extts_rqs[chan],
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_verify_pin - verify if pin supports requested pin function
|
||||
* @info: the driver's PTP info structure
|
||||
@@ -1969,14 +1815,6 @@ static int ice_verify_pin(struct ptp_clock_info *info, unsigned int pin,
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/* On adapters with SMA_CTRL disable other pins that share same GPIO */
|
||||
if (ice_is_feature_supported(pf, ICE_F_SMA_CTRL)) {
|
||||
ice_ptp_disable_shared_pin(pf, pin, func);
|
||||
pf->ptp.pin_desc[pin].func = func;
|
||||
pf->ptp.pin_desc[pin].chan = chan;
|
||||
return ice_ptp_set_sma_cfg(pf);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2499,14 +2337,14 @@ static void ice_ptp_setup_pin_cfg(struct ice_pf *pf)
|
||||
for (unsigned int i = 0; i < pf->ptp.info.n_pins; i++) {
|
||||
const struct ice_ptp_pin_desc *desc = &pf->ptp.ice_pin_desc[i];
|
||||
struct ptp_pin_desc *pin = &pf->ptp.pin_desc[i];
|
||||
const char *name = NULL;
|
||||
const char *name;
|
||||
|
||||
if (!ice_is_feature_supported(pf, ICE_F_SMA_CTRL))
|
||||
name = ice_pin_names[desc->name_idx];
|
||||
else if (desc->name_idx != GPIO_NA)
|
||||
name = ice_pin_names_nvm[desc->name_idx];
|
||||
if (name)
|
||||
strscpy(pin->name, name, sizeof(pin->name));
|
||||
else
|
||||
name = ice_pin_names_dpll[desc->name_idx];
|
||||
|
||||
strscpy(pin->name, name, sizeof(pin->name));
|
||||
|
||||
pin->index = i;
|
||||
}
|
||||
@@ -2518,8 +2356,8 @@ static void ice_ptp_setup_pin_cfg(struct ice_pf *pf)
|
||||
* ice_ptp_disable_pins - Disable PTP pins
|
||||
* @pf: pointer to the PF structure
|
||||
*
|
||||
* Disable the OS access to the SMA pins. Called to clear out the OS
|
||||
* indications of pin support when we fail to setup the SMA control register.
|
||||
* Disable the OS access to the pins. Called to clear out the OS
|
||||
* indications of pin support when we fail to setup pin array.
|
||||
*/
|
||||
static void ice_ptp_disable_pins(struct ice_pf *pf)
|
||||
{
|
||||
@@ -2560,40 +2398,30 @@ static int ice_ptp_parse_sdp_entries(struct ice_pf *pf, __le16 *entries,
|
||||
for (i = 0; i < num_entries; i++) {
|
||||
u16 entry = le16_to_cpu(entries[i]);
|
||||
DECLARE_BITMAP(bitmap, GPIO_NA);
|
||||
unsigned int bitmap_idx;
|
||||
unsigned int idx;
|
||||
bool dir;
|
||||
u16 gpio;
|
||||
|
||||
*bitmap = FIELD_GET(ICE_AQC_NVM_SDP_AC_PIN_M, entry);
|
||||
|
||||
/* Check if entry's pin bitmap is valid. */
|
||||
if (bitmap_empty(bitmap, GPIO_NA))
|
||||
continue;
|
||||
|
||||
dir = !!FIELD_GET(ICE_AQC_NVM_SDP_AC_DIR_M, entry);
|
||||
gpio = FIELD_GET(ICE_AQC_NVM_SDP_AC_SDP_NUM_M, entry);
|
||||
for_each_set_bit(bitmap_idx, bitmap, GPIO_NA + 1) {
|
||||
unsigned int idx;
|
||||
|
||||
/* Check if entry's pin bit is valid */
|
||||
if (bitmap_idx >= NUM_PTP_PINS_NVM &&
|
||||
bitmap_idx != GPIO_NA)
|
||||
continue;
|
||||
|
||||
/* Check if pin already exists */
|
||||
for (idx = 0; idx < ICE_N_PINS_MAX; idx++)
|
||||
if (pins[idx].name_idx == bitmap_idx)
|
||||
break;
|
||||
|
||||
if (idx == ICE_N_PINS_MAX) {
|
||||
/* Pin not found, setup its entry and name */
|
||||
idx = n_pins++;
|
||||
pins[idx].name_idx = bitmap_idx;
|
||||
if (bitmap_idx == GPIO_NA)
|
||||
strscpy(pf->ptp.pin_desc[idx].name,
|
||||
ice_pin_names[gpio],
|
||||
sizeof(pf->ptp.pin_desc[idx]
|
||||
.name));
|
||||
}
|
||||
|
||||
/* Setup in/out GPIO number */
|
||||
pins[idx].gpio[dir] = gpio;
|
||||
for (idx = 0; idx < ICE_N_PINS_MAX; idx++) {
|
||||
if (pins[idx].name_idx == gpio)
|
||||
break;
|
||||
}
|
||||
|
||||
if (idx == ICE_N_PINS_MAX) {
|
||||
/* Pin not found, setup its entry and name */
|
||||
idx = n_pins++;
|
||||
pins[idx].name_idx = gpio;
|
||||
}
|
||||
pins[idx].gpio[dir] = gpio;
|
||||
}
|
||||
|
||||
for (i = 0; i < n_pins; i++) {
|
||||
@@ -2621,10 +2449,10 @@ static void ice_ptp_set_funcs_e82x(struct ice_pf *pf)
|
||||
|
||||
if (pf->hw.mac_type == ICE_MAC_GENERIC_3K_E825) {
|
||||
pf->ptp.ice_pin_desc = ice_pin_desc_e825c;
|
||||
pf->ptp.info.n_pins = ICE_PIN_DESC_ARR_LEN(ice_pin_desc_e825c);
|
||||
pf->ptp.info.n_pins = ARRAY_SIZE(ice_pin_desc_e825c);
|
||||
} else {
|
||||
pf->ptp.ice_pin_desc = ice_pin_desc_e82x;
|
||||
pf->ptp.info.n_pins = ICE_PIN_DESC_ARR_LEN(ice_pin_desc_e82x);
|
||||
pf->ptp.info.n_pins = ARRAY_SIZE(ice_pin_desc_e82x);
|
||||
}
|
||||
ice_ptp_setup_pin_cfg(pf);
|
||||
}
|
||||
@@ -2650,15 +2478,13 @@ static void ice_ptp_set_funcs_e810(struct ice_pf *pf)
|
||||
if (err) {
|
||||
/* SDP section does not exist in NVM or is corrupted */
|
||||
if (ice_is_feature_supported(pf, ICE_F_SMA_CTRL)) {
|
||||
ptp->ice_pin_desc = ice_pin_desc_e810_sma;
|
||||
ptp->info.n_pins =
|
||||
ICE_PIN_DESC_ARR_LEN(ice_pin_desc_e810_sma);
|
||||
ptp->ice_pin_desc = ice_pin_desc_dpll;
|
||||
ptp->info.n_pins = ARRAY_SIZE(ice_pin_desc_dpll);
|
||||
} else {
|
||||
pf->ptp.ice_pin_desc = ice_pin_desc_e810;
|
||||
pf->ptp.info.n_pins =
|
||||
ICE_PIN_DESC_ARR_LEN(ice_pin_desc_e810);
|
||||
err = 0;
|
||||
pf->ptp.info.n_pins = ARRAY_SIZE(ice_pin_desc_e810);
|
||||
}
|
||||
err = 0;
|
||||
} else {
|
||||
desc = devm_kcalloc(ice_pf_to_dev(pf), ICE_N_PINS_MAX,
|
||||
sizeof(struct ice_ptp_pin_desc),
|
||||
@@ -2676,8 +2502,6 @@ static void ice_ptp_set_funcs_e810(struct ice_pf *pf)
|
||||
ptp->info.pin_config = ptp->pin_desc;
|
||||
ice_ptp_setup_pin_cfg(pf);
|
||||
|
||||
if (ice_is_feature_supported(pf, ICE_F_SMA_CTRL))
|
||||
err = ice_ptp_set_sma_cfg(pf);
|
||||
err:
|
||||
if (err) {
|
||||
devm_kfree(ice_pf_to_dev(pf), desc);
|
||||
@@ -2703,7 +2527,7 @@ static void ice_ptp_set_funcs_e830(struct ice_pf *pf)
|
||||
#endif /* CONFIG_ICE_HWTS */
|
||||
/* Rest of the config is the same as base E810 */
|
||||
pf->ptp.ice_pin_desc = ice_pin_desc_e810;
|
||||
pf->ptp.info.n_pins = ICE_PIN_DESC_ARR_LEN(ice_pin_desc_e810);
|
||||
pf->ptp.info.n_pins = ARRAY_SIZE(ice_pin_desc_e810);
|
||||
ice_ptp_setup_pin_cfg(pf);
|
||||
}
|
||||
|
||||
|
||||
@@ -202,9 +202,6 @@ enum ice_ptp_pin_nvm {
|
||||
|
||||
/* Pin definitions for PTP */
|
||||
#define ICE_N_PINS_MAX 6
|
||||
#define ICE_SMA_PINS_NUM 4
|
||||
#define ICE_PIN_DESC_ARR_LEN(_arr) (sizeof(_arr) / \
|
||||
sizeof(struct ice_ptp_pin_desc))
|
||||
|
||||
/**
|
||||
* struct ice_ptp_pin_desc - hardware pin description data
|
||||
|
||||
@@ -704,6 +704,7 @@ static inline u64 ice_get_base_incval(struct ice_hw *hw)
|
||||
#define ICE_SMA1_MASK (ICE_SMA1_DIR_EN | ICE_SMA1_TX_EN)
|
||||
#define ICE_SMA2_MASK (ICE_SMA2_UFL2_RX_DIS | ICE_SMA2_DIR_EN | \
|
||||
ICE_SMA2_TX_EN)
|
||||
#define ICE_SMA2_INACTIVE_MASK (ICE_SMA2_DIR_EN | ICE_SMA2_TX_EN)
|
||||
#define ICE_ALL_SMA_MASK (ICE_SMA1_MASK | ICE_SMA2_MASK)
|
||||
|
||||
#define ICE_SMA_MIN_BIT 3
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#define ICE_RX_HDR_SIZE 256
|
||||
|
||||
#define FDIR_DESC_RXDID 0x40
|
||||
#define ICE_FDIR_CLEAN_DELAY 10
|
||||
|
||||
/**
|
||||
@@ -706,6 +705,37 @@ ice_alloc_mapped_page(struct ice_rx_ring *rx_ring, struct ice_rx_buf *bi)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_init_ctrl_rx_descs - Initialize Rx descriptors for control vsi.
|
||||
* @rx_ring: ring to init descriptors on
|
||||
* @count: number of descriptors to initialize
|
||||
*/
|
||||
void ice_init_ctrl_rx_descs(struct ice_rx_ring *rx_ring, u32 count)
|
||||
{
|
||||
union ice_32b_rx_flex_desc *rx_desc;
|
||||
u32 ntu = rx_ring->next_to_use;
|
||||
|
||||
if (!count)
|
||||
return;
|
||||
|
||||
rx_desc = ICE_RX_DESC(rx_ring, ntu);
|
||||
|
||||
do {
|
||||
rx_desc++;
|
||||
ntu++;
|
||||
if (unlikely(ntu == rx_ring->count)) {
|
||||
rx_desc = ICE_RX_DESC(rx_ring, 0);
|
||||
ntu = 0;
|
||||
}
|
||||
|
||||
rx_desc->wb.status_error0 = 0;
|
||||
count--;
|
||||
} while (count);
|
||||
|
||||
if (rx_ring->next_to_use != ntu)
|
||||
ice_release_rx_desc(rx_ring, ntu);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_alloc_rx_bufs - Replace used receive buffers
|
||||
* @rx_ring: ring to place buffers on
|
||||
@@ -726,8 +756,7 @@ bool ice_alloc_rx_bufs(struct ice_rx_ring *rx_ring, unsigned int cleaned_count)
|
||||
struct ice_rx_buf *bi;
|
||||
|
||||
/* do nothing if no valid netdev defined */
|
||||
if ((!rx_ring->netdev && rx_ring->vsi->type != ICE_VSI_CTRL) ||
|
||||
!cleaned_count)
|
||||
if (!rx_ring->netdev || !cleaned_count)
|
||||
return false;
|
||||
|
||||
/* get the Rx descriptor and buffer based on next_to_use */
|
||||
@@ -1183,6 +1212,45 @@ static void ice_put_rx_mbuf(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp,
|
||||
rx_ring->nr_frags = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_clean_ctrl_rx_irq - Clean descriptors from flow director Rx ring
|
||||
* @rx_ring: Rx descriptor ring for ctrl_vsi to transact packets on
|
||||
*
|
||||
* This function cleans Rx descriptors from the ctrl_vsi Rx ring used
|
||||
* to set flow director rules on VFs.
|
||||
*/
|
||||
void ice_clean_ctrl_rx_irq(struct ice_rx_ring *rx_ring)
|
||||
{
|
||||
u32 ntc = rx_ring->next_to_clean;
|
||||
unsigned int total_rx_pkts = 0;
|
||||
u32 cnt = rx_ring->count;
|
||||
|
||||
while (likely(total_rx_pkts < ICE_DFLT_IRQ_WORK)) {
|
||||
struct ice_vsi *ctrl_vsi = rx_ring->vsi;
|
||||
union ice_32b_rx_flex_desc *rx_desc;
|
||||
u16 stat_err_bits;
|
||||
|
||||
rx_desc = ICE_RX_DESC(rx_ring, ntc);
|
||||
|
||||
stat_err_bits = BIT(ICE_RX_FLEX_DESC_STATUS0_DD_S);
|
||||
if (!ice_test_staterr(rx_desc->wb.status_error0, stat_err_bits))
|
||||
break;
|
||||
|
||||
dma_rmb();
|
||||
|
||||
if (ctrl_vsi->vf)
|
||||
ice_vc_fdir_irq_handler(ctrl_vsi, rx_desc);
|
||||
|
||||
if (++ntc == cnt)
|
||||
ntc = 0;
|
||||
total_rx_pkts++;
|
||||
}
|
||||
|
||||
rx_ring->first_desc = ntc;
|
||||
rx_ring->next_to_clean = ntc;
|
||||
ice_init_ctrl_rx_descs(rx_ring, ICE_RX_DESC_UNUSED(rx_ring));
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_clean_rx_irq - Clean completed descriptors from Rx ring - bounce buf
|
||||
* @rx_ring: Rx descriptor ring to transact packets on
|
||||
@@ -1195,7 +1263,7 @@ static void ice_put_rx_mbuf(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp,
|
||||
*
|
||||
* Returns amount of work completed
|
||||
*/
|
||||
int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
|
||||
static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
|
||||
{
|
||||
unsigned int total_rx_bytes = 0, total_rx_pkts = 0;
|
||||
unsigned int offset = rx_ring->rx_offset;
|
||||
@@ -1242,17 +1310,6 @@ int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
|
||||
dma_rmb();
|
||||
|
||||
ice_trace(clean_rx_irq, rx_ring, rx_desc);
|
||||
if (rx_desc->wb.rxdid == FDIR_DESC_RXDID || !rx_ring->netdev) {
|
||||
struct ice_vsi *ctrl_vsi = rx_ring->vsi;
|
||||
|
||||
if (rx_desc->wb.rxdid == FDIR_DESC_RXDID &&
|
||||
ctrl_vsi->vf)
|
||||
ice_vc_fdir_irq_handler(ctrl_vsi, rx_desc);
|
||||
if (++ntc == cnt)
|
||||
ntc = 0;
|
||||
rx_ring->first_desc = ntc;
|
||||
continue;
|
||||
}
|
||||
|
||||
size = le16_to_cpu(rx_desc->wb.pkt_len) &
|
||||
ICE_RX_FLX_DESC_PKT_LEN_M;
|
||||
|
||||
@@ -491,6 +491,7 @@ static inline unsigned int ice_rx_pg_order(struct ice_rx_ring *ring)
|
||||
|
||||
union ice_32b_rx_flex_desc;
|
||||
|
||||
void ice_init_ctrl_rx_descs(struct ice_rx_ring *rx_ring, u32 num_descs);
|
||||
bool ice_alloc_rx_bufs(struct ice_rx_ring *rxr, unsigned int cleaned_count);
|
||||
netdev_tx_t ice_start_xmit(struct sk_buff *skb, struct net_device *netdev);
|
||||
u16
|
||||
@@ -506,6 +507,6 @@ int ice_napi_poll(struct napi_struct *napi, int budget);
|
||||
int
|
||||
ice_prgm_fdir_fltr(struct ice_vsi *vsi, struct ice_fltr_desc *fdir_desc,
|
||||
u8 *raw_packet);
|
||||
int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget);
|
||||
void ice_clean_ctrl_tx_irq(struct ice_tx_ring *tx_ring);
|
||||
void ice_clean_ctrl_rx_irq(struct ice_rx_ring *rx_ring);
|
||||
#endif /* _ICE_TXRX_H_ */
|
||||
|
||||
@@ -2999,13 +2999,13 @@ error_param:
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_vc_get_rss_hena - return the RSS HENA bits allowed by the hardware
|
||||
* ice_vc_get_rss_hashcfg - return the RSS Hash configuration
|
||||
* @vf: pointer to the VF info
|
||||
*/
|
||||
static int ice_vc_get_rss_hena(struct ice_vf *vf)
|
||||
static int ice_vc_get_rss_hashcfg(struct ice_vf *vf)
|
||||
{
|
||||
enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
|
||||
struct virtchnl_rss_hena *vrh = NULL;
|
||||
struct virtchnl_rss_hashcfg *vrh = NULL;
|
||||
int len = 0, ret;
|
||||
|
||||
if (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {
|
||||
@@ -3019,7 +3019,7 @@ static int ice_vc_get_rss_hena(struct ice_vf *vf)
|
||||
goto err;
|
||||
}
|
||||
|
||||
len = sizeof(struct virtchnl_rss_hena);
|
||||
len = sizeof(struct virtchnl_rss_hashcfg);
|
||||
vrh = kzalloc(len, GFP_KERNEL);
|
||||
if (!vrh) {
|
||||
v_ret = VIRTCHNL_STATUS_ERR_NO_MEMORY;
|
||||
@@ -3027,23 +3027,23 @@ static int ice_vc_get_rss_hena(struct ice_vf *vf)
|
||||
goto err;
|
||||
}
|
||||
|
||||
vrh->hena = ICE_DEFAULT_RSS_HENA;
|
||||
vrh->hashcfg = ICE_DEFAULT_RSS_HASHCFG;
|
||||
err:
|
||||
/* send the response back to the VF */
|
||||
ret = ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HENA_CAPS, v_ret,
|
||||
ret = ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS, v_ret,
|
||||
(u8 *)vrh, len);
|
||||
kfree(vrh);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_vc_set_rss_hena - set RSS HENA bits for the VF
|
||||
* ice_vc_set_rss_hashcfg - set RSS Hash configuration bits for the VF
|
||||
* @vf: pointer to the VF info
|
||||
* @msg: pointer to the msg buffer
|
||||
*/
|
||||
static int ice_vc_set_rss_hena(struct ice_vf *vf, u8 *msg)
|
||||
static int ice_vc_set_rss_hashcfg(struct ice_vf *vf, u8 *msg)
|
||||
{
|
||||
struct virtchnl_rss_hena *vrh = (struct virtchnl_rss_hena *)msg;
|
||||
struct virtchnl_rss_hashcfg *vrh = (struct virtchnl_rss_hashcfg *)msg;
|
||||
enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
|
||||
struct ice_pf *pf = vf->pf;
|
||||
struct ice_vsi *vsi;
|
||||
@@ -3074,9 +3074,9 @@ static int ice_vc_set_rss_hena(struct ice_vf *vf, u8 *msg)
|
||||
* disable RSS
|
||||
*/
|
||||
status = ice_rem_vsi_rss_cfg(&pf->hw, vsi->idx);
|
||||
if (status && !vrh->hena) {
|
||||
if (status && !vrh->hashcfg) {
|
||||
/* only report failure to clear the current RSS configuration if
|
||||
* that was clearly the VF's intention (i.e. vrh->hena = 0)
|
||||
* that was clearly the VF's intention (i.e. vrh->hashcfg = 0)
|
||||
*/
|
||||
v_ret = ice_err_to_virt_err(status);
|
||||
goto err;
|
||||
@@ -3089,14 +3089,14 @@ static int ice_vc_set_rss_hena(struct ice_vf *vf, u8 *msg)
|
||||
vf->vf_id);
|
||||
}
|
||||
|
||||
if (vrh->hena) {
|
||||
status = ice_add_avf_rss_cfg(&pf->hw, vsi, vrh->hena);
|
||||
if (vrh->hashcfg) {
|
||||
status = ice_add_avf_rss_cfg(&pf->hw, vsi, vrh->hashcfg);
|
||||
v_ret = ice_err_to_virt_err(status);
|
||||
}
|
||||
|
||||
/* send the response to the VF */
|
||||
err:
|
||||
return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_SET_RSS_HENA, v_ret,
|
||||
return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_SET_RSS_HASHCFG, v_ret,
|
||||
NULL, 0);
|
||||
}
|
||||
|
||||
@@ -4243,8 +4243,8 @@ static const struct ice_virtchnl_ops ice_virtchnl_dflt_ops = {
|
||||
.add_vlan_msg = ice_vc_add_vlan_msg,
|
||||
.remove_vlan_msg = ice_vc_remove_vlan_msg,
|
||||
.query_rxdid = ice_vc_query_rxdid,
|
||||
.get_rss_hena = ice_vc_get_rss_hena,
|
||||
.set_rss_hena_msg = ice_vc_set_rss_hena,
|
||||
.get_rss_hashcfg = ice_vc_get_rss_hashcfg,
|
||||
.set_rss_hashcfg = ice_vc_set_rss_hashcfg,
|
||||
.ena_vlan_stripping = ice_vc_ena_vlan_stripping,
|
||||
.dis_vlan_stripping = ice_vc_dis_vlan_stripping,
|
||||
.handle_rss_cfg_msg = ice_vc_handle_rss_cfg,
|
||||
@@ -4380,8 +4380,8 @@ static const struct ice_virtchnl_ops ice_virtchnl_repr_ops = {
|
||||
.add_vlan_msg = ice_vc_add_vlan_msg,
|
||||
.remove_vlan_msg = ice_vc_remove_vlan_msg,
|
||||
.query_rxdid = ice_vc_query_rxdid,
|
||||
.get_rss_hena = ice_vc_get_rss_hena,
|
||||
.set_rss_hena_msg = ice_vc_set_rss_hena,
|
||||
.get_rss_hashcfg = ice_vc_get_rss_hashcfg,
|
||||
.set_rss_hashcfg = ice_vc_set_rss_hashcfg,
|
||||
.ena_vlan_stripping = ice_vc_ena_vlan_stripping,
|
||||
.dis_vlan_stripping = ice_vc_dis_vlan_stripping,
|
||||
.handle_rss_cfg_msg = ice_vc_handle_rss_cfg,
|
||||
@@ -4582,11 +4582,11 @@ error_handler:
|
||||
case VIRTCHNL_OP_GET_SUPPORTED_RXDIDS:
|
||||
err = ops->query_rxdid(vf);
|
||||
break;
|
||||
case VIRTCHNL_OP_GET_RSS_HENA_CAPS:
|
||||
err = ops->get_rss_hena(vf);
|
||||
case VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS:
|
||||
err = ops->get_rss_hashcfg(vf);
|
||||
break;
|
||||
case VIRTCHNL_OP_SET_RSS_HENA:
|
||||
err = ops->set_rss_hena_msg(vf, msg);
|
||||
case VIRTCHNL_OP_SET_RSS_HASHCFG:
|
||||
err = ops->set_rss_hashcfg(vf, msg);
|
||||
break;
|
||||
case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING:
|
||||
err = ops->ena_vlan_stripping(vf);
|
||||
|
||||
@@ -57,8 +57,8 @@ struct ice_virtchnl_ops {
|
||||
int (*add_vlan_msg)(struct ice_vf *vf, u8 *msg);
|
||||
int (*remove_vlan_msg)(struct ice_vf *vf, u8 *msg);
|
||||
int (*query_rxdid)(struct ice_vf *vf);
|
||||
int (*get_rss_hena)(struct ice_vf *vf);
|
||||
int (*set_rss_hena_msg)(struct ice_vf *vf, u8 *msg);
|
||||
int (*get_rss_hashcfg)(struct ice_vf *vf);
|
||||
int (*set_rss_hashcfg)(struct ice_vf *vf, u8 *msg);
|
||||
int (*ena_vlan_stripping)(struct ice_vf *vf);
|
||||
int (*dis_vlan_stripping)(struct ice_vf *vf);
|
||||
int (*handle_rss_cfg_msg)(struct ice_vf *vf, u8 *msg, bool add);
|
||||
|
||||
@@ -65,7 +65,7 @@ static const u32 vlan_v2_allowlist_opcodes[] = {
|
||||
/* VIRTCHNL_VF_OFFLOAD_RSS_PF */
|
||||
static const u32 rss_pf_allowlist_opcodes[] = {
|
||||
VIRTCHNL_OP_CONFIG_RSS_KEY, VIRTCHNL_OP_CONFIG_RSS_LUT,
|
||||
VIRTCHNL_OP_GET_RSS_HENA_CAPS, VIRTCHNL_OP_SET_RSS_HENA,
|
||||
VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS, VIRTCHNL_OP_SET_RSS_HASHCFG,
|
||||
VIRTCHNL_OP_CONFIG_RSS_HFUNC,
|
||||
};
|
||||
|
||||
|
||||
@@ -752,6 +752,7 @@ struct ixgbe_adapter {
|
||||
bool link_up;
|
||||
unsigned long sfp_poll_time;
|
||||
unsigned long link_check_timeout;
|
||||
u32 link_down_events;
|
||||
|
||||
struct timer_list service_timer;
|
||||
struct work_struct service_task;
|
||||
|
||||
@@ -1033,6 +1033,14 @@ static void ixgbe_get_regs(struct net_device *netdev,
|
||||
regs_buff[1144] = IXGBE_READ_REG(hw, IXGBE_SECRXSTAT);
|
||||
}
|
||||
|
||||
static void ixgbe_get_link_ext_stats(struct net_device *netdev,
|
||||
struct ethtool_link_ext_stats *stats)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = ixgbe_from_netdev(netdev);
|
||||
|
||||
stats->link_down_events = adapter->link_down_events;
|
||||
}
|
||||
|
||||
static int ixgbe_get_eeprom_len(struct net_device *netdev)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = ixgbe_from_netdev(netdev);
|
||||
@@ -3719,6 +3727,7 @@ static const struct ethtool_ops ixgbe_ethtool_ops = {
|
||||
.set_wol = ixgbe_set_wol,
|
||||
.nway_reset = ixgbe_nway_reset,
|
||||
.get_link = ethtool_op_get_link,
|
||||
.get_link_ext_stats = ixgbe_get_link_ext_stats,
|
||||
.get_eeprom_len = ixgbe_get_eeprom_len,
|
||||
.get_eeprom = ixgbe_get_eeprom,
|
||||
.set_eeprom = ixgbe_set_eeprom,
|
||||
@@ -3764,6 +3773,7 @@ static const struct ethtool_ops ixgbe_ethtool_ops_e610 = {
|
||||
.set_wol = ixgbe_set_wol_e610,
|
||||
.nway_reset = ixgbe_nway_reset,
|
||||
.get_link = ethtool_op_get_link,
|
||||
.get_link_ext_stats = ixgbe_get_link_ext_stats,
|
||||
.get_eeprom_len = ixgbe_get_eeprom_len,
|
||||
.get_eeprom = ixgbe_get_eeprom,
|
||||
.set_eeprom = ixgbe_set_eeprom,
|
||||
|
||||
@@ -7991,6 +7991,8 @@ static void ixgbe_watchdog_link_is_down(struct ixgbe_adapter *adapter)
|
||||
if (!netif_carrier_ok(netdev))
|
||||
return;
|
||||
|
||||
adapter->link_down_events++;
|
||||
|
||||
/* poll for SFP+ cable when link is down */
|
||||
if (ixgbe_is_sfp(hw) && hw->mac.type == ixgbe_mac_82598EB)
|
||||
adapter->flags2 |= IXGBE_FLAG2_SEARCH_FOR_SFP;
|
||||
|
||||
@@ -20,7 +20,7 @@ static int ixgbe_get_invariants_X550_x(struct ixgbe_hw *hw)
|
||||
struct ixgbe_phy_info *phy = &hw->phy;
|
||||
struct ixgbe_link_info *link = &hw->link;
|
||||
|
||||
/* Start with X540 invariants, since so simular */
|
||||
/* Start with X540 invariants, since so similar */
|
||||
ixgbe_get_invariants_X540(hw);
|
||||
|
||||
if (mac->ops.get_media_type(hw) != ixgbe_media_type_copper)
|
||||
@@ -48,7 +48,7 @@ static int ixgbe_get_invariants_X550_a(struct ixgbe_hw *hw)
|
||||
struct ixgbe_mac_info *mac = &hw->mac;
|
||||
struct ixgbe_phy_info *phy = &hw->phy;
|
||||
|
||||
/* Start with X540 invariants, since so simular */
|
||||
/* Start with X540 invariants, since so similar */
|
||||
ixgbe_get_invariants_X540(hw);
|
||||
|
||||
if (mac->ops.get_media_type(hw) != ixgbe_media_type_copper)
|
||||
@@ -685,7 +685,7 @@ static int ixgbe_iosf_wait(struct ixgbe_hw *hw, u32 *ctrl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** ixgbe_read_iosf_sb_reg_x550 - Writes a value to specified register of the
|
||||
/** ixgbe_read_iosf_sb_reg_x550 - Reads a value to specified register of the
|
||||
* IOSF device
|
||||
* @hw: pointer to hardware structure
|
||||
* @reg_addr: 32 bit PHY register to write
|
||||
@@ -847,7 +847,7 @@ static int ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,
|
||||
|
||||
/** ixgbe_read_ee_hostif_buffer_X550- Read EEPROM word(s) using hostif
|
||||
* @hw: pointer to hardware structure
|
||||
* @offset: offset of word in the EEPROM to read
|
||||
* @offset: offset of word in the EEPROM to read
|
||||
* @words: number of words
|
||||
* @data: word(s) read from the EEPROM
|
||||
*
|
||||
@@ -1253,7 +1253,7 @@ static int ixgbe_get_bus_info_X550em(struct ixgbe_hw *hw)
|
||||
|
||||
/**
|
||||
* ixgbe_fw_recovery_mode_X550 - Check FW NVM recovery mode
|
||||
* @hw: pointer t hardware structure
|
||||
* @hw: pointer to hardware structure
|
||||
*
|
||||
* Returns true if in FW NVM recovery mode.
|
||||
*/
|
||||
@@ -1267,7 +1267,7 @@ static bool ixgbe_fw_recovery_mode_X550(struct ixgbe_hw *hw)
|
||||
|
||||
/** ixgbe_disable_rx_x550 - Disable RX unit
|
||||
*
|
||||
* Enables the Rx DMA unit for x550
|
||||
* Disables the Rx DMA unit for x550
|
||||
**/
|
||||
static void ixgbe_disable_rx_x550(struct ixgbe_hw *hw)
|
||||
{
|
||||
@@ -1754,7 +1754,7 @@ ixgbe_setup_mac_link_sfp_n(struct ixgbe_hw *hw, ixgbe_link_speed speed,
|
||||
ret_val = ixgbe_supported_sfp_modules_X550em(hw, &setup_linear);
|
||||
|
||||
/* If no SFP module present, then return success. Return success since
|
||||
* SFP not present error is not excepted in the setup MAC link flow.
|
||||
* SFP not present error is not accepted in the setup MAC link flow.
|
||||
*/
|
||||
if (ret_val == -ENOENT)
|
||||
return 0;
|
||||
@@ -1804,7 +1804,7 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
|
||||
ret_val = ixgbe_supported_sfp_modules_X550em(hw, &setup_linear);
|
||||
|
||||
/* If no SFP module present, then return success. Return success since
|
||||
* SFP not present error is not excepted in the setup MAC link flow.
|
||||
* SFP not present error is not accepted in the setup MAC link flow.
|
||||
*/
|
||||
if (ret_val == -ENOENT)
|
||||
return 0;
|
||||
@@ -2324,7 +2324,7 @@ static int ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
|
||||
* PHY interrupt is lsc
|
||||
* @is_overtemp: indicate whether an overtemp event encountered
|
||||
*
|
||||
* Determime if external Base T PHY interrupt cause is high temperature
|
||||
* Determine if external Base T PHY interrupt cause is high temperature
|
||||
* failure alarm or link status change.
|
||||
**/
|
||||
static int ixgbe_get_lasi_ext_t_x550em(struct ixgbe_hw *hw, bool *lsc,
|
||||
@@ -2669,7 +2669,7 @@ static int ixgbe_setup_internal_phy_t_x550em(struct ixgbe_hw *hw)
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
/* If link is not still up, then no setup is necessary so return */
|
||||
/* If the link is still not up, no setup is necessary */
|
||||
status = ixgbe_ext_phy_t_x550em_get_link(hw, &link_up);
|
||||
if (status)
|
||||
return status;
|
||||
@@ -2768,7 +2768,7 @@ static int ixgbe_led_off_t_x550em(struct ixgbe_hw *hw, u32 led_idx)
|
||||
* Sends driver version number to firmware through the manageability
|
||||
* block. On success return 0
|
||||
* else returns -EBUSY when encountering an error acquiring
|
||||
* semaphore, -EIO when command fails or -ENIVAL when incorrect
|
||||
* semaphore, -EIO when command fails or -EINVAL when incorrect
|
||||
* params passed.
|
||||
**/
|
||||
int ixgbe_set_fw_drv_ver_x550(struct ixgbe_hw *hw, u8 maj, u8 min,
|
||||
@@ -3175,7 +3175,7 @@ static void ixgbe_read_mng_if_sel_x550em(struct ixgbe_hw *hw)
|
||||
hw->phy.nw_mng_if_sel = IXGBE_READ_REG(hw, IXGBE_NW_MNG_IF_SEL);
|
||||
|
||||
/* If X552 (X550EM_a) and MDIO is connected to external PHY, then set
|
||||
* PHY address. This register field was has only been used for X552.
|
||||
* PHY address. This register field has only been used for X552.
|
||||
*/
|
||||
if (hw->mac.type == ixgbe_mac_x550em_a &&
|
||||
hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_MDIO_ACT) {
|
||||
@@ -3735,7 +3735,7 @@ static int ixgbe_acquire_swfw_sync_x550em_a(struct ixgbe_hw *hw, u32 mask)
|
||||
* @hw: pointer to hardware structure
|
||||
* @mask: Mask to specify which semaphore to release
|
||||
*
|
||||
* Release the SWFW semaphore and puts the shared PHY token as needed
|
||||
* Release the SWFW semaphore and puts back the shared PHY token as needed
|
||||
*/
|
||||
static void ixgbe_release_swfw_sync_x550em_a(struct ixgbe_hw *hw, u32 mask)
|
||||
{
|
||||
@@ -3756,7 +3756,7 @@ static void ixgbe_release_swfw_sync_x550em_a(struct ixgbe_hw *hw, u32 mask)
|
||||
* @phy_data: Pointer to read data from PHY register
|
||||
*
|
||||
* Reads a value from a specified PHY register using the SWFW lock and PHY
|
||||
* Token. The PHY Token is needed since the MDIO is shared between to MAC
|
||||
* Token. The PHY Token is needed since the MDIO is shared between two MAC
|
||||
* instances.
|
||||
*/
|
||||
static int ixgbe_read_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,
|
||||
|
||||
@@ -132,8 +132,8 @@ enum virtchnl_ops {
|
||||
VIRTCHNL_OP_RELEASE_RDMA_IRQ_MAP = VIRTCHNL_OP_RELEASE_IWARP_IRQ_MAP,
|
||||
VIRTCHNL_OP_CONFIG_RSS_KEY = 23,
|
||||
VIRTCHNL_OP_CONFIG_RSS_LUT = 24,
|
||||
VIRTCHNL_OP_GET_RSS_HENA_CAPS = 25,
|
||||
VIRTCHNL_OP_SET_RSS_HENA = 26,
|
||||
VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS = 25,
|
||||
VIRTCHNL_OP_SET_RSS_HASHCFG = 26,
|
||||
VIRTCHNL_OP_ENABLE_VLAN_STRIPPING = 27,
|
||||
VIRTCHNL_OP_DISABLE_VLAN_STRIPPING = 28,
|
||||
VIRTCHNL_OP_REQUEST_QUEUES = 29,
|
||||
@@ -974,18 +974,19 @@ struct virtchnl_rss_lut {
|
||||
VIRTCHNL_CHECK_STRUCT_LEN(4, virtchnl_rss_lut);
|
||||
#define virtchnl_rss_lut_LEGACY_SIZEOF 6
|
||||
|
||||
/* VIRTCHNL_OP_GET_RSS_HENA_CAPS
|
||||
* VIRTCHNL_OP_SET_RSS_HENA
|
||||
* VF sends these messages to get and set the hash filter enable bits for RSS.
|
||||
/* VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS
|
||||
* VIRTCHNL_OP_SET_RSS_HASHCFG
|
||||
* VF sends these messages to get and set the hash filter configuration for RSS.
|
||||
* By default, the PF sets these to all possible traffic types that the
|
||||
* hardware supports. The VF can query this value if it wants to change the
|
||||
* traffic types that are hashed by the hardware.
|
||||
*/
|
||||
struct virtchnl_rss_hena {
|
||||
u64 hena;
|
||||
struct virtchnl_rss_hashcfg {
|
||||
/* Bits defined by enum libie_filter_pctype */
|
||||
u64 hashcfg;
|
||||
};
|
||||
|
||||
VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hena);
|
||||
VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hashcfg);
|
||||
|
||||
/* Type of RSS algorithm */
|
||||
enum virtchnl_rss_algorithm {
|
||||
@@ -1779,10 +1780,10 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
|
||||
case VIRTCHNL_OP_CONFIG_RSS_HFUNC:
|
||||
valid_len = sizeof(struct virtchnl_rss_hfunc);
|
||||
break;
|
||||
case VIRTCHNL_OP_GET_RSS_HENA_CAPS:
|
||||
case VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS:
|
||||
break;
|
||||
case VIRTCHNL_OP_SET_RSS_HENA:
|
||||
valid_len = sizeof(struct virtchnl_rss_hena);
|
||||
case VIRTCHNL_OP_SET_RSS_HASHCFG:
|
||||
valid_len = sizeof(struct virtchnl_rss_hashcfg);
|
||||
break;
|
||||
case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING:
|
||||
case VIRTCHNL_OP_DISABLE_VLAN_STRIPPING:
|
||||
|
||||
41
include/linux/net/intel/libie/pctype.h
Normal file
41
include/linux/net/intel/libie/pctype.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (C) 2025 Intel Corporation */
|
||||
|
||||
#ifndef __LIBIE_PCTYPE_H
|
||||
#define __LIBIE_PCTYPE_H
|
||||
|
||||
/* Packet Classifier Type indexes, used to set the xxQF_HENA registers. Also
|
||||
* communicated over the virtchnl API as part of struct virtchnl_rss_hashena.
|
||||
*/
|
||||
enum libie_filter_pctype {
|
||||
/* Note: Values 0-28 are reserved for future use.
|
||||
* Value 29, 30, 32 are not supported on XL710 and X710.
|
||||
*/
|
||||
LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP = 29,
|
||||
LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP = 30,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP = 31,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK = 32,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP = 33,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP = 34,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER = 35,
|
||||
LIBIE_FILTER_PCTYPE_FRAG_IPV4 = 36,
|
||||
/* Note: Values 37-38 are reserved for future use.
|
||||
* Value 39, 40, 42 are not supported on XL710 and X710.
|
||||
*/
|
||||
LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP = 39,
|
||||
LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP = 40,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK = 42,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
|
||||
LIBIE_FILTER_PCTYPE_FRAG_IPV6 = 46,
|
||||
/* Note: Value 47 is reserved for future use */
|
||||
LIBIE_FILTER_PCTYPE_FCOE_OX = 48,
|
||||
LIBIE_FILTER_PCTYPE_FCOE_RX = 49,
|
||||
LIBIE_FILTER_PCTYPE_FCOE_OTHER = 50,
|
||||
/* Note: Values 51-62 are reserved for future use */
|
||||
LIBIE_FILTER_PCTYPE_L2_PAYLOAD = 63
|
||||
};
|
||||
|
||||
#endif /* __LIBIE_PCTYPE_H */
|
||||
Reference in New Issue
Block a user