On Wed, Aug 07, 2013 at 04:43:18PM -0700, Andy Zhou wrote: > On Thu, Aug 1, 2013 at 2:29 PM, Ben Pfaff <b...@nicira.com> wrote: > > @@ -491,18 +500,20 @@ netdev_bsd_rx_construct(struct netdev_rx *rx_) > > struct netdev_rx_bsd *rx = netdev_rx_bsd_cast(rx_); > > struct netdev *netdev_ = rx->up.netdev; > > struct netdev_bsd *netdev = netdev_bsd_cast(netdev_); > > + int error; > > > > if (!strcmp(netdev_get_type(netdev_), "tap")) { > > rx->pcap_handle = NULL; > > rx->fd = netdev->tap_fd; > > + error = 0; > > } else { > > - int error = netdev_bsd_open_pcap(netdev_get_kernel_name(netdev_), > > - &rx->pcap_handle, &rx->fd); > > - if (error) { > > - return error; > > + ovs_mutex_lock(&netdev->mutex); > > + error = netdev_bsd_open_pcap(netdev_get_kernel_name(netdev_), > > + &rx->pcap_handle, &rx->fd); > > + if (!error) { > > + netdev_bsd_changed(netdev); > > } > > - > > - netdev_bsd_changed(netdev); > > + ovs_mutex_unlock(&netdev->mutex); > > } > > > > return 0; > > > Should this function return error?
Yes, thank you, I fixed this up. > > @@ -733,6 +752,7 @@ netdev_bsd_set_etheraddr(struct netdev *netdev_, > > struct netdev_bsd *netdev = netdev_bsd_cast(netdev_); > > int error; > > > > It may be more consistent with the functions below to initialize error to > zero here. Doesn't hurt. Thanks, I made that change. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev