nla_put_u16
if (nla_put_u16(skb, IFLA_IPOIB_PKEY, priv->pkey))
if (nla_put_u16(skb, IFLA_IPOIB_MODE, val))
if (nla_put_u16(skb, IFLA_IPOIB_UMCAST, val))
if (nla_put_u16(skb, IFLA_BAREUDP_SRCPORT_MIN, bareudp->sport_min))
if (nla_put_u16(skb, IFLA_BOND_SLAVE_QUEUE_ID,
if (nla_put_u16(skb, IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
if (nla_put_u16(skb,
if (nla_put_u16(skb, IFLA_BOND_SLAVE_ACTOR_PORT_PRIO,
if (nla_put_u16(skb, IFLA_BOND_AD_ACTOR_SYS_PRIO,
if (nla_put_u16(skb, IFLA_BOND_AD_USER_PORT_KEY,
if (nla_put_u16(skb, IFLA_BOND_AD_INFO_AGGREGATOR,
if (nla_put_u16(skb, IFLA_BOND_AD_INFO_NUM_PORTS,
if (nla_put_u16(skb, IFLA_BOND_AD_INFO_ACTOR_KEY,
if (nla_put_u16(skb, IFLA_BOND_AD_INFO_PARTNER_KEY,
(nla_put_u16(skb, IFLA_CAN_TERMINATION, priv->termination) ||
if (nla_put_u16(skb, IFLA_PORT_REQUEST, pp->request) ||
nla_put_u16(skb, IFLA_PORT_RESPONSE, response) ||
if (vid && nla_put_u16(dump->skb, NDA_VLAN, vid))
if (nla_put_u16(skb, IFLA_RMNET_MUX_ID, priv->mux_id))
nla_put_u16(skb, GTPA_FLOW, pctx->u.v0.flow))
if (nla_put_u16(skb, IFLA_IPVLAN_MODE, port->mode))
if (nla_put_u16(skb, IFLA_IPVLAN_FLAGS, port->flags))
if (nla_put_u16(skb, IFLA_MACVLAN_FLAGS, vlan->flags))
if (nla_put_u16(skb, IFLA_NETKIT_HEADROOM, dev->needed_headroom))
if (nla_put_u16(skb, IFLA_NETKIT_TAILROOM, dev->needed_tailroom))
if (nla_put_u16(msg, OVPN_A_KEYCONF_KEY_ID, key_id))
nla_put_u16(skb, MDBA_MDB_EATTR_DST_PORT,
nla_put_u16(skb, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
if (nla_put_u16(skb, WGDEVICE_A_LISTEN_PORT,
nla_put_u16(skb, WGALLOWEDIP_A_FAMILY, family) ||
nla_put_u16(msg, QCA_ATTR_DMG_RF_SECTOR_INDEX,
nla_put_u16(reply, BRCMF_NLATTR_LEN, msglen)) {
if (nla_put_u16(msg, NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD, request->burst_period))
return nla_put_u16(msg, VDPA_ATTR_DEV_BLK_CFG_NUM_QUEUES, val_u16);
if (nla_put_u16(msg, VDPA_ATTR_DEV_BLK_CFG_MIN_IO_SIZE, min_io_size))
if (nla_put_u16(msg, VDPA_ATTR_DEV_MAX_VQ_SIZE, max_vq_size))
if (nla_put_u16(msg, VDPA_ATTR_DEV_MIN_VQ_SIZE, min_vq_size))
return nla_put_u16(msg, VDPA_ATTR_DEV_NET_CFG_MAX_VQP, val_u16);
return nla_put_u16(msg, VDPA_ATTR_DEV_NET_CFG_MTU, val_u16);
return nla_put_u16(msg, VDPA_ATTR_DEV_NET_STATUS, val_u16);
nla_put_u16(skb, LOCKD_A_SERVER_TCP_PORT, ln->tcp_port) ||
nla_put_u16(skb, LOCKD_A_SERVER_UDP_PORT, ln->udp_port);
nla_get_u16, nla_put_u16, false)
nla_put_u16(skb, IFLA_VLAN_ID, vlan->vlan_id))
nla_put_u16(msg, BATADV_ATTR_BLA_VID, claim->vid) ||
nla_put_u16(msg, BATADV_ATTR_BLA_CRC,
nla_put_u16(msg, BATADV_ATTR_BLA_VID, backbone_gw->vid) ||
nla_put_u16(msg, BATADV_ATTR_BLA_CRC,
nla_put_u16(msg, BATADV_ATTR_DAT_CACHE_VID, dat_entry->vid) ||
if (nla_put_u16(msg, BATADV_ATTR_BLA_CRC,
nla_put_u16(msg, BATADV_ATTR_TT_VID, common->vid) ||
nla_put_u16(msg, BATADV_ATTR_TT_VID, common->vid) ||
(vid && nla_put_u16(skb, MDBA_ROUTER_PATTR_VID, vid))) {
if (vid && nla_put_u16(skb, MDBA_ROUTER_PATTR_VID, vid)) {
if (nla_put_u16(skb, IFLA_BRIDGE_MRP_INFO_PRIO,
nla_put_u16(skb, IFLA_BRIDGE_MST_ENTRY_MSTI, v->brvlan->msti) ||
nla_put_u16(skb, IFLA_BR_PRIORITY, priority) ||
nla_put_u16(skb, IFLA_BR_GROUP_FWD_MASK, br->group_fwd_mask) ||
nla_put_u16(skb, IFLA_BR_ROOT_PORT, br->root_port) ||
nla_put_u16(skb, IFLA_BR_VLAN_DEFAULT_PVID, br->default_pvid) ||
nla_put_u16(skb, IFLA_BRPORT_PRIORITY, p->priority) ||
nla_put_u16(skb, IFLA_BRPORT_DESIGNATED_PORT, p->designated_port) ||
nla_put_u16(skb, IFLA_BRPORT_DESIGNATED_COST, p->designated_cost) ||
nla_put_u16(skb, IFLA_BRPORT_ID, p->port_id) ||
nla_put_u16(skb, IFLA_BRPORT_NO, p->port_no) ||
nla_put_u16(skb, IFLA_BRPORT_GROUP_FWD_MASK, p->group_fwd_mask) ||
if (nla_put_u16(skb, IFLA_BRIDGE_VLAN_TUNNEL_VID,
if (nla_put_u16(skb, IFLA_BRIDGE_VLAN_TUNNEL_FLAGS,
nla_put_u16(skb, BRIDGE_VLANDB_ENTRY_RANGE, vid_range))
if (nla_put_u16(skb, BRIDGE_VLANDB_GOPTS_ID, vid))
nla_put_u16(skb, BRIDGE_VLANDB_GOPTS_RANGE, vid_range))
if (nla_put_u16(skb, BRIDGE_VLANDB_GOPTS_MSTI, v_opts->msti))
if (nla_put_u16(msg, NET_DM_ATTR_ORIGIN, NET_DM_ORIGIN_SW))
if (nla_put_u16(msg, NET_DM_ATTR_PROTO, be16_to_cpu(skb->protocol)))
if (nla_put_u16(msg, NET_DM_ATTR_ORIGIN, NET_DM_ORIGIN_HW))
if (nla_put_u16(msg, NET_DM_ATTR_PROTO, be16_to_cpu(skb->protocol)))
(rule->sport_mask && nla_put_u16(skb, FRA_SPORT_MASK,
(rule->dport_mask && nla_put_u16(skb, FRA_DPORT_MASK,
ret = nla_put_u16(skb, encap_type_attr, lwtstate->type);
nla_put_u16(skb, IFLA_HEADROOM,
nla_put_u16(skb, IFLA_TAILROOM,
if (nla_put_u16(skb, IFLA_BRIDGE_FLAGS, BRIDGE_FLAGS_SELF)) {
if (nla_put_u16(skb, IFLA_BRIDGE_MODE, mode)) {
err = nla_put_u16(skb, DCB_APP_ATTR_ID,
ret = nla_put_u16(skb, DCB_APP_ATTR_ID, id);
err = nla_put_u16(msg, DEVLINK_ATTR_ESWITCH_MODE, mode);
if (nla_put_u16(msg, nla_type, val.vu16))
if (nla_put_u16(msg, DEVLINK_ATTR_PORT_FLAVOUR, attrs->flavour))
nla_put_u16(msg, DEVLINK_ATTR_PORT_PCI_PF_NUMBER, attrs->pci_pf.pf))
nla_put_u16(msg, DEVLINK_ATTR_PORT_PCI_PF_NUMBER, attrs->pci_vf.pf) ||
nla_put_u16(msg, DEVLINK_ATTR_PORT_PCI_VF_NUMBER, attrs->pci_vf.vf))
nla_put_u16(msg, DEVLINK_ATTR_PORT_PCI_PF_NUMBER,
if (nla_put_u16(msg, DEVLINK_ATTR_PORT_TYPE, devlink_port->type))
nla_put_u16(msg, DEVLINK_ATTR_PORT_DESIRED_TYPE,
if (nla_put_u16(msg, DEVLINK_ATTR_RATE_TYPE, devlink_rate->type))
if (nla_put_u16(msg, DEVLINK_ATTR_SB_INGRESS_POOL_COUNT,
if (nla_put_u16(msg, DEVLINK_ATTR_SB_EGRESS_POOL_COUNT,
if (nla_put_u16(msg, DEVLINK_ATTR_SB_INGRESS_TC_COUNT,
if (nla_put_u16(msg, DEVLINK_ATTR_SB_EGRESS_TC_COUNT,
if (nla_put_u16(msg, DEVLINK_ATTR_SB_POOL_INDEX, pool_index))
if (nla_put_u16(msg, DEVLINK_ATTR_SB_POOL_INDEX, pool_index))
if (nla_put_u16(msg, DEVLINK_ATTR_SB_TC_INDEX, tc_index))
if (nla_put_u16(msg, DEVLINK_ATTR_SB_POOL_INDEX, pool_index))
if (vid && nla_put_u16(dump->skb, NDA_VLAN, vid))
if (nla_put_u16(phydev->skb, ETHTOOL_A_CABLE_AMPLITUDE_mV, mV))
if (nla_put_u16(phydev->skb, ETHTOOL_A_CABLE_PULSE_mV, mV))
nla_put_u16(skb, ETHTOOL_A_PLCA_VERSION, plca->version)) ||
nla_put_u16(skb, IFLA_HSR_SEQ_NR, hsr->sequence_nr))
res = nla_put_u16(skb_out, HSR_A_IF1_SEQ, hsr_node_if1_seq);
res = nla_put_u16(skb_out, HSR_A_IF2_SEQ, hsr_node_if2_seq);
return nla_put_u16(msg, type, le16_to_cpu(addr));
if (nla_put_u16(msg, NL802154_COORD_SUPERFRAME_SPEC,
if (nla_put_u16(skb, IFLA_GRE_ENCAP_TYPE,
nla_put_u16(skb, IFLA_GRE_ENCAP_FLAGS,
if (nla_put_u16(skb, IFLA_GRE_ERSPAN_HWID, t->hwid))
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE,
nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS,
nla_put_u16(skb, IPMRA_VIFA_FLAGS, vif->flags) ||
if (nla_put_u16(skb, NHA_RES_BUCKET_INDEX, bucket_index) ||
if (nla_put_u16(skb, NHA_RES_GROUP_BUCKETS,
if (nla_put_u16(skb, NHA_GROUP_TYPE, group_type))
nla_put_u16(stats, TCP_NLA_TIMEOUT_REHASH, tp->timeout_rehash);
nla_put_u16(msg, TCP_METRICS_ATTR_FOPEN_MSS,
(nla_put_u16(msg, TCP_METRICS_ATTR_FOPEN_SYN_DROPS,
if (nla_put_u16(skb, IOAM6_ATTR_NS_ID, be16_to_cpu(ns->id)) ||
if (ns && nla_put_u16(skb, IOAM6_ATTR_NS_ID, be16_to_cpu(ns->id))) {
if (nla_put_u16(skb, IOAM6_EVENT_ATTR_TRACE_NAMESPACE,
if (nla_put_u16(skb, IFLA_GRE_ERSPAN_HWID, p->hwid))
if (nla_put_u16(skb, IFLA_GRE_ENCAP_TYPE,
nla_put_u16(skb, IFLA_GRE_ENCAP_FLAGS,
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS, tunnel->encap.flags))
nla_put_u16(skb, IFLA_IPTUN_6RD_PREFIXLEN,
nla_put_u16(skb, IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE,
nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS,
if (nla_put_u16(skb, L2TP_ATTR_UDP_SPORT, ntohs(inet->inet_sport)) ||
nla_put_u16(skb, L2TP_ATTR_UDP_DPORT, ntohs(inet->inet_dport)))
nla_put_u16(skb, L2TP_ATTR_UDP_SPORT, ntohs(inet->inet_sport)) ||
nla_put_u16(skb, L2TP_ATTR_UDP_DPORT, ntohs(inet->inet_dport)))
nla_put_u16(skb, L2TP_ATTR_ENCAP_TYPE, tunnel->encap))
nla_put_u16(skb, L2TP_ATTR_PW_TYPE, session->pwtype))
nla_put_u16(skb, MPTCP_SUBFLOW_ATTR_MAP_DATALEN,
if (nla_put_u16(skb, MPTCP_PM_ADDR_ATTR_FAMILY, addr->family))
if (nla_put_u16(skb, MPTCP_PM_ADDR_ATTR_PORT, ntohs(addr->port)))
if (nla_put_u16(skb, MPTCP_ATTR_FAMILY, ssk->sk_family))
if (flags && nla_put_u16(skb, MPTCP_ATTR_FLAGS, flags))
if (nla_put_u16(skb, MPTCP_ATTR_FAMILY, ssk->sk_family))
nla_put_u16(skb, NCSI_CHANNEL_ATTR_VLAN_ID,
if (nla_put_u16(skb, IPVS_SVC_ATTR_AF, svc->af))
if (nla_put_u16(skb, IPVS_SVC_ATTR_PROTOCOL, svc->protocol) ||
nla_put_u16(skb, IPVS_DEST_ATTR_TUN_FLAGS,
nla_put_u16(skb, IPVS_DEST_ATTR_ADDR_FAMILY, dest->af))
nla_put_u16(skb, IPVS_DAEMON_ATTR_SYNC_MAXLEN, c->sync_maxlen) ||
nla_put_u16(skb, IPVS_DAEMON_ATTR_MCAST_PORT, c->mcast_port) ||
ret_val = nla_put_u16(skb, NLBL_MGMT_A_FAMILY, entry->family);
nla_put_u16(skb, CTRL_ATTR_FAMILY_ID, family->id) ||
nla_put_u16(skb, CTRL_ATTR_FAMILY_ID, family->id))
if (nla_put_u16(skb, CTRL_ATTR_FAMILY_ID, ctx->fam_id))
nla_put_u16(msg, NFC_ATTR_LLC_PARAM_MIUX, be16_to_cpu(local->miux)))
nla_put_u16(msg, NFC_ATTR_TARGET_SENS_RES, target->sens_res) ||
(nla_put_u16(skb, OVS_NAT_ATTR_PROTO_MIN,
nla_put_u16(skb, OVS_NAT_ATTR_PROTO_MAX,
nla_put_u16(skb, OVS_CT_ATTR_ZONE, ct_info->zone.id))
nla_put_u16(skb, OVS_KEY_ATTR_CT_ZONE, output->ct_zone))
nla_put_u16(user_skb, OVS_PACKET_ATTR_MRU, upcall_info->mru)) {
if (nla_put_u16(skb, OVS_CHECK_PKT_LEN_ATTR_PKT_LEN, arg->pkt_len)) {
if (nla_put_u16(skb, OVS_TUNNEL_ATTR_DST_PORT, geneve_port->dst_port))
if (nla_put_u16(skb, OVS_TUNNEL_ATTR_DST_PORT, ntohs(dst_port)))
ret = nla_put_u16(nl_skb, PSAMPLE_ATTR_IIFINDEX, in_ifindex);
ret = nla_put_u16(nl_skb, PSAMPLE_ATTR_OIFINDEX, out_ifindex);
ret = nla_put_u16(nl_skb, PSAMPLE_ATTR_OUT_TC, md->out_tc);
ret = nla_put_u16(nl_skb, PSAMPLE_ATTR_PROTO,
if (nla_put_u16(skb, TCA_ACT_BPF_OPS_LEN, prog->bpf_num_ops))
if (nla_put_u16(skb, TCA_CTINFO_ZONE, cp->zone))
return nla_put_u16(skb, mi->metaid, *(u16 *)mi->metaval);
if (nla_put_u16(skb, TCA_PEDIT_KEY_EX_HTYPE, keys_ex->htype) ||
nla_put_u16(skb, TCA_PEDIT_KEY_EX_CMD, keys_ex->cmd))
nla_put_u16(skb, TCA_SKBEDIT_QUEUE_MAPPING, params->queue_mapping))
nla_put_u16(skb, TCA_SKBEDIT_PTYPE, params->ptype))
if (nla_put_u16(skb, TCA_SKBEDIT_QUEUE_MAPPING_MAX,
nla_put_u16(skb, TCA_SKBMOD_ETYPE, ntohs(p->eth_type)))
(nla_put_u16(skb, TCA_VLAN_PUSH_VLAN_ID, p->tcfv_push_vid) ||
if (nla_put_u16(skb, TCA_BPF_OPS_LEN, prog->bpf_num_ops))
err = nla_put_u16(skb, vlan_id_key,
nla_put_u16(skb, TCA_MQPRIO_MODE, priv->mode))
nla_put_u16(skb, TCA_MQPRIO_SHAPER, priv->shaper))
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_CHID, smc_pci_dev->pci_pchid))
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_VENDOR, smc_pci_dev->pci_vendor))
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_DEVICE, smc_pci_dev->pci_device))
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_CHID, smc_pci_dev.pci_pchid))
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_VENDOR, smc_pci_dev.pci_vendor))
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_DEVICE, smc_pci_dev.pci_device))
if (nla_put_u16(skb, SMC_NLA_FBACK_STATS_RSN_CNT,
err = nla_put_u16(skb, TLS_INFO_VERSION, version);
err = nla_put_u16(skb, TLS_INFO_CIPHER, cipher_type);
err = nla_put_u16(skb, TLS_INFO_TXCONF, tls_user_config(ctx, true));
err = nla_put_u16(skb, TLS_INFO_RXCONF, tls_user_config(ctx, false));
err = nla_put_u16(skb, TLS_INFO_TX_MAX_PAYLOAD_LEN,
nla_put_u16(msg, NL80211_BSS_BEACON_INTERVAL, res->beacon_interval))
if (nla_put_u16(msg, NL80211_BSS_CAPABILITY, res->capability) ||
if (nla_put_u16(msg, NL80211_WMMR_CW_MIN,
nla_put_u16(msg, NL80211_WMMR_CW_MAX,
nla_put_u16(msg, NL80211_WMMR_TXOP,
nla_put_u16(msg, NL80211_WOWLAN_TCP_SRC_PORT, tcp->src_port) ||
nla_put_u16(msg, NL80211_WOWLAN_TCP_DST_PORT, tcp->dst_port) ||
nla_put_u16(msg, NL80211_ATTR_STATUS_CODE,
nla_put_u16(msg, NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM,
nla_put_u16(msg, NL80211_ATTR_STATUS_CODE,
nla_put_u16(msg, NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM,
nla_put_u16(msg, NL80211_ATTR_REASON_CODE, reason)) ||
nla_put_u16(msg, NL80211_BAND_ATTR_HT_CAPA,
nla_put_u16(msg, NL80211_ATTR_CONTROL_PORT_ETHERTYPE, proto) ||
nla_put_u16(msg, NL80211_ATTR_REASON_CODE, reason_code)))
nla_put_u16(msg, NL80211_ATTR_FRAME_TYPE,
nla_put_u16(msg, NL80211_ATTR_FRAME_TYPE,
nla_put_u16(msg, NL80211_NAN_CAPA_MAX_CHANNEL_SWITCH_TIME,
nla_put_u16(msg, NL80211_ATTR_MAX_SCAN_IE_LEN,
nla_put_u16(msg, NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN,
(nla_put_u16(msg,
nla_put_u16(msg,
if (nla_put_u16(msg, NL80211_ATTR_MAX_NUM_AKM_SUITES,
nla_put_u16(msg, NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS,
nla_put_u16(msg, NL80211_RATE_INFO_BITRATE, bitrate_compat))
nla_put_u16(msg, NL80211_STA_BSS_PARAM_BEACON_INTERVAL,
nla_put_u16(msg, NL80211_STA_BSS_PARAM_BEACON_INTERVAL,
nla_put_u16(msg, NL80211_MESHCONF_RETRY_TIMEOUT,
nla_put_u16(msg, NL80211_MESHCONF_CONFIRM_TIMEOUT,
nla_put_u16(msg, NL80211_MESHCONF_HOLDING_TIMEOUT,
nla_put_u16(msg, NL80211_MESHCONF_MAX_PEER_LINKS,
nla_put_u16(msg, NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
nla_put_u16(msg, NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
nla_put_u16(msg, NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
nla_put_u16(msg, NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
nla_put_u16(msg, NL80211_MESHCONF_HWMP_RANN_INTERVAL,
nla_put_u16(msg, NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
nla_put_u16(msg, NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
nla_put_u16(msg, NL80211_MESHCONF_AWAKE_WINDOW,
ret = nla_put_u16(skb, XFRMA_IPTFS_REORDER_WINDOW,