Bug 195518

Summary: igb compilation failed if RSS is defined.
Product: Base System Reporter: Shuichi KITAGUCHI <ki>
Component: kernAssignee: Alfred Perlstein <alfred>
Status: Closed FIXED    
Severity: Affects Some People CC: alfred
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Shuichi KITAGUCHI 2014-11-30 05:14:20 UTC
After r275136, kernel compilation failed with RSS option.

/usr/src/sys/dev/e1000/if_igb.c:2883:6: error: variable 'queues' is
      uninitialized when used here [-Werror,-Wuninitialized]
        if (queues > rss_getnumbuckets())
            ^~~~~~
/usr/src/sys/dev/e1000/if_igb.c:2839:24: note: initialize the variable 'queues'
      to silence this warning
        int             bar, want, queues, msgs, maxqueues;
                                         ^
                                          = 0

In igb_setup_msix(), if RSS is defined, 'queues' is used before substituted.

2881	#ifdef  RSS
2882	        /* If we're doing RSS, clamp at the number of RSS buckets */
2883	        if (queues > rss_getnumbuckets())
2884	                queues = rss_getnumbuckets();
2885	#endif
2886	
2887	        if (n_queues != 0) {
2888	                queues = n_queues;
Comment 1 Alfred Perlstein freebsd_committer freebsd_triage 2014-12-02 18:47:34 UTC
I have a fix for this as well as a fix for RSS no longer properly clipping.

I'll post it today.
Comment 2 Alfred Perlstein freebsd_committer freebsd_triage 2014-12-03 03:18:54 UTC
The changes that broke RSS were reverted in r275431.