View Issue Details

IDProjectCategoryView StatusLast Update
0000662channel: elrepo/el7kmod-forcedethpublic2016-07-17 05:31
Reporterdeatrich Assigned Topperry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000662: forcedeth driver no longer compiles against RHEL/CentOS/SL 7.2
DescriptionYou can see that others have discovered that the forcedeth driver no longer compiles against RHEL 7 variants:

http://comments.gmane.org/gmane.linux.rpm.elrepo.user/1706

I looked into it, and created a possible patch for this. I am not an expert, but the macros I replaced seem logical - apologies if it was daft. I attach the patch to this report.

I successfully built the driver against Scientific Linux 7.2, and was able to add this kmod driver to a modified anaconda kernel driver tree, and kickstart-ed an old Sun node with this network interface.
Additional Information## node up for a few days now
# uptime
 09:49:20 up 4 days, 22:22, 1 user, load average: 0.00, 0.01, 0.05
# uname -r
3.10.0-327.18.2.el7.x86_64

# cat /etc/redhat-release
Scientific Linux release 7.2 (Nitrogen)

# netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 9000 5507842 0 0 0 517437 0 0 0 BMRU
lo 65536 120 0 0 0 120 0 0 0 LRU

# ethtool -i eth0
driver: forcedeth
version: 0.65
firmware-version:
bus-info: 0000:00:0a.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
TagsNo tags attached.
Attached Files
forcedeth-rhel7.2.patch (1,744 bytes)   
--- forcedeth-0.64/forcedeth.c.orig	2014-07-06 18:55:56.000000000 -0700
+++ forcedeth-0.64/forcedeth.c	2016-06-16 17:34:36.618221252 -0700
@@ -42,7 +42,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#define FORCEDETH_VERSION		"0.64"
+#define FORCEDETH_VERSION		"0.65"
 #define DRV_NAME			"forcedeth"
 
 #include <linux/module.h>
@@ -1755,19 +1755,19 @@
 
 	/* software stats */
 	do {
-		syncp_start = u64_stats_fetch_begin_bh(&np->swstats_rx_syncp);
+		syncp_start = u64_stats_fetch_begin_irq(&np->swstats_rx_syncp);
 		storage->rx_packets       = np->stat_rx_packets;
 		storage->rx_bytes         = np->stat_rx_bytes;
 		storage->rx_dropped       = np->stat_rx_dropped;
 		storage->rx_missed_errors = np->stat_rx_missed_errors;
-	} while (u64_stats_fetch_retry_bh(&np->swstats_rx_syncp, syncp_start));
+	} while (u64_stats_fetch_retry_irq(&np->swstats_rx_syncp, syncp_start));
 
 	do {
-		syncp_start = u64_stats_fetch_begin_bh(&np->swstats_tx_syncp);
+		syncp_start = u64_stats_fetch_begin_irq(&np->swstats_tx_syncp);
 		storage->tx_packets = np->stat_tx_packets;
 		storage->tx_bytes   = np->stat_tx_bytes;
 		storage->tx_dropped = np->stat_tx_dropped;
-	} while (u64_stats_fetch_retry_bh(&np->swstats_tx_syncp, syncp_start));
+	} while (u64_stats_fetch_retry_irq(&np->swstats_tx_syncp, syncp_start));
 
 	/* If the nic supports hw counters then retrieve latest values */
 	if (np->driver_data & DEV_HAS_STATISTICS_V123) {
@@ -2464,9 +2464,9 @@
 			 NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0;
 
 	/* vlan tag */
-	if (vlan_tx_tag_present(skb))
+	if (skb_vlan_tag_present(skb))
 		start_tx->txvlan = cpu_to_le32(NV_TX3_VLAN_TAG_PRESENT |
-					vlan_tx_tag_get(skb));
+					skb_vlan_tag_get(skb));
 	else
 		start_tx->txvlan = 0;
 
forcedeth-rhel7.2.patch (1,744 bytes)   
Reported upstream

Activities

pperry

2016-06-22 13:13

administrator   ~0004803

Many thanks for the patch.

For info, the two fixes are from upstream:

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/net/ethernet/nvidia/forcedeth.c?h=v4.6.2&id=57a7744e09867ebcfa0ccf1d6d529caa7728d552

and

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/net/ethernet/nvidia/forcedeth.c?h=v4.6.2&id=df8a39defad46b83694ea6dd868d332976d62cc0

but please don't bump the driver version unless upstream bump it.

Can you confirm if the current elrepo package works on el7.2? I am able to install the package and it weak links against RHEL7.2 kernels. I am also able to load the module with modprobe (no errors in dmesg, module loaded), but do not have the hardware to test.

IOW, is there a case for the driver to be rebuilt against RHEL7.2 or is it working as expected at present?

deatrich

2016-06-22 17:10

reporter   ~0004804

I brought up a lights-out interface on the test node, brought down the network, rmmod-ed the driver, yum-erased my kmod driver and yum-installed locally the elrepo driver. On a reboot the node came up on the network.

So yes, the elrepo driver works on SL 7.2 nodes. The only reason I tried to compile my own was to create a custom 7.2 anaconda kickstart environment, and of course to verify that I could build it with the anaconda kernel without any broken symbols, and no depmod issues. We have 21 Sun thumpers with NVIDIA MCP55 Ethernet interfaces that I may need to update to SL7 in the near future.

So this is just a data point - no need to change the existing elrepo driver.

cheers, etc.

pperry

2016-06-23 03:16

administrator   ~0004805

Brilliant - thanks very much for the feedback.

pperry

2016-07-17 05:29

administrator   ~0004820

Fixed in this commit:

https://github.com/elrepo/packages/commit/e31d877ed1c4a09b182e1683f46c5950a7f66809

marking as resolved

Issue History

Date Modified Username Field Change
2016-06-22 10:51 deatrich New Issue
2016-06-22 10:51 deatrich Status new => assigned
2016-06-22 10:51 deatrich Assigned To => pperry
2016-06-22 10:51 deatrich File Added: forcedeth-rhel7.2.patch
2016-06-22 13:13 pperry Note Added: 0004803
2016-06-22 17:10 deatrich Note Added: 0004804
2016-06-23 03:16 pperry Note Added: 0004805
2016-07-17 05:29 pperry Note Added: 0004820
2016-07-17 05:31 pperry Status assigned => resolved
2016-07-17 05:31 pperry Resolution open => fixed