Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed NM_BRIDGES to 256 #421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Changed NM_BRIDGES to 256 #421

wants to merge 1 commit into from

Conversation

nanjj
Copy link
Contributor

@nanjj nanjj commented Dec 26, 2017

Added GTAGS to .gitignore and fixed vale port max not 254 issue #398

To NM_BRIDGES default to 256 because the original default value 8
is too small for even test, and 256 is OK for hypervisor usage.

Added GTAGS to .gitignore and fixed vale port max not 254 issue luigirizzo#398
@@ -752,8 +751,7 @@ netmap_get_bdg_na(struct nmreq *nmr, struct netmap_adapter **na,
if (!create)
return ENXIO;
/* yes we should, see if we have space to attach entries */
needed = 2; /* in some cases we only need 1 */
if (b->bdg_active_ports + needed >= NM_BDG_MAXPORTS) {
if (b->bdg_active_ports >= NM_BDG_MAXPORTS) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous check was too conservative: >= should have been > and needed should have been computed more precisely.

Your change, however, is wrong. There are cases when we need two slots. See where cand2 is actually used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants