View Issue Details

IDProjectCategoryView StatusLast Update
0015040CentOS-7kernelpublic2019-02-06 05:39
Reporterh-masuda 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version7.5.1804 
Target VersionFixed in Version 
Summary0015040: drivers/net/ethernet/sun/niu.c can not be compiled by missing fix of API change
Descriptiondrivers/net/ethernet/sun/niu.c can not be compiled.

  CC [M] user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.o
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c: In function 'niu_process_rx_pkt':
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c:3495:6: error: 'struct sk_buff' has no member named 'rxhash'
   skb->rxhash = ((u32)rh->hashval2_0 << 24 |
      ^
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c: At top level:
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c:9692:2: warning: initialization from incompatible pointer type [enabled by default]
  .ndo_get_stats64 = niu_get_stats,
  ^
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c:9692:2: warning: (near initialization for 'niu_netdev_ops.<anonymous>.ndo_get_stats64') [enabled by default]
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c:9698:2: error: unknown field 'ndo_change_mtu' specified in initializer
  .ndo_change_mtu = niu_change_mtu,
  ^
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c:9698:2: warning: missing braces around initializer [-Wmissing-braces]
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c:9698:2: warning: (near initialization for 'niu_netdev_ops.<anonymous>') [-Wmissing-braces]
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c:9698:2: warning: initialization from incompatible pointer type [enabled by default]
user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.c:9698:2: warning: (near initialization for 'niu_netdev_ops.<anonymous>.ndo_get_stats64') [enabled by default]
make[1]: *** [user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun/niu.o] Error 1
make: *** [_module_user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64/drivers/net/ethernet/sun] Error 2
make: Leaving directory `user/rpmbuild/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86_64'
Steps To Reproduceyumdownloader --source kernel-3.10.0-862.6.3.el7
rpm -Uvh kernel-3.10.0-862.6.3.el7.src.rpm
rpmbuild -bp SPECS/kernel.spec
make menuconfig
  enable NIU
make scripts
make prepare
make modules_prepare
cd drivers/net/ethernet/sun
make M=`pwd` -C ${RPMBUILD}/BUILD/kernel-3.10.0-862.6.3.el7/linux-3.10.0-862.6.3.el7.x86/64/ modules
Additional InformationFollowing patch may fix this error.

--- drivers/net/ethernet/sun/niu.c-dist 2018-06-12 22:11:23.008619847 +0900
+++ drivers/net/ethernet/sun/niu.c 2018-06-12 22:14:49.340777654 +0900
@@ -3492,7 +3492,7 @@

        rh = (struct rx_pkt_hdr1 *) skb->data;
        if (np->dev->features & NETIF_F_RXHASH)
- skb->rxhash = ((u32)rh->hashval2_0 << 24 |
+ skb->hash = ((u32)rh->hashval2_0 << 24 | /* XXX rename */
                               (u32)rh->hashval2_1 << 16 |
                               (u32)rh->hashval1_1 << 8 |
                               (u32)rh->hashval1_2 << 0);
@@ -6293,8 +6293,8 @@
        stats->tx_errors = errors;
 }

-static struct rtnl_link_stats64 *niu_get_stats(struct net_device *dev,
- struct rtnl_link_stats64 *stats)
+static /* struct rtnl_link_stats64 * */ void niu_get_stats(struct net_device *dev,
+ struct rtnl_link_stats64 *stats) /* XXX RH_KABI_REPLACE in include/linux/netdevice.h */
 {
        struct niu *np = netdev_priv(dev);

@@ -6303,7 +6303,7 @@
                niu_get_tx_stats(np, stats);
        }

- return stats;
+ /* return stats; */ /* XXX RH_KABI_REPLACE */
 }

 static void niu_load_hash_xmac(struct niu *np, u16 *hash)
@@ -9695,7 +9695,7 @@
        .ndo_set_mac_address = niu_set_mac_addr,
        .ndo_do_ioctl = niu_ioctl,
        .ndo_tx_timeout = niu_tx_timeout,
- .ndo_change_mtu = niu_change_mtu,
+ .ndo_change_mtu_rh74 = niu_change_mtu, /* XXX RH_KABI_RENAME */
 };

 static void niu_assign_netdev_ops(struct net_device *dev)
TagsNo tags attached.
abrt_hash
URL

Activities

toracat

toracat

2018-07-13 15:57

manager   ~0032246

Last edited: 2018-07-13 15:59

View 2 revisions

Thanks for the patch submission.

Usually we ask that you submit this bug report at http://bugzilla.redhat.com so that the RHEL kernel (therefore CentOS kernel) gets fixed. In this case, however, because the module is disabled by default, it is unlikely that they do the patch. [You can still give it a try]

What CentOS can do is to work on the centosplus kernel, that is, to enable NIU with the patch.

toracat

toracat

2018-12-17 00:19

manager   ~0033363

config diff:

@@ -2373,7 +2373,11 @@ CONFIG_NET_VENDOR_SMSC=y
 CONFIG_EPIC100=m
 CONFIG_SMSC9420=m
 # CONFIG_NET_VENDOR_STMICRO is not set
-# CONFIG_NET_VENDOR_SUN is not set
+CONFIG_NET_VENDOR_SUN=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+CONFIG_NIU=m
 # CONFIG_NET_VENDOR_TEHUTI is not set
 CONFIG_NET_VENDOR_TI=y
 CONFIG_TLAN=m
toracat

toracat

2018-12-17 07:51

manager   ~0033365

Thanks for the patch. Apologies for taking so long. The next update to the centosplus kernel will have the NIU module enabled.
toracat

toracat

2019-01-31 18:28

manager   ~0033740

kernel-plus-3.10.0-957.5.1.el7.centos.plus now has the updated config and the patch.

Issue History

Date Modified Username Field Change
2018-07-13 09:41 h-masuda New Issue
2018-07-13 15:57 toracat Note Added: 0032246
2018-07-13 15:58 toracat Status new => assigned
2018-07-13 15:59 toracat Note Edited: 0032246 View Revisions
2018-12-17 00:19 toracat Note Added: 0033363
2018-12-17 07:51 toracat Note Added: 0033365
2019-01-31 18:28 toracat Note Added: 0033740
2019-02-06 05:39 toracat Status assigned => resolved
2019-02-06 05:39 toracat Resolution open => fixed