Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/vnic/nicvf_main.c
Show First 20 Lines • Show All 419 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static int | static int | ||||
nicvf_if_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) | nicvf_if_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) | ||||
{ | { | ||||
struct nicvf *nic; | struct nicvf *nic; | ||||
struct rcv_queue *rq; | struct rcv_queue *rq; | ||||
struct ifreq *ifr; | struct ifreq *ifr; | ||||
uint32_t flags; | |||||
int mask, err; | int mask, err; | ||||
int rq_idx; | int rq_idx; | ||||
#if defined(INET) || defined(INET6) | #if defined(INET) || defined(INET6) | ||||
struct ifaddr *ifa; | struct ifaddr *ifa; | ||||
boolean_t avoid_reset = FALSE; | boolean_t avoid_reset = FALSE; | ||||
#endif | #endif | ||||
nic = if_getsoftc(ifp); | nic = if_getsoftc(ifp); | ||||
Show All 40 Lines | if (ifr->ifr_mtu < NIC_HW_MIN_FRS || | ||||
if_setmtu(ifp, ifr->ifr_mtu); | if_setmtu(ifp, ifr->ifr_mtu); | ||||
NICVF_CORE_UNLOCK(nic); | NICVF_CORE_UNLOCK(nic); | ||||
} | } | ||||
break; | break; | ||||
case SIOCSIFFLAGS: | case SIOCSIFFLAGS: | ||||
NICVF_CORE_LOCK(nic); | NICVF_CORE_LOCK(nic); | ||||
if (if_getflags(ifp) & IFF_UP) { | if (if_getflags(ifp) & IFF_UP) { | ||||
if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { | if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { | ||||
flags = if_getflags(ifp) ^ nic->if_flags; | |||||
if ((nic->if_flags & if_getflags(ifp)) & | if ((nic->if_flags & if_getflags(ifp)) & | ||||
IFF_PROMISC) { | IFF_PROMISC) { | ||||
/* Change promiscous mode */ | /* Change promiscous mode */ | ||||
#if 0 | #if 0 | ||||
/* ARM64TODO */ | /* ARM64TODO */ | ||||
nicvf_set_promiscous(nic); | nicvf_set_promiscous(nic); | ||||
#endif | #endif | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,134 Lines • Show Last 20 Lines |