From nobody Tue Feb 01 15:24:07 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 6A3DD1914EB9; Tue, 1 Feb 2022 15:24:08 +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 4Jp7y00Wmjz3FmC; Tue, 1 Feb 2022 15:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643729048; 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=/s0ezLViSY5gdLvsJKBoOsnaQpS73/P6ix84QhBVzDI=; b=PHFgrzdFqwiRIreo6U2INjnxO5dy2bkF8jj1zXYOk2LNaIE29qUwaeCn16X4wYr+jT+aGg I0G0JdAB3BDr7cmmnvjf6gCq/up/ntcaY4pxcM7ix39vu51P44A502Kmj1JGPxvbDl4il1 dQpt/CeFZov7RPOfVCQgc/EBOzSDTskwAsSNeOYXwpE7e63BcnYe1a5Y6T9WFq6ElJuI+6 bCq0sTCFGWr9Jm0qG2Iz7UtO9sHfvT5Bj5UGnVyxq8vmQANkSC5KDzRBcVT1pOT2cRA3Q6 AOy69fzPtcBVyZJ4uKyFTRcuFCqcBR81D3YPZ+//9TAIdcMGx6z6ahjDYNFbdg== 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 B7DB013592; Tue, 1 Feb 2022 15:24:07 +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 211FO7MM050592; Tue, 1 Feb 2022 15:24:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 211FO7Rx050591; Tue, 1 Feb 2022 15:24:07 GMT (envelope-from git) Date: Tue, 1 Feb 2022 15:24:07 GMT Message-Id: <202202011524.211FO7Rx050591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 788e9e74780e - main - 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/main X-Git-Reftype: branch X-Git-Commit: 788e9e74780e85aca8863ac4871b2f265b6630a3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643729048; 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=/s0ezLViSY5gdLvsJKBoOsnaQpS73/P6ix84QhBVzDI=; b=iShkRe4jdktA6KW8C/6++3M25TOp+zbbGLfrMeTr++h9TcNCpf/U8ejNS7BPl85/awW9Bp oHmEIxR9G5NVakKo4XK9Qs0rL9rO415VP5BIExSIqxicNkIoEfZRg+VBMSY6cwn43n5uKn qigQAGqmAf445YfVFJvOoIwGaAukelmvF62mJc5BQCF5JEFR4jKNUbNU6CYnAoa6FoINQv W3VcYOsynFb/T/eyJI9OWuL+/x1T6yr0glQ0+3feZCt+VxLPTUMXlgbbIlNJDFgWeoleqs mPLc7EhJjdwmOQh8bWJBcFgcf4QP89j1/LP0+by4Ju7ZwC++g9n8JCHDiGj/Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643729048; a=rsa-sha256; cv=none; b=elag9dTHYQ8QANtND5yhAa5+oRdZHleEqQTuVHs3F2ymCa0wGErKu3yuhAP+4xzuyTSMxX 7qSpbup4SfHjgIEvCjAeKryYiMB6TWAlieaVDyD67noCK/msiJW2C7rw3CpqARwiiNZ7rP dKUXZNm+PRWw1UlQX+rxDEmeXsYg9VOxZwKERt/m85fRkcTpBwRpmEmmbphiLedzhnrOQE aYxwScvCLWhzcv/KuDhPE2X0TozNgrknc200dcP1kIrcakVuYgs04BSRlgzl5YSWTRX/kp 2YGIKQIEbXv4peoT5Sn0+f1tJ2UP2klqsfXHtO9n3KV+vol/AV8VkM/d8Nughg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=788e9e74780e85aca8863ac4871b2f265b6630a3 commit 788e9e74780e85aca8863ac4871b2f265b6630a3 Author: Hans Petter Selasky AuthorDate: 2022-02-01 15:20:05 +0000 Commit: Hans Petter Selasky CommitDate: 2022-02-01 15:21:13 +0000 mlx5: Remove support for FreeBSD 10 and older. MFC after: 1 week Sponsored by: NVIDIA Networking --- 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 672742773442..f13de140d4ef 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 6eb266f37761..4477d5fd53dc 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -811,10 +811,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); @@ -987,24 +983,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); @@ -3214,7 +3192,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) { @@ -3267,7 +3244,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) @@ -4106,9 +4082,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 */ @@ -4119,22 +4092,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, @@ -4377,9 +4334,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 @@ -4831,8 +4786,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 1bf3a857d1e8..ea7f63efceae 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 */