mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-06-17 (ice, e1000e) For ice: Krishna Kumar modifies aRFS match criteria to correctly identify matching filters. Grzegorz fixes a memory leak in eswitch legacy mode. For e1000e: Vitaly sets clock frequency on some Nahum systems which may misreport their value. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: e1000e: set fixed clock frequency indication for Nahum 11 and Nahum 13 ice: fix eswitch code memory leak in reset scenario net: ice: Perform accurate aRFS flow match ==================== Link: https://patch.msgid.link/20250617172444.1419560-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
28c0d7756f
|
|
@ -3534,9 +3534,6 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
|
|||
case e1000_pch_cnp:
|
||||
case e1000_pch_tgp:
|
||||
case e1000_pch_adp:
|
||||
case e1000_pch_mtp:
|
||||
case e1000_pch_lnp:
|
||||
case e1000_pch_ptp:
|
||||
case e1000_pch_nvp:
|
||||
if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI) {
|
||||
/* Stable 24MHz frequency */
|
||||
|
|
@ -3552,6 +3549,17 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
|
|||
adapter->cc.shift = shift;
|
||||
}
|
||||
break;
|
||||
case e1000_pch_mtp:
|
||||
case e1000_pch_lnp:
|
||||
case e1000_pch_ptp:
|
||||
/* System firmware can misreport this value, so set it to a
|
||||
* stable 38400KHz frequency.
|
||||
*/
|
||||
incperiod = INCPERIOD_38400KHZ;
|
||||
incvalue = INCVALUE_38400KHZ;
|
||||
shift = INCVALUE_SHIFT_38400KHZ;
|
||||
adapter->cc.shift = shift;
|
||||
break;
|
||||
case e1000_82574:
|
||||
case e1000_82583:
|
||||
/* Stable 25MHz frequency */
|
||||
|
|
|
|||
|
|
@ -295,15 +295,17 @@ void e1000e_ptp_init(struct e1000_adapter *adapter)
|
|||
case e1000_pch_cnp:
|
||||
case e1000_pch_tgp:
|
||||
case e1000_pch_adp:
|
||||
case e1000_pch_mtp:
|
||||
case e1000_pch_lnp:
|
||||
case e1000_pch_ptp:
|
||||
case e1000_pch_nvp:
|
||||
if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI)
|
||||
adapter->ptp_clock_info.max_adj = MAX_PPB_24MHZ;
|
||||
else
|
||||
adapter->ptp_clock_info.max_adj = MAX_PPB_38400KHZ;
|
||||
break;
|
||||
case e1000_pch_mtp:
|
||||
case e1000_pch_lnp:
|
||||
case e1000_pch_ptp:
|
||||
adapter->ptp_clock_info.max_adj = MAX_PPB_38400KHZ;
|
||||
break;
|
||||
case e1000_82574:
|
||||
case e1000_82583:
|
||||
adapter->ptp_clock_info.max_adj = MAX_PPB_25MHZ;
|
||||
|
|
|
|||
|
|
@ -377,6 +377,50 @@ ice_arfs_is_perfect_flow_set(struct ice_hw *hw, __be16 l3_proto, u8 l4_proto)
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_arfs_cmp - Check if aRFS filter matches this flow.
|
||||
* @fltr_info: filter info of the saved ARFS entry.
|
||||
* @fk: flow dissector keys.
|
||||
* @n_proto: One of htons(ETH_P_IP) or htons(ETH_P_IPV6).
|
||||
* @ip_proto: One of IPPROTO_TCP or IPPROTO_UDP.
|
||||
*
|
||||
* Since this function assumes limited values for n_proto and ip_proto, it
|
||||
* is meant to be called only from ice_rx_flow_steer().
|
||||
*
|
||||
* Return:
|
||||
* * true - fltr_info refers to the same flow as fk.
|
||||
* * false - fltr_info and fk refer to different flows.
|
||||
*/
|
||||
static bool
|
||||
ice_arfs_cmp(const struct ice_fdir_fltr *fltr_info, const struct flow_keys *fk,
|
||||
__be16 n_proto, u8 ip_proto)
|
||||
{
|
||||
/* Determine if the filter is for IPv4 or IPv6 based on flow_type,
|
||||
* which is one of ICE_FLTR_PTYPE_NONF_IPV{4,6}_{TCP,UDP}.
|
||||
*/
|
||||
bool is_v4 = fltr_info->flow_type == ICE_FLTR_PTYPE_NONF_IPV4_TCP ||
|
||||
fltr_info->flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP;
|
||||
|
||||
/* Following checks are arranged in the quickest and most discriminative
|
||||
* fields first for early failure.
|
||||
*/
|
||||
if (is_v4)
|
||||
return n_proto == htons(ETH_P_IP) &&
|
||||
fltr_info->ip.v4.src_port == fk->ports.src &&
|
||||
fltr_info->ip.v4.dst_port == fk->ports.dst &&
|
||||
fltr_info->ip.v4.src_ip == fk->addrs.v4addrs.src &&
|
||||
fltr_info->ip.v4.dst_ip == fk->addrs.v4addrs.dst &&
|
||||
fltr_info->ip.v4.proto == ip_proto;
|
||||
|
||||
return fltr_info->ip.v6.src_port == fk->ports.src &&
|
||||
fltr_info->ip.v6.dst_port == fk->ports.dst &&
|
||||
fltr_info->ip.v6.proto == ip_proto &&
|
||||
!memcmp(&fltr_info->ip.v6.src_ip, &fk->addrs.v6addrs.src,
|
||||
sizeof(struct in6_addr)) &&
|
||||
!memcmp(&fltr_info->ip.v6.dst_ip, &fk->addrs.v6addrs.dst,
|
||||
sizeof(struct in6_addr));
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_rx_flow_steer - steer the Rx flow to where application is being run
|
||||
* @netdev: ptr to the netdev being adjusted
|
||||
|
|
@ -448,6 +492,10 @@ ice_rx_flow_steer(struct net_device *netdev, const struct sk_buff *skb,
|
|||
continue;
|
||||
|
||||
fltr_info = &arfs_entry->fltr_info;
|
||||
|
||||
if (!ice_arfs_cmp(fltr_info, &fk, n_proto, ip_proto))
|
||||
continue;
|
||||
|
||||
ret = fltr_info->fltr_id;
|
||||
|
||||
if (fltr_info->q_index == rxq_idx ||
|
||||
|
|
|
|||
|
|
@ -508,10 +508,14 @@ ice_eswitch_attach(struct ice_pf *pf, struct ice_repr *repr, unsigned long *id)
|
|||
*/
|
||||
int ice_eswitch_attach_vf(struct ice_pf *pf, struct ice_vf *vf)
|
||||
{
|
||||
struct ice_repr *repr = ice_repr_create_vf(vf);
|
||||
struct devlink *devlink = priv_to_devlink(pf);
|
||||
struct ice_repr *repr;
|
||||
int err;
|
||||
|
||||
if (!ice_is_eswitch_mode_switchdev(pf))
|
||||
return 0;
|
||||
|
||||
repr = ice_repr_create_vf(vf);
|
||||
if (IS_ERR(repr))
|
||||
return PTR_ERR(repr);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user