mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01: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 2026-09-29 (ice) Grzegorz reduces DSCP message from error to debug when FW DCB management is active since it's an expected condition. Marcin utilizes, existing, ice_fill_eth_hdr() call to set ethernet header value. Jake reduces padding in ice_flash_info struct by moving sr_words location. Aleksandr adjusts OICR interrupt moderation rate to reduce latency for Tx timestamps and VF mailbox messages. He also simplifies IPv6 mask checks; replacing memcmp() and mask structs to helper functions. Przemek Korba adds an Rx timestamp tracepoint to help debug PTP issues. Weimin Xiong converts parser-table allocation to kcalloc(). Yury Norov simplifies PF nominal-state check by reducing the number of calls and removes a redundant NULL check as most are already non-NULL. Przemek Kitszel simplifies VF queue disabling by removing ineffective batching for queues. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: simplify ice_vc_dis_qs_msg() a little ice: drop pf == NULL check in ice_pf_state_is_nominal() ice: simplify ice_pf_state_is_nominal() ice: parser: use kcalloc for table allocation ice: add rx timestamp tracepoint for debugging ice: use inline helpers instead of memcmp() for IPv6 mask checks in ice_ethtool_fdir ice: increase OICR interrupt moderation rate to 20K interrupts/sec ice: reorder ice_flash_info fields to eliminate padding ice: use ice_fill_eth_hdr() in ice_fill_sw_rule() ice: reduce loglevel to debug for 'Can't delete DSCP' message ==================== Link: https://patch.msgid.link/20260929224153.1455466-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
a5e7d8e446
|
|
@ -872,7 +872,7 @@ static int ice_dcbnl_delapp(struct net_device *netdev, struct dcb_app *app)
|
|||
int ret = 0;
|
||||
|
||||
if (pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) {
|
||||
netdev_err(netdev, "can't delete DSCP netlink app when FW DCB agent is active\n");
|
||||
netdev_dbg(netdev, "can't delete DSCP netlink app when FW DCB agent is active\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,23 +8,10 @@
|
|||
#include "ice_fdir.h"
|
||||
#include "ice_flow.h"
|
||||
|
||||
static struct in6_addr full_ipv6_addr_mask = {
|
||||
.in6_u = {
|
||||
.u6_addr8 = {
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static struct in6_addr zero_ipv6_addr_mask = {
|
||||
.in6_u = {
|
||||
.u6_addr8 = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}
|
||||
}
|
||||
};
|
||||
static bool ice_ipv6_mask_full(const __be32 *a)
|
||||
{
|
||||
return (a[0] & a[1] & a[2] & a[3]) == cpu_to_be32(0xffffffff);
|
||||
}
|
||||
|
||||
/* calls to ice_flow_add_prof require the number of segments in the array
|
||||
* for segs_cnt. In this code that is one more than the index.
|
||||
|
|
@ -1070,10 +1057,8 @@ ice_set_fdir_ip6_seg(struct ice_flow_seg_info *seg,
|
|||
enum ice_flow_field src_port, dst_port;
|
||||
|
||||
/* make sure we don't have any empty rule */
|
||||
if (!memcmp(tcp_ip6_spec->ip6src, &zero_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)) &&
|
||||
!memcmp(tcp_ip6_spec->ip6dst, &zero_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)) &&
|
||||
if (ipv6_addr_any((struct in6_addr *)tcp_ip6_spec->ip6src) &&
|
||||
ipv6_addr_any((struct in6_addr *)tcp_ip6_spec->ip6dst) &&
|
||||
!tcp_ip6_spec->psrc && !tcp_ip6_spec->pdst)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
@ -1097,24 +1082,20 @@ ice_set_fdir_ip6_seg(struct ice_flow_seg_info *seg,
|
|||
*perfect_fltr = true;
|
||||
ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_IPV6 | l4_proto);
|
||||
|
||||
if (!memcmp(tcp_ip6_spec->ip6src, &full_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
if (ice_ipv6_mask_full(tcp_ip6_spec->ip6src))
|
||||
ice_flow_set_fld(seg, ICE_FLOW_FIELD_IDX_IPV6_SA,
|
||||
ICE_FLOW_FLD_OFF_INVAL, ICE_FLOW_FLD_OFF_INVAL,
|
||||
ICE_FLOW_FLD_OFF_INVAL, false);
|
||||
else if (!memcmp(tcp_ip6_spec->ip6src, &zero_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
else if (ipv6_addr_any((struct in6_addr *)tcp_ip6_spec->ip6src))
|
||||
*perfect_fltr = false;
|
||||
else
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!memcmp(tcp_ip6_spec->ip6dst, &full_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
if (ice_ipv6_mask_full(tcp_ip6_spec->ip6dst))
|
||||
ice_flow_set_fld(seg, ICE_FLOW_FIELD_IDX_IPV6_DA,
|
||||
ICE_FLOW_FLD_OFF_INVAL, ICE_FLOW_FLD_OFF_INVAL,
|
||||
ICE_FLOW_FLD_OFF_INVAL, false);
|
||||
else if (!memcmp(tcp_ip6_spec->ip6dst, &zero_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
else if (ipv6_addr_any((struct in6_addr *)tcp_ip6_spec->ip6dst))
|
||||
*perfect_fltr = false;
|
||||
else
|
||||
return -EOPNOTSUPP;
|
||||
|
|
@ -1167,33 +1148,27 @@ ice_set_fdir_ip6_usr_seg(struct ice_flow_seg_info *seg,
|
|||
if (usr_ip6_spec->l4_proto)
|
||||
return -EOPNOTSUPP;
|
||||
/* empty rules are not valid */
|
||||
if (!memcmp(usr_ip6_spec->ip6src, &zero_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)) &&
|
||||
!memcmp(usr_ip6_spec->ip6dst, &zero_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
if (ipv6_addr_any((struct in6_addr *)usr_ip6_spec->ip6src) &&
|
||||
ipv6_addr_any((struct in6_addr *)usr_ip6_spec->ip6dst))
|
||||
return -EINVAL;
|
||||
|
||||
*perfect_fltr = true;
|
||||
ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_IPV6);
|
||||
|
||||
if (!memcmp(usr_ip6_spec->ip6src, &full_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
if (ice_ipv6_mask_full(usr_ip6_spec->ip6src))
|
||||
ice_flow_set_fld(seg, ICE_FLOW_FIELD_IDX_IPV6_SA,
|
||||
ICE_FLOW_FLD_OFF_INVAL, ICE_FLOW_FLD_OFF_INVAL,
|
||||
ICE_FLOW_FLD_OFF_INVAL, false);
|
||||
else if (!memcmp(usr_ip6_spec->ip6src, &zero_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
else if (ipv6_addr_any((struct in6_addr *)usr_ip6_spec->ip6src))
|
||||
*perfect_fltr = false;
|
||||
else
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!memcmp(usr_ip6_spec->ip6dst, &full_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
if (ice_ipv6_mask_full(usr_ip6_spec->ip6dst))
|
||||
ice_flow_set_fld(seg, ICE_FLOW_FIELD_IDX_IPV6_DA,
|
||||
ICE_FLOW_FLD_OFF_INVAL, ICE_FLOW_FLD_OFF_INVAL,
|
||||
ICE_FLOW_FLD_OFF_INVAL, false);
|
||||
else if (!memcmp(usr_ip6_spec->ip6dst, &zero_ipv6_addr_mask,
|
||||
sizeof(struct in6_addr)))
|
||||
else if (ipv6_addr_any((struct in6_addr *)usr_ip6_spec->ip6dst))
|
||||
*perfect_fltr = false;
|
||||
else
|
||||
return -EOPNOTSUPP;
|
||||
|
|
|
|||
|
|
@ -1806,16 +1806,7 @@ static void ice_vsi_set_rss_flow_fld(struct ice_vsi *vsi)
|
|||
*/
|
||||
bool ice_pf_state_is_nominal(struct ice_pf *pf)
|
||||
{
|
||||
DECLARE_BITMAP(check_bits, ICE_STATE_NBITS) = { 0 };
|
||||
|
||||
if (!pf)
|
||||
return false;
|
||||
|
||||
bitmap_set(check_bits, 0, ICE_STATE_NOMINAL_CHECK_BITS);
|
||||
if (bitmap_intersects(pf->state, check_bits, ICE_STATE_NBITS))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return bitmap_empty(pf->state, ICE_STATE_NOMINAL_CHECK_BITS);
|
||||
}
|
||||
|
||||
#define ICE_FW_MODE_REC_M BIT(1)
|
||||
|
|
|
|||
|
|
@ -3428,7 +3428,7 @@ static int ice_req_irq_msix_misc(struct ice_pf *pf)
|
|||
((pf->ll_ts_irq.index + pf_intr_start_offset) &
|
||||
PFINT_SB_CTL_MSIX_INDX_M) | PFINT_SB_CTL_CAUSE_ENA_M);
|
||||
wr32(hw, GLINT_ITR(ICE_RX_ITR, pf->oicr_irq.index),
|
||||
ITR_REG_ALIGN(ICE_ITR_8K) >> ICE_ITR_GRAN_S);
|
||||
ITR_REG_ALIGN(ICE_ITR_20K) >> ICE_ITR_GRAN_S);
|
||||
|
||||
ice_flush(hw);
|
||||
ice_irq_dynamic_ena(hw, NULL, NULL);
|
||||
|
|
@ -5530,7 +5530,7 @@ static int ice_suspend(struct device *dev)
|
|||
|
||||
pf = pci_get_drvdata(pdev);
|
||||
|
||||
if (!ice_pf_state_is_nominal(pf)) {
|
||||
if (!pf || !ice_pf_state_is_nominal(pf)) {
|
||||
dev_err(dev, "Device is not ready, no need to suspend it\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ ice_parser_create_table(struct ice_hw *hw, u32 sect_type,
|
|||
if (!seg)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
table = kzalloc(item_size * length, GFP_KERNEL);
|
||||
table = kcalloc(length, item_size, GFP_KERNEL);
|
||||
if (!table)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
|
|
|||
|
|
@ -2330,6 +2330,8 @@ u64 ice_ptp_get_rx_hwts(const union ice_32b_rx_flex_desc *rx_desc,
|
|||
ts_high = le32_to_cpu(rx_desc->wb.flex_ts.ts_high);
|
||||
ts_ns = ice_ptp_extend_32b_ts(cached_time, ts_high);
|
||||
|
||||
ice_trace(rx_hwtstamp, cached_time, ts_high, ts_ns);
|
||||
|
||||
return ts_ns;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2612,7 +2612,6 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,
|
|||
u16 vlan_id = ICE_MAX_VLAN_ID + 1;
|
||||
u16 vlan_tpid = ETH_P_8021Q;
|
||||
void *daddr = NULL;
|
||||
u16 eth_hdr_sz;
|
||||
u8 *eth_hdr;
|
||||
u32 act = 0;
|
||||
__be16 *off;
|
||||
|
|
@ -2625,11 +2624,10 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,
|
|||
return;
|
||||
}
|
||||
|
||||
eth_hdr_sz = sizeof(dummy_eth_header);
|
||||
eth_hdr = s_rule->hdr_data;
|
||||
|
||||
/* initialize the ether header with a dummy header */
|
||||
memcpy(eth_hdr, dummy_eth_header, eth_hdr_sz);
|
||||
ice_fill_eth_hdr(eth_hdr);
|
||||
ice_fill_sw_info(hw, f_info);
|
||||
|
||||
switch (f_info->fltr_act) {
|
||||
|
|
@ -2730,7 +2728,7 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,
|
|||
|
||||
/* Create the switch rule with the final dummy Ethernet header */
|
||||
if (opc != ice_aqc_opc_update_sw_rules)
|
||||
s_rule->hdr_len = cpu_to_le16(eth_hdr_sz);
|
||||
s_rule->hdr_len = cpu_to_le16(DUMMY_ETH_HDR_LEN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -261,6 +261,24 @@ DEFINE_TX_TSTAMP_OP_EVENT(ice_tx_tstamp_fw_req);
|
|||
DEFINE_TX_TSTAMP_OP_EVENT(ice_tx_tstamp_fw_done);
|
||||
DEFINE_TX_TSTAMP_OP_EVENT(ice_tx_tstamp_complete);
|
||||
|
||||
/* Trace event for Rx timestamp */
|
||||
TRACE_EVENT(ice_rx_hwtstamp,
|
||||
TP_PROTO(u64 cached_time, u32 ts_high, u64 ts_ns),
|
||||
|
||||
TP_ARGS(cached_time, ts_high, ts_ns),
|
||||
|
||||
TP_STRUCT__entry(__field(u64, cached_time)
|
||||
__field(u32, ts_high)
|
||||
__field(u64, ts_ns)),
|
||||
|
||||
TP_fast_assign(__entry->cached_time = cached_time;
|
||||
__entry->ts_high = ts_high;
|
||||
__entry->ts_ns = ts_ns;),
|
||||
|
||||
TP_printk("cached_time=%llu ts_high=%u ts_ns=%llu",
|
||||
__entry->cached_time, __entry->ts_high, __entry->ts_ns)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(ice_esw_br_fdb_template,
|
||||
TP_PROTO(struct ice_esw_br_fdb_entry *fdb),
|
||||
TP_ARGS(fdb),
|
||||
|
|
|
|||
|
|
@ -529,8 +529,8 @@ struct ice_flash_info {
|
|||
struct ice_nvm_info nvm; /* NVM version information */
|
||||
struct ice_netlist_info netlist;/* Netlist version info */
|
||||
struct ice_bank_info banks; /* Flash Bank information */
|
||||
u16 sr_words; /* Shadow RAM size in words */
|
||||
u32 flash_size; /* Size of available flash in bytes */
|
||||
u16 sr_words; /* Shadow RAM size in words */
|
||||
u8 blank_nvm_mode; /* is NVM empty (no FW present) */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -375,6 +375,8 @@ int ice_vf_vsi_dis_single_txq(struct ice_vf *vf, struct ice_vsi *vsi, u16 q_id)
|
|||
* @msg: pointer to the msg buffer
|
||||
*
|
||||
* called from the VF to disable all or specific queue(s)
|
||||
*
|
||||
* Return: exit code of sending the virtchnl response.
|
||||
*/
|
||||
int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)
|
||||
{
|
||||
|
|
@ -424,20 +426,7 @@ int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)
|
|||
}
|
||||
|
||||
q_map = vqs->rx_queues;
|
||||
/* speed up Rx queue disable by batching them if possible */
|
||||
if (q_map &&
|
||||
bitmap_equal(&q_map, vf->rxq_ena, ICE_MAX_RSS_QS_PER_VF)) {
|
||||
if (ice_vsi_stop_all_rx_rings(vsi)) {
|
||||
dev_err(ice_pf_to_dev(vsi->back), "Failed to stop all Rx rings on VSI %d\n",
|
||||
vsi->vsi_num);
|
||||
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
|
||||
goto error_param;
|
||||
}
|
||||
|
||||
for_each_set_bit(vf_q_id, &q_map, ICE_MAX_RSS_QS_PER_VF)
|
||||
ice_vf_dis_rxq_interrupt(vsi, vf_q_id);
|
||||
bitmap_zero(vf->rxq_ena, ICE_MAX_RSS_QS_PER_VF);
|
||||
} else if (q_map) {
|
||||
if (q_map) {
|
||||
for_each_set_bit(vf_q_id, &q_map, ICE_MAX_RSS_QS_PER_VF) {
|
||||
if (!ice_vc_isvalid_q_id(vsi, vf_q_id)) {
|
||||
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user