From nobody Tue Feb 8 15:13:44 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9972619C2DA7; Tue, 8 Feb 2022 15:13:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JtRNn1fqQz4dXs; Tue, 8 Feb 2022 15:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644333225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JcKGGp3imCyEMUWMI7EvCUeyAjyBVRaJ3bLIhZ+l7jg=; b=SK4vMFyizjmjuCTNu4uCUKRiiDNGqGDSeVr0xO+GeMLIraVdW8L2kv4oyVLLCb0g8bFkOF r0qxR/CvgypN+we20BNKyFROw+1TZULQLc3M/U3u9BzXyaOPHz6ln43K7fOwUipcJp/PHN /RkXKu1PgU4aOyVty0yNrlupqX2A3EbJwVRZQ6J2+DSSXp5wnImziBqN8YXfBy1OVhx7xZ 5F6D+NtnGtUUmBpiIyZuic4C1wK+z5vWjovzD2MPiIS+el7N/oeIrD/let0SBIvUCrWwMS nIh/+BBzFm8a4A8wbuMjiAWjj72FU8jzWcuOzSzm+tYEaMlzui9HYQXqPj9AIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CAE1E1B7D8; Tue, 8 Feb 2022 15:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 218FDicO020360; Tue, 8 Feb 2022 15:13:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 218FDi0T020359; Tue, 8 Feb 2022 15:13:44 GMT (envelope-from git) Date: Tue, 8 Feb 2022 15:13:44 GMT Message-Id: <202202081513.218FDi0T020359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: ecf32f2daa78 - stable/13 - mlx5: Remove support for FreeBSD 10 and older. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ecf32f2daa7803d36ea1dc5797c890bb306f21a3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644333225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JcKGGp3imCyEMUWMI7EvCUeyAjyBVRaJ3bLIhZ+l7jg=; b=vWFKLjLt2UkoCiVe2h4zbBc9933qpKexFyXGxvKcM9fL7dh+UIo4qWEsfLnduYqzCS1vLS R/m+CTwB7R+s2MvrqUr/xznsyxiI7muO7mzlBXMsM7sXiQ6T36sMnLFLtXw48hzhroVD5H TwsNESCHYte1q4ohnYppgrncPvgiWACdP69E/26wmlKr+Aid3wPqxqFAp8tjpTAKt16pau FFK5ZFHNw7jZ0E7EAy5bD/4Cia6de2YrsrZF0KLgy1vdr8sxsYHg6Pjf8tVt/pHvbVwYH8 /lQDLfa94gHneLKqLd/iuoTq/7yRudZc7eoxqtJcpdYwFoOYgMRjsmTxJ1Dg1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644333225; a=rsa-sha256; cv=none; b=OrNBmFWyoFcZIaO6IvJxZs5YYHyJq/VqsTOZ8jAFHXFe7xlS2ARlNWxAJtMUkp5IChuOKy YQUpT1dRix+iXhuWO/ufVZK88rld2HVi/X7Nlxhrquy5m6WjOGOBrIhlOlimijbnNztF3D kVi5qdP9OAY5w273hVoChRvNd03hZxHPMTTvLUv6JuD96283Rk/x6tBTgUcwQ4du1jR2xf BI4ED0rzr3556Lx2g5ErwSvYFRshf30rhkWOFXbU514S6Vo6voYioDmMZ8xKwxbWGLljAq 73B1kJd+43ZCXaO1Jogk9DAKf0M5C0kWuKZwfWZZuleE1gadwY13pJivrFQnlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=ecf32f2daa7803d36ea1dc5797c890bb306f21a3 commit ecf32f2daa7803d36ea1dc5797c890bb306f21a3 Author: Hans Petter Selasky AuthorDate: 2022-02-08 15:08:51 +0000 Commit: Hans Petter Selasky CommitDate: 2022-02-08 15:08:51 +0000 mlx5: Remove support for FreeBSD 10 and older. Sponsored by: NVIDIA Networking (cherry picked from commit 788e9e74780e85aca8863ac4871b2f265b6630a3) --- sys/dev/mlx5/driver.h | 2 -- sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c | 14 ---------- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 47 ---------------------------------- sys/dev/mlx5/mlx5_en/mlx5_en_tx.c | 10 -------- 4 files changed, 73 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 614a308e8e2f..0bb2621fec6b 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -388,9 +388,7 @@ struct mlx5_core_psv { struct mlx5_core_sig_ctx { struct mlx5_core_psv psv_memory; struct mlx5_core_psv psv_wire; -#if (__FreeBSD_version >= 1100000) struct ib_sig_err err_item; -#endif bool sig_status_checked; bool sig_err_exists; u32 sigerr_count; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c index 11f47e3f8aa3..9423e274de81 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c @@ -1474,9 +1474,6 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) CTLFLAG_MPSAFE, priv, x, &mlx5e_ethtool_handler, "QU", mlx5e_params_desc[2 * x + 1]); } else { -#if (__FreeBSD_version < 1100000) - char path[64]; -#endif /* * NOTE: In FreeBSD-11 and newer the * CTLFLAG_RWTUN flag will take care of @@ -1487,17 +1484,6 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) mlx5e_params_desc[2 * x], CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, priv, x, &mlx5e_ethtool_handler, "QU", mlx5e_params_desc[2 * x + 1]); - -#if (__FreeBSD_version < 1100000) - /* compute path for sysctl */ - snprintf(path, sizeof(path), "dev.mce.%d.conf.%s", - device_get_unit(priv->mdev->pdev->dev.bsddev), - mlx5e_params_desc[2 * x]); - - /* try to fetch tunable, if any */ - if (TUNABLE_QUAD_FETCH(path, &priv->params_ethtool.arg[x])) - mlx5e_ethtool_handler(NULL, priv, x, NULL); -#endif } } diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 4209e3fde72f..126884210b58 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -803,10 +803,6 @@ mlx5e_update_stats_locked(struct mlx5e_priv *priv) struct mlx5_core_dev *mdev = priv->mdev; struct mlx5e_vport_stats *s = &priv->stats.vport; struct mlx5e_sq_stats *sq_stats; -#if (__FreeBSD_version < 1100000) - struct ifnet *ifp = priv->ifp; -#endif - u32 in[MLX5_ST_SZ_DW(query_vport_counter_in)]; u32 *out; int outlen = MLX5_ST_SZ_BYTES(query_vport_counter_out); @@ -979,24 +975,6 @@ mlx5e_update_stats_locked(struct mlx5e_priv *priv) priv->stats.port_stats_debug.tx_stat_p4096to8191octets + priv->stats.port_stats_debug.tx_stat_p8192to10239octets; -#if (__FreeBSD_version < 1100000) - /* no get_counters interface in fbsd 10 */ - ifp->if_ipackets = s->rx_packets; - ifp->if_ierrors = priv->stats.pport.in_range_len_errors + - priv->stats.pport.out_of_range_len + - priv->stats.pport.too_long_errors + - priv->stats.pport.check_seq_err + - priv->stats.pport.alignment_err; - ifp->if_iqdrops = s->rx_out_of_buffer; - ifp->if_opackets = s->tx_packets; - ifp->if_oerrors = priv->stats.port_stats_debug.out_discards; - ifp->if_snd.ifq_drops = s->tx_queue_dropped; - ifp->if_ibytes = s->rx_bytes; - ifp->if_obytes = s->tx_bytes; - ifp->if_collisions = - priv->stats.pport.collisions; -#endif - free_out: kvfree(out); @@ -3206,7 +3184,6 @@ mlx5e_close_locked(struct ifnet *ifp) return (0); } -#if (__FreeBSD_version >= 1100000) static uint64_t mlx5e_get_counter(struct ifnet *ifp, ift_counter cnt) { @@ -3259,7 +3236,6 @@ mlx5e_get_counter(struct ifnet *ifp, ift_counter cnt) /* PRIV_UNLOCK(priv); XXX not allowed */ return (retval); } -#endif static void mlx5e_set_rx_mode(struct ifnet *ifp) @@ -4098,9 +4074,6 @@ done: static void mlx5e_setup_pauseframes(struct mlx5e_priv *priv) { -#if (__FreeBSD_version < 1100000) - char path[96]; -#endif int error; /* enable pauseframes by default */ @@ -4111,22 +4084,6 @@ mlx5e_setup_pauseframes(struct mlx5e_priv *priv) priv->params.tx_priority_flow_control = 0; priv->params.rx_priority_flow_control = 0; -#if (__FreeBSD_version < 1100000) - /* compute path for sysctl */ - snprintf(path, sizeof(path), "dev.mce.%d.tx_pauseframe_control", - device_get_unit(priv->mdev->pdev->dev.bsddev)); - - /* try to fetch tunable, if any */ - TUNABLE_INT_FETCH(path, &priv->params.tx_pauseframe_control); - - /* compute path for sysctl */ - snprintf(path, sizeof(path), "dev.mce.%d.rx_pauseframe_control", - device_get_unit(priv->mdev->pdev->dev.bsddev)); - - /* try to fetch tunable, if any */ - TUNABLE_INT_FETCH(path, &priv->params.rx_pauseframe_control); -#endif - /* register pauseframe SYSCTLs */ SYSCTL_ADD_INT(&priv->sysctl_ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), OID_AUTO, "tx_pauseframe_control", CTLFLAG_RDTUN, @@ -4443,9 +4400,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) ifp->if_ioctl = mlx5e_ioctl; ifp->if_transmit = mlx5e_xmit; ifp->if_qflush = if_qflush; -#if (__FreeBSD_version >= 1100000) ifp->if_get_counter = mlx5e_get_counter; -#endif ifp->if_snd.ifq_maxlen = ifqmaxlen; /* * Set driver features @@ -4900,8 +4855,6 @@ mlx5e_cleanup(void) module_init_order(mlx5e_init, SI_ORDER_SIXTH); module_exit_order(mlx5e_cleanup, SI_ORDER_SIXTH); -#if (__FreeBSD_version >= 1100000) MODULE_DEPEND(mlx5en, linuxkpi, 1, 1, 1); -#endif MODULE_DEPEND(mlx5en, mlx5, 1, 1, 1); MODULE_VERSION(mlx5en, 1); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c index 35ab3d016392..24899ef0b881 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c @@ -75,7 +75,6 @@ mlx5e_send_nop(struct mlx5e_sq *sq, u32 ds_cnt) sq->pc += sq->mbuf[pi].num_wqebbs; } -#if (__FreeBSD_version >= 1100000) static uint32_t mlx5e_hash_value; static void @@ -86,7 +85,6 @@ mlx5e_hash_init(void *arg) /* Make kernel call mlx5e_hash_init after the random stack finished initializing */ SYSINIT(mlx5e_hash_init, SI_SUB_RANDOM, SI_ORDER_ANY, &mlx5e_hash_init, NULL); -#endif static struct mlx5e_sq * mlx5e_select_queue_by_send_tag(struct ifnet *ifp, struct mbuf *mb) @@ -166,16 +164,8 @@ mlx5e_select_queue(struct ifnet *ifp, struct mbuf *mb) #endif ch = (mb->m_pkthdr.flowid % 128) % ch; } else { -#if (__FreeBSD_version >= 1100000) ch = m_ether_tcpip_hash(MBUF_HASHFLAG_L3 | MBUF_HASHFLAG_L4, mb, mlx5e_hash_value) % ch; -#else - /* - * m_ether_tcpip_hash not present in stable, so just - * throw unhashed mbufs on queue 0 - */ - ch = 0; -#endif } /* check if send queue is running */