Bug 195518 - igb compilation failed if RSS is defined.
Summary: igb compilation failed if RSS is defined.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Alfred Perlstein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-30 05:14 UTC by Shuichi KITAGUCHI
Modified: 2014-12-03 03:18 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 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 2014-12-03 03:18:54 UTC
The changes that broke RSS were reverted in r275431.