Commit 67c18052 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

pkgdep/git: Bump ICE driver to the latest release



Change-Id: I20d0c636a6b8ee1b1d793fa7f3e18b8f1db219d8
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23472


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 7939c642
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -395,17 +395,6 @@ function install_ice() {

	curl -L -o- "$ICE_DRIVER" | tar -C "$GIT_REPOS" -xzf -

	if ge "$kernel_ver" 6.7.0; then
		patch --dir="$GIT_REPOS/ice-$ICE_VERSION/src" \
			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-devlink_fmsg.patch"
		patch --dir="$GIT_REPOS/ice-$ICE_VERSION/src" \
			< "$rootdir/test/common/config/pkgdep/patches/ice/0001-xdp_do_flush_map.patch"
	fi

	if ge "$kernel_ver" 6.8.0; then
		patch --dir="$GIT_REPOS/ice-$ICE_VERSION/src"
	fi < "$rootdir/test/common/config/pkgdep/patches/ice/0001-ethtool-set-get-rxfh-params.patch"

	(
		cd "$GIT_REPOS/ice-$ICE_VERSION/src"
		sudo make -j"$(nproc)" install
@@ -522,7 +511,7 @@ function install_sources() {

GIT_VERSION=2.25.1
IRDMA_VERSION=1.14.31
ICE_VERSION=1.13.7
ICE_VERSION=1.14.9

BPFTRACE_VERSION=${BPFTRACE_VERSION:-db63ddb}
VFIO_QEMU_BRANCH=${VFIO_QEMU_BRANCH:-vfio-user-p3.0}
+0 −70
Original line number Diff line number Diff line
See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=db80d3b255
---
 src/ice_devlink.c | 43 ++++++++-----------------------------------
 1 file changed, 8 insertions(+), 35 deletions(-)

diff --git a/src/ice_devlink.c b/src/ice_devlink.c
index c2d129c..73bdc37 100644
--- a/src/ice_devlink.c
+++ b/src/ice_devlink.c
@@ -2717,49 +2717,22 @@ ice_mdd_reporter_dump(struct devlink_health_reporter *reporter,
 	struct ice_pf *pf = devlink_health_reporter_priv(reporter);
 	struct ice_mdd_reporter *mdd_reporter = &pf->mdd_reporter;
 	struct ice_mdd_event *mdd_event;
-	int err;
 
-	err = devlink_fmsg_u32_pair_put(fmsg, "count",
-					mdd_reporter->count);
-	if (err)
-		return err;
+	devlink_fmsg_u32_pair_put(fmsg, "count", mdd_reporter->count);
 
 	list_for_each_entry(mdd_event, &mdd_reporter->event_list, list) {
 		char *src;
 
-		err = devlink_fmsg_obj_nest_start(fmsg);
-		if (err)
-			return err;
+		devlink_fmsg_obj_nest_start(fmsg);
 
 		src = ICE_MDD_SRC_TO_STR(mdd_event->src);
 
-		err = devlink_fmsg_string_pair_put(fmsg, "src", src);
-		if (err)
-			return err;
-
-		err = devlink_fmsg_u8_pair_put(fmsg, "pf_num",
-					       mdd_event->pf_num);
-		if (err)
-			return err;
-
-		err = devlink_fmsg_u32_pair_put(fmsg, "mdd_vf_num",
-						mdd_event->vf_num);
-		if (err)
-			return err;
-
-		err = devlink_fmsg_u8_pair_put(fmsg, "mdd_event",
-					       mdd_event->event);
-		if (err)
-			return err;
-
-		err = devlink_fmsg_u32_pair_put(fmsg, "mdd_queue",
-						mdd_event->queue);
-		if (err)
-			return err;
-
-		err = devlink_fmsg_obj_nest_end(fmsg);
-		if (err)
-			return err;
+		devlink_fmsg_string_pair_put(fmsg, "src", src);
+		devlink_fmsg_u8_pair_put(fmsg, "pf_num", mdd_event->pf_num);
+		devlink_fmsg_u32_pair_put(fmsg, "mdd_vf_num", mdd_event->vf_num);
+		devlink_fmsg_u8_pair_put(fmsg, "mdd_event", mdd_event->event);
+		devlink_fmsg_u32_pair_put(fmsg, "mdd_queue", mdd_event->queue);
+		devlink_fmsg_obj_nest_end(fmsg);
 	}
 
 	return 0;
-- 
2.43.0
+0 −121
Original line number Diff line number Diff line
Adjust use of ethtool_ops as per recent changes in 6.8.x. This patch is
based on changes applied to the upstream ICE driver via the following
commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fb6e30a72539

---
 src/ice_ethtool.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/ice_ethtool.c b/src/ice_ethtool.c
index e1eeb16..155d38d 100644
--- a/src/ice_ethtool.c
+++ b/src/ice_ethtool.c
@@ -4739,7 +4739,7 @@ static u32 ice_get_rxfh_indir_size(struct net_device *netdev)
  * Reads the indirection table directly from the hardware.
  */
 static int
-ice_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, u8 *hfunc)
+ice_get_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh)
 #else
 static int ice_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key)
 #endif
@@ -4751,11 +4751,10 @@ static int ice_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key)
 	u8 *lut;
 
 #ifdef HAVE_RXFH_HASHFUNC
-	if (hfunc)
-		*hfunc = ETH_RSS_HASH_TOP;
+	rxfh->hfunc = ETH_RSS_HASH_TOP;
 #endif
 
-	if (!indir)
+	if (!rxfh->indir)
 		return 0;
 
 	if (!test_bit(ICE_FLAG_RSS_ENA, pf->flags)) {
@@ -4768,7 +4767,7 @@ static int ice_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key)
 	if (!lut)
 		return -ENOMEM;
 
-	err = ice_get_rss_key(vsi, key);
+	err = ice_get_rss_key(vsi, rxfh->key);
 	if (err)
 		goto out;
 
@@ -4777,7 +4776,7 @@ static int ice_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key)
 		goto out;
 
 	for (i = 0; i < vsi->rss_table_size; i++)
-		indir[i] = (u32)(lut[i]);
+		rxfh->indir[i] = (u32)(lut[i]);
 
 out:
 	kfree(lut);
@@ -4796,8 +4795,7 @@ out:
  * returns 0 after programming the table.
  */
 static int
-ice_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key,
-	     const u8 hfunc)
+ice_set_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh, struct netlink_ext_ack *extack)
 #elif defined(HAVE_RXFH_NONCONST)
 static int ice_set_rxfh(struct net_device *netdev, u32 *indir, u8 *key)
 #else
@@ -4813,7 +4811,7 @@ ice_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key)
 
 	dev = ice_pf_to_dev(pf);
 #ifdef HAVE_RXFH_HASHFUNC
-	if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)
+	if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE && rxfh->hfunc != ETH_RSS_HASH_TOP)
 		return -EOPNOTSUPP;
 #endif
 
@@ -4824,11 +4822,11 @@ ice_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key)
 	}
 
 	/* Verify user input. */
-	if (indir) {
+	if (rxfh->indir) {
 		int i;
 
 		for (i = 0; i < vsi->rss_table_size; i++)
-			if (indir[i] >= vsi->rss_size)
+			if (rxfh->indir[i] >= vsi->rss_size)
 				return -EINVAL;
 	}
 
@@ -4839,7 +4837,7 @@ ice_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key)
 	}
 
 #endif /* NETIF_F_HW_TC */
-	if (key) {
+	if (rxfh->key) {
 		if (!vsi->rss_hkey_user) {
 			vsi->rss_hkey_user = devm_kzalloc(dev,
 							  ICE_VSIQF_HKEY_ARRAY_SIZE,
@@ -4847,7 +4845,7 @@ ice_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key)
 			if (!vsi->rss_hkey_user)
 				return -ENOMEM;
 		}
-		memcpy(vsi->rss_hkey_user, key, ICE_VSIQF_HKEY_ARRAY_SIZE);
+		memcpy(vsi->rss_hkey_user, rxfh->key, ICE_VSIQF_HKEY_ARRAY_SIZE);
 
 		err = ice_set_rss_key(vsi, vsi->rss_hkey_user);
 		if (err)
@@ -4862,11 +4860,11 @@ ice_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key)
 	}
 
 	/* Each 32 bits pointed by 'indir' is stored with a lut entry */
-	if (indir) {
+	if (rxfh->indir) {
 		int i;
 
 		for (i = 0; i < vsi->rss_table_size; i++)
-			vsi->rss_lut_user[i] = (u8)(indir[i]);
+			vsi->rss_lut_user[i] = (u8)(rxfh->indir[i]);
 	} else {
 		ice_fill_rss_lut(vsi->rss_lut_user, vsi->rss_table_size,
 				 vsi->rss_size);
-- 
+0 −61
Original line number Diff line number Diff line
See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=75cec20345
---
 src/ice_txrx_lib.c |  2 +-
 src/kcompat.h      |  3 ---
 src/kcompat_impl.h | 14 --------------
 3 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/src/ice_txrx_lib.c b/src/ice_txrx_lib.c
index a392715..f7e26d9 100644
--- a/src/ice_txrx_lib.c
+++ b/src/ice_txrx_lib.c
@@ -382,7 +382,7 @@ int ice_xmit_xdp_buff(struct xdp_buff *xdp, struct ice_tx_ring *xdp_ring)
 void ice_finalize_xdp_rx(struct ice_rx_ring *rx_ring, unsigned int xdp_res)
 {
 	if (xdp_res & ICE_XDP_REDIR)
-		xdp_do_flush_map();
+		xdp_do_flush();
 
 	if (xdp_res & ICE_XDP_TX) {
 		struct ice_tx_ring *xdp_ring =
diff --git a/src/kcompat.h b/src/kcompat.h
index ad47afb..b31745d 100644
--- a/src/kcompat.h
+++ b/src/kcompat.h
@@ -2657,9 +2657,6 @@ static inline bool uuid_equal(const uuid_t *u1, const uuid_t *u2)
 #define from_timer(var, callback_timer, timer_fieldname) \
 	container_of(callback_timer, typeof(*var), timer_fieldname)
 
-#ifndef xdp_do_flush_map
-#define xdp_do_flush_map() do {} while (0)
-#endif
 struct _kc_xdp_buff {
 	void *data;
 	void *data_end;
diff --git a/src/kcompat_impl.h b/src/kcompat_impl.h
index 1af9f7f..0b98b7e 100644
--- a/src/kcompat_impl.h
+++ b/src/kcompat_impl.h
@@ -2150,20 +2150,6 @@ static inline void *__must_check krealloc_array(void *p,
 }
 #endif /* NEED_KREALLOC_ARRAY */
 
-/* NEED_XDP_DO_FLUSH
- *
- * Upstream commit 1d233886dd90 ("xdp: Use bulking for non-map XDP_REDIRECT
- * and consolidate code paths") replaced xdp_do_flush_map with xdp_do_flush
- * and 7f04bd109d4c ("net: Tree wide: Replace xdp_do_flush_map() with 
- * xdp_do_flush()") cleaned up related code.
- */
-#ifdef NEED_XDP_DO_FLUSH
-static inline void xdp_do_flush(void)
-{
-	xdp_do_flush_map();
-}
-#endif /* NEED_XDP_DO_FLUSH */
-
 #ifdef NEED_XDP_FEATURES
 enum netdev_xdp_act {
 	NETDEV_XDP_ACT_BASIC = 1,
--