netmap_update_config: update na->name to cope with reconfigurations
MFC after: 1 week
This commit is contained in:
parent
7467a69536
commit
4ad57c7afa
@ -763,6 +763,10 @@ netmap_update_config(struct netmap_adapter *na)
|
||||
{
|
||||
struct nm_config_info info;
|
||||
|
||||
if (na->ifp && !nm_is_bwrap(na)) {
|
||||
strlcpy(na->name, na->ifp->if_xname, sizeof(na->name));
|
||||
}
|
||||
|
||||
bzero(&info, sizeof(info));
|
||||
if (na->nm_config == NULL ||
|
||||
na->nm_config(na, &info)) {
|
||||
|
@ -192,7 +192,6 @@ void netmap_uninit_bridges2(struct nm_bridge *, u_int);
|
||||
int netmap_bdg_update_private_data(const char *name, bdg_update_private_data_fn_t callback,
|
||||
void *callback_data, void *auth_token);
|
||||
int netmap_bdg_config(struct nm_ifreq *nifr);
|
||||
int nm_is_bwrap(struct netmap_adapter *);
|
||||
|
||||
#define NM_NEED_BWRAP (-2)
|
||||
#endif /* _NET_NETMAP_BDG_H_ */
|
||||
|
@ -1155,6 +1155,7 @@ struct netmap_bwrap_adapter {
|
||||
struct netmap_vp_adapter *saved_na_vp;
|
||||
int (*nm_intr_notify)(struct netmap_kring *kring, int flags);
|
||||
};
|
||||
int nm_is_bwrap(struct netmap_adapter *na);
|
||||
int nm_bdg_polling(struct nmreq_header *hdr);
|
||||
|
||||
int netmap_bdg_attach(struct nmreq_header *hdr, void *auth_token);
|
||||
@ -1566,6 +1567,7 @@ extern unsigned int vale_max_bridges;
|
||||
#define netmap_get_vale_na(_1, _2, _3, _4) 0
|
||||
#define netmap_bdg_create(_1, _2) NULL
|
||||
#define netmap_bdg_destroy(_1, _2) 0
|
||||
#define vale_max_bridges 1
|
||||
#endif /* !WITH_VALE */
|
||||
|
||||
#ifdef WITH_PIPES
|
||||
|
Loading…
Reference in New Issue
Block a user