示例#1
0
static struct netdev_bsd *
netdev_bsd_cast(const struct netdev *netdev)
{
    ovs_assert(is_netdev_bsd_class(netdev_dev_get_class(
                                       netdev_get_dev(netdev))));
    return CONTAINER_OF(netdev, struct netdev_bsd, netdev);
}
示例#2
0
文件: netdev-bsd.c 项目: bbodired/ovs
static struct netdev_rxq_bsd *
netdev_rxq_bsd_cast(const struct netdev_rxq *rxq)
{
    ovs_assert(is_netdev_bsd_class(netdev_get_class(rxq->netdev)));
    return CONTAINER_OF(rxq, struct netdev_rxq_bsd, up);
}