On Aug 28, 2014, at 6:52 PM, Samuel Ghinet <sghi...@cloudbasesolutions.com> wrote:
> Hello Nithin, > >> BOOLEAN validateDp; /* Does command require a valid DP argument. */ >> } NETLINK_CMD, *PNETLINK_CMD; > > Perhaps a better name would be validateDpIfIndex? Or, is there going to be > something more to be validated later on, when validateDp = TRUE? Done. I used validateDpIfIndex. I don't think there'll be anything more for this particular check. But, validateDpIfIndex makes more sense. >> if (nlFamilyOps->cmds[i].validateDp == TRUE) { >> OvsAcquireCtrlLock(); >> if (ovsMsg->ovsHdr.dp_ifindex == >> (INT)gOvsSwitchContext->dpNo) { >> status = STATUS_INVALID_PARAMETER; >> OvsReleaseCtrlLock(); >> goto done; >> } >> ... > > I am not sure... shouldn't it have been: > "if (ovsMsg->ovsHdr.dp_ifindex != (INT)gOvsSwitchContext->dpNo)" ? Good catch! fixed. > Also, is the dpIfIndex supposed to be given from kernel to userspace (such > as, in the DP NEW) or it will be a constant sent from userspace? > How is "dp_ifindex" going to be matched with gOvsSwitchContext->dpNo? Userspace gets the index during enumerate I think. After that point, userspace specifies the dp index in each operation. If userspace knows the name of the DP, it can do a lookup like operation using DP_SET or something. thanks, Nithin _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev