[ovs-dev] dev Digest, Vol 61, Issue 395

Nithin Raju nithin at vmware.com
Fri Aug 29 07:50:40 UTC 2014

On Aug 28, 2014, at 6:52 PM, Samuel Ghinet <sghinet at cloudbasesolutions.com>

> Hello Nithin,
>>   BOOLEAN validateDp;         /* Does command require a valid DP argument. */
> 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.


More information about the dev mailing list