diff --git a/backport-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch b/backport-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch deleted file mode 100644 index 34a7c14f23109aa991e91e001977399928ad02da..0000000000000000000000000000000000000000 --- a/backport-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 068c38ad88ccb09e5e966d4db5cedab0e02b3b95 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Wed, 26 Oct 2022 15:22:27 +0200 -Subject: [PATCH] Remove the obsolte u64_stats_fetch_*_irq users - -Conflict:NA -Reference:https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=068c38ad88ccb09e5e966d4db5ce -dab0e02b3b95 ---- - src/i40e_ethtool_stats.h | 8 ++++---- - src/i40e_main.c | 16 ++++++++-------- - 2 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/src/i40e_ethtool_stats.h b/src/i40e_ethtool_stats.h -index 0851064..e93acfe 100644 ---- a/src/i40e_ethtool_stats.h -+++ b/src/i40e_ethtool_stats.h -@@ -190,10 +190,10 @@ i40e_add_queue_stats(u64 **data, struct i40e_ring *ring) - */ - #ifdef HAVE_NDO_GET_STATS64 - do { -- start = !ring ? 0 : u64_stats_fetch_begin_irq(&ring->syncp); -+ start = !ring ? 0 : u64_stats_fetch_begin(&ring->syncp); - for (i = 0; i < size; i++) - i40e_add_one_ethtool_stat(&(*data)[i], ring, &stats[i]); -- } while (ring && u64_stats_fetch_retry_irq(&ring->syncp, start)); -+ } while (ring && u64_stats_fetch_retry(&ring->syncp, start)); - #else - for (i = 0; i < size; i++) - i40e_add_one_ethtool_stat(&(*data)[i], ring, &stats[i]); -@@ -237,14 +237,14 @@ i40e_add_rx_queue_xdp_stats(u64 **data, struct i40e_ring *rx_ring) - #ifdef HAVE_NDO_GET_STATS64 - do { - start = !rx_ring ? 0 : -- u64_stats_fetch_begin_irq(&rx_ring->syncp); -+ u64_stats_fetch_begin(&rx_ring->syncp); - #endif - for (i = 0; i < xdp_size; i++) { - i40e_add_one_ethtool_stat(&(*data)[i], rx_ring, - &xdp_stats[i]); - } - #ifdef HAVE_NDO_GET_STATS64 -- } while (rx_ring && u64_stats_fetch_retry_irq(&rx_ring->syncp, start)); -+ } while (rx_ring && u64_stats_fetch_retry(&rx_ring->syncp, start)); - #endif - - /* Once we successfully copy the stats in, update the data pointer */ -diff --git a/src/i40e_main.c b/src/i40e_main.c -index ed4271e..170f033 100644 ---- a/src/i40e_main.c -+++ b/src/i40e_main.c -@@ -482,10 +482,10 @@ static void i40e_get_netdev_stats_struct_tx(struct i40e_ring *ring, - unsigned int start; - - do { -- start = u64_stats_fetch_begin_irq(&ring->syncp); -+ start = u64_stats_fetch_begin(&ring->syncp); - packets = ring->stats.packets; - bytes = ring->stats.bytes; -- } while (u64_stats_fetch_retry_irq(&ring->syncp, start)); -+ } while (u64_stats_fetch_retry(&ring->syncp, start)); - - stats->tx_packets += packets; - stats->tx_bytes += bytes; -@@ -541,10 +541,10 @@ static struct rtnl_link_stats64 *i40e_get_netdev_stats_struct( - rx_ring = &tx_ring[1]; - - do { -- start = u64_stats_fetch_begin_irq(&rx_ring->syncp); -+ start = u64_stats_fetch_begin(&rx_ring->syncp); - packets = rx_ring->stats.packets; - bytes = rx_ring->stats.bytes; -- } while (u64_stats_fetch_retry_irq(&rx_ring->syncp, start)); -+ } while (u64_stats_fetch_retry(&rx_ring->syncp, start)); - - stats->rx_packets += packets; - stats->rx_bytes += bytes; -@@ -1011,12 +1011,12 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) - - #ifdef HAVE_NDO_GET_STATS64 - do { -- start = u64_stats_fetch_begin_irq(&p->syncp); -+ start = u64_stats_fetch_begin(&p->syncp); - #endif - packets = p->stats.packets; - bytes = p->stats.bytes; - #ifdef HAVE_NDO_GET_STATS64 -- } while (u64_stats_fetch_retry_irq(&p->syncp, start)); -+ } while (u64_stats_fetch_retry(&p->syncp, start)); - #endif - tx_b += bytes; - tx_p += packets; -@@ -1030,12 +1030,12 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) - p = &p[1]; - #ifdef HAVE_NDO_GET_STATS64 - do { -- start = u64_stats_fetch_begin_irq(&p->syncp); -+ start = u64_stats_fetch_begin(&p->syncp); - #endif - packets = p->stats.packets; - bytes = p->stats.bytes; - #ifdef HAVE_NDO_GET_STATS64 -- } while (u64_stats_fetch_retry_irq(&p->syncp, start)); -+ } while (u64_stats_fetch_retry(&p->syncp, start)); - #endif - rx_b += bytes; - rx_p += packets; --- -2.23.0 - diff --git a/backport-use-mul_u64_u64_div_u64-and-convert-.adjfreq-to-.adjfine.patch b/backport-use-mul_u64_u64_div_u64-and-convert-.adjfreq-to-.adjfine.patch deleted file mode 100644 index a6960499c6bf44148cc42230fd8d21fb24581785..0000000000000000000000000000000000000000 --- a/backport-use-mul_u64_u64_div_u64-and-convert-.adjfreq-to-.adjfine.patch +++ /dev/null @@ -1,87 +0,0 @@ -From cdd3bf98592117f59be2daa0f2ca00f352d7abbc Mon Sep 17 00:00:00 2001 -From: Jacob Keller -Date: Thu, 21 Jul 2022 14:29:59 -0700 -Subject: [PATCH] use mul_u64_u64_div_u64 and convert .adjfreq to .adjfine - -Conflict:NA -Reference:https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ccd3bf98592117f59be2daa0f2ca00f352d7abbc - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3626a690b717c18a969274e1fe000f8885d5afad - ---- - src/i40e_ptp.c | 35 ++++++++++++++--------------------- - 1 file changed, 14 insertions(+), 21 deletions(-) - -diff --git a/src/i40e_ptp.c b/src/i40e_ptp.c -index a94b774..710c02b 100644 ---- a/src/i40e_ptp.c -+++ b/src/i40e_ptp.c -@@ -349,44 +349,37 @@ static void i40e_ptp_convert_to_hwtstamp(struct skb_shared_hwtstamps *hwtstamps, - } - - /** -- * i40e_ptp_adjfreq - Adjust the PHC frequency -+ * i40e_ptp_adjfine - Adjust the PHC frequency - * @ptp: The PTP clock structure -- * @ppb: Parts per billion adjustment from the base -+ * @scaled_ppm: Scaled_ppm Parts per million adjustment from the base - * -- * Adjust the frequency of the PHC by the indicated parts per billion from the -- * base frequency. -+ * Adjust the frequency of the PHC by the indicated delta from the base -+ * frequency. -+ * -+ * Scaled parts per million is ppm with a 16 bit binary fractional filed. - **/ --static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) -+static int i40e_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm) - { - struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); - struct i40e_hw *hw = &pf->hw; - u64 adj, freq, diff; - int neg_adj = 0; - -- if (ppb < 0) { -+ if (scaled_ppm < 0) { - neg_adj = 1; -- ppb = -ppb; -+ scaled_ppm = -scaled_ppm; - } - -- freq = I40E_PTP_40GB_INCVAL; -- freq *= ppb; -- diff = div_u64(freq, 1000000000ULL); -+ smp_mb(); /* Force any pending update before accessing. */ -+ freq = I40E_PTP_40GB_INCVAL * READ_ONCE(pf->ptp_adj_mult); -+ diff = mul_u64_u64_div_u64(freq, (u64)scaled_ppm, -+ 1000000000ULL << 16); - - if (neg_adj) - adj = I40E_PTP_40GB_INCVAL - diff; - else - adj = I40E_PTP_40GB_INCVAL + diff; - -- /* At some link speeds, the base incval is so large that directly -- * multiplying by ppb would result in arithmetic overflow even when -- * using a u64. Avoid this by instead calculating the new incval -- * always in terms of the 40GbE clock rate and then multiplying by the -- * link speed factor afterwards. This does result in slightly lower -- * precision at lower link speeds, but it is fairly minor. -- */ -- smp_mb(); /* Force any pending update before accessing. */ -- adj *= READ_ONCE(pf->ptp_adj_mult); -- - wr32(hw, I40E_PRTTSYN_INC_L, (u32)adj); - wr32(hw, I40E_PRTTSYN_INC_H, (u32)(adj >> 32)); - -@@ -1558,7 +1551,7 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf) - sizeof(pf->ptp_caps.name) - 1); - pf->ptp_caps.owner = THIS_MODULE; - pf->ptp_caps.max_adj = 999999999; -- pf->ptp_caps.adjfreq = i40e_ptp_adjfreq; -+ pf->ptp_caps.adjfine = i40e_ptp_adjfine; - pf->ptp_caps.adjtime = i40e_ptp_adjtime; - #ifdef HAVE_PTP_CLOCK_INFO_GETTIME64 - pf->ptp_caps.gettime64 = i40e_ptp_gettime; --- -2.23.0 - diff --git a/i40e-2.22.8.tar.gz b/i40e-2.22.8.tar.gz deleted file mode 100644 index f09c5013aca43d1e57d46ff5cf067fb571d8c6dc..0000000000000000000000000000000000000000 Binary files a/i40e-2.22.8.tar.gz and /dev/null differ diff --git a/i40e-2.24.6.tar.gz b/i40e-2.24.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..108b98874a1b71335e3e714745b9ec4f7f7fb6b2 Binary files /dev/null and b/i40e-2.24.6.tar.gz differ diff --git a/i40e.spec b/i40e.spec index 18b15f5d218b6a76f6e16c6eced3409f372d9643..030bed3d566f898132de6000e4f24d3c5766d8ff 100644 --- a/i40e.spec +++ b/i40e.spec @@ -8,15 +8,12 @@ Name: i40e Summary: Intel(R) 40-10 Gigabit Ethernet Connection Network Driver -Version: 2.22.8 -Release: 3 +Version: 2.24.6 +Release: 1 Vendor: Intel Corporation License: GPL-2.0 URL: http://support.intel.com -Source0: https://downloadmirror.intel.com/763931/%{name}-%{version}.tar.gz - -Patch6000: backport-Remove-the-obsolte-u64_stats_fetch_-_irq-users.patch -Patch6001: backport-use-mul_u64_u64_div_u64-and-convert-.adjfreq-to-.adjfine.patch +Source0: https://downloadmirror.intel.com/812528/%{name}-%{version}.tar.gz Requires: kernel, findutils, gawk, bash, hwdata @@ -384,6 +381,12 @@ else fi %changelog +* Fri Jan 19 2024 chengyechun - 2.24.6-1 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:update i40e version to 2.24.6 to fix kernel-6.6 based build error + * Wed Jul 26 2023 chengyechun - 2.22.8-3 - Type:bugfix - ID:NA