/drivers/net/ethernet/netronome/nfp/ |
D | ccm_mbox.c | 54 static u32 nfp_ccm_mbox_max_msg(struct nfp_net *nn) in nfp_ccm_mbox_max_msg() argument 56 return round_down(nn->tlv_caps.mbox_len, 4) - in nfp_ccm_mbox_max_msg() 116 static bool nfp_ccm_mbox_is_first(struct nfp_net *nn, struct sk_buff *skb) in nfp_ccm_mbox_is_first() argument 118 return skb_queue_is_first(&nn->mbox_cmsg.queue, skb); in nfp_ccm_mbox_is_first() 121 static bool nfp_ccm_mbox_should_run(struct nfp_net *nn, struct sk_buff *skb) in nfp_ccm_mbox_should_run() argument 128 static void nfp_ccm_mbox_mark_next_runner(struct nfp_net *nn) in nfp_ccm_mbox_mark_next_runner() argument 133 skb = skb_peek(&nn->mbox_cmsg.queue); in nfp_ccm_mbox_mark_next_runner() 140 queue_work(nn->mbox_cmsg.workq, &nn->mbox_cmsg.runq_work); in nfp_ccm_mbox_mark_next_runner() 144 nfp_ccm_mbox_write_tlv(struct nfp_net *nn, u32 off, u32 type, u32 len) in nfp_ccm_mbox_write_tlv() argument 146 nn_writel(nn, off, in nfp_ccm_mbox_write_tlv() [all …]
|
D | nfp_net_common.c | 101 static void nfp_net_reconfig_start(struct nfp_net *nn, u32 update) in nfp_net_reconfig_start() argument 103 nn_writel(nn, NFP_NET_CFG_UPDATE, update); in nfp_net_reconfig_start() 105 nn_pci_flush(nn); in nfp_net_reconfig_start() 106 nfp_qcp_wr_ptr_add(nn->qcp_cfg, 1); in nfp_net_reconfig_start() 107 nn->reconfig_in_progress_update = update; in nfp_net_reconfig_start() 111 static void nfp_net_reconfig_start_async(struct nfp_net *nn, u32 update) in nfp_net_reconfig_start_async() argument 113 update |= nn->reconfig_posted; in nfp_net_reconfig_start_async() 114 nn->reconfig_posted = 0; in nfp_net_reconfig_start_async() 116 nfp_net_reconfig_start(nn, update); in nfp_net_reconfig_start_async() 118 nn->reconfig_timer_active = true; in nfp_net_reconfig_start_async() [all …]
|
D | nfp_net_ethtool.c | 216 struct nfp_net *nn = netdev_priv(netdev); in nfp_net_get_drvinfo() local 219 nn->fw_ver.resv, nn->fw_ver.class, in nfp_net_get_drvinfo() 220 nn->fw_ver.major, nn->fw_ver.minor); in nfp_net_get_drvinfo() 221 strlcpy(drvinfo->bus_info, pci_name(nn->pdev), in nfp_net_get_drvinfo() 224 nfp_get_drvinfo(nn->app, nn->pdev, vnic_version, drvinfo); in nfp_net_get_drvinfo() 284 struct nfp_net *nn; in nfp_net_get_link_ksettings() local 316 nn = netdev_priv(netdev); in nfp_net_get_link_ksettings() 318 sts = nn_readl(nn, NFP_NET_CFG_STS); in nfp_net_get_link_ksettings() 385 struct nfp_net *nn = netdev_priv(netdev); in nfp_net_get_ringparam() local 389 ring->rx_pending = nn->dp.rxd_cnt; in nfp_net_get_ringparam() [all …]
|
D | nfp_netvf_main.c | 28 struct nfp_net *nn; member 49 static void nfp_netvf_get_mac_addr(struct nfp_net *nn) in nfp_netvf_get_mac_addr() argument 53 put_unaligned_be32(nn_readl(nn, NFP_NET_CFG_MACADDR + 0), &mac_addr[0]); in nfp_netvf_get_mac_addr() 54 put_unaligned_be16(nn_readw(nn, NFP_NET_CFG_MACADDR + 6), &mac_addr[4]); in nfp_netvf_get_mac_addr() 57 eth_hw_addr_random(nn->dp.netdev); in nfp_netvf_get_mac_addr() 61 ether_addr_copy(nn->dp.netdev->dev_addr, mac_addr); in nfp_netvf_get_mac_addr() 62 ether_addr_copy(nn->dp.netdev->perm_addr, mac_addr); in nfp_netvf_get_mac_addr() 76 struct nfp_net *nn; in nfp_netvf_pci_probe() local 175 nn = nfp_net_alloc(pdev, ctrl_bar, true, max_tx_rings, max_rx_rings); in nfp_netvf_pci_probe() 176 if (IS_ERR(nn)) { in nfp_netvf_pci_probe() [all …]
|
D | nfp_net_main.c | 85 static void nfp_net_pf_free_vnic(struct nfp_pf *pf, struct nfp_net *nn) in nfp_net_pf_free_vnic() argument 87 if (nfp_net_is_data_vnic(nn)) in nfp_net_pf_free_vnic() 88 nfp_app_vnic_free(pf->app, nn); in nfp_net_pf_free_vnic() 89 nfp_port_free(nn->port); in nfp_net_pf_free_vnic() 90 list_del(&nn->vnic_list); in nfp_net_pf_free_vnic() 92 nfp_net_free(nn); in nfp_net_pf_free_vnic() 97 struct nfp_net *nn, *next; in nfp_net_pf_free_vnics() local 99 list_for_each_entry_safe(nn, next, &pf->vnics, vnic_list) in nfp_net_pf_free_vnics() 100 if (nfp_net_is_data_vnic(nn)) in nfp_net_pf_free_vnics() 101 nfp_net_pf_free_vnic(pf, nn); in nfp_net_pf_free_vnics() [all …]
|
D | nfp_net.h | 27 #define nn_pr(nn, lvl, fmt, args...) \ argument 29 struct nfp_net *__nn = (nn); \ 37 #define nn_err(nn, fmt, args...) nn_pr(nn, KERN_ERR, fmt, ## args) argument 38 #define nn_warn(nn, fmt, args...) nn_pr(nn, KERN_WARNING, fmt, ## args) argument 39 #define nn_info(nn, fmt, args...) nn_pr(nn, KERN_INFO, fmt, ## args) argument 40 #define nn_dbg(nn, fmt, args...) nn_pr(nn, KERN_DEBUG, fmt, ## args) argument 702 static inline u16 nn_readb(struct nfp_net *nn, int off) in nn_readb() argument 704 return readb(nn->dp.ctrl_bar + off); in nn_readb() 707 static inline void nn_writeb(struct nfp_net *nn, int off, u8 val) in nn_writeb() argument 709 writeb(val, nn->dp.ctrl_bar + off); in nn_writeb() [all …]
|
D | nfp_app_nic.c | 12 struct nfp_net *nn, unsigned int id) in nfp_app_nic_vnic_init_phy_port() argument 19 nn->port = nfp_port_alloc(app, NFP_PORT_PHYS_PORT, nn->dp.netdev); in nfp_app_nic_vnic_init_phy_port() 20 if (IS_ERR(nn->port)) in nfp_app_nic_vnic_init_phy_port() 21 return PTR_ERR(nn->port); in nfp_app_nic_vnic_init_phy_port() 23 err = nfp_port_init_phy_port(pf, app, nn->port, id); in nfp_app_nic_vnic_init_phy_port() 25 nfp_port_free(nn->port); in nfp_app_nic_vnic_init_phy_port() 29 return nn->port->type == NFP_PORT_INVALID; in nfp_app_nic_vnic_init_phy_port() 32 int nfp_app_nic_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, in nfp_app_nic_vnic_alloc() argument 37 err = nfp_app_nic_vnic_init_phy_port(app->pf, app, nn, id); in nfp_app_nic_vnic_alloc() 41 nfp_net_get_mac_addr(app->pf, nn->dp.netdev, nn->port); in nfp_app_nic_vnic_alloc()
|
D | nfp_net_debugfs.c | 17 struct nfp_net *nn; in nfp_rx_q_show() local 25 nn = r_vec->nfp_net; in nfp_rx_q_show() 27 if (!nfp_net_running(nn)) in nfp_rx_q_show() 79 struct nfp_net *nn; in nfp_tx_q_show() local 90 nn = r_vec->nfp_net; in nfp_tx_q_show() 91 if (!nfp_net_running(nn)) in nfp_tx_q_show() 148 void nfp_net_debugfs_vnic_add(struct nfp_net *nn, struct dentry *ddir) in nfp_net_debugfs_vnic_add() argument 157 if (nfp_net_is_data_vnic(nn)) in nfp_net_debugfs_vnic_add() 158 sprintf(name, "vnic%d", nn->id); in nfp_net_debugfs_vnic_add() 161 nn->debugfs_dir = debugfs_create_dir(name, ddir); in nfp_net_debugfs_vnic_add() [all …]
|
D | nfp_app.h | 94 const char *(*extra_cap)(struct nfp_app *app, struct nfp_net *nn); 99 int (*vnic_alloc)(struct nfp_app *app, struct nfp_net *nn, 101 void (*vnic_free)(struct nfp_app *app, struct nfp_net *nn); 102 int (*vnic_init)(struct nfp_app *app, struct nfp_net *nn); 103 void (*vnic_clean)(struct nfp_app *app, struct nfp_net *nn); 135 int (*bpf)(struct nfp_app *app, struct nfp_net *nn, 137 int (*xdp_offload)(struct nfp_app *app, struct nfp_net *nn, 179 bool __nfp_ctrl_tx(struct nfp_net *nn, struct sk_buff *skb); 180 bool nfp_ctrl_tx(struct nfp_net *nn, struct sk_buff *skb); 198 static inline int nfp_app_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, in nfp_app_vnic_alloc() argument [all …]
|
D | ccm.h | 114 int nfp_ccm_mbox_alloc(struct nfp_net *nn); 115 void nfp_ccm_mbox_free(struct nfp_net *nn); 116 int nfp_ccm_mbox_init(struct nfp_net *nn); 117 void nfp_ccm_mbox_clean(struct nfp_net *nn); 118 bool nfp_ccm_mbox_fits(struct nfp_net *nn, unsigned int size); 120 nfp_ccm_mbox_msg_alloc(struct nfp_net *nn, unsigned int req_size, 122 int __nfp_ccm_mbox_communicate(struct nfp_net *nn, struct sk_buff *skb, 126 int nfp_ccm_mbox_communicate(struct nfp_net *nn, struct sk_buff *skb, 130 int nfp_ccm_mbox_post(struct nfp_net *nn, struct sk_buff *skb,
|
D | nfp_app.c | 41 struct nfp_net *nn = netdev_priv(netdev); in nfp_app_from_netdev() local 43 return nn->app; in nfp_app_from_netdev() 144 struct nfp_net *nn; in nfp_app_netdev_feat_change() local 149 nn = netdev_priv(netdev); in nfp_app_netdev_feat_change() 150 if (nn->app != app) in nfp_app_netdev_feat_change()
|
D | nfp_net_sriov.c | 42 struct nfp_net *nn; in nfp_net_sriov_update() local 49 nn = list_first_entry(&app->pf->vnics, struct nfp_net, vnic_list); in nfp_net_sriov_update() 51 ret = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_VF); in nfp_net_sriov_update()
|
D | nfp_port.c | 17 struct nfp_net *nn = netdev_priv(netdev); in nfp_port_from_netdev() local 19 return nn->port; in nfp_port_from_netdev()
|
D | nfp_net_repr.c | 321 struct nfp_net *nn = netdev_priv(pf_netdev); in nfp_repr_init() local 322 u32 repr_cap = nn->tlv_caps.repr_cap; in nfp_repr_init() 350 if ((repr_cap & NFP_NET_CFG_CTRL_LSO && nn->fw_ver.major > 2) || in nfp_repr_init()
|
/drivers/net/ethernet/netronome/nfp/crypto/ |
D | tls.c | 31 static void nfp_net_crypto_set_op(struct nfp_net *nn, u8 opcode, bool on) in nfp_net_crypto_set_op() argument 35 off = nn->tlv_caps.crypto_enable_off + round_down(opcode / 8, 4); in nfp_net_crypto_set_op() 37 val = nn_readl(nn, off); in nfp_net_crypto_set_op() 42 nn_writel(nn, off, val); in nfp_net_crypto_set_op() 46 __nfp_net_tls_conn_cnt_changed(struct nfp_net *nn, int add, in __nfp_net_tls_conn_cnt_changed() argument 54 nn->ktls_tx_conn_cnt += add; in __nfp_net_tls_conn_cnt_changed() 55 cnt = nn->ktls_tx_conn_cnt; in __nfp_net_tls_conn_cnt_changed() 56 nn->dp.ktls_tx = !!nn->ktls_tx_conn_cnt; in __nfp_net_tls_conn_cnt_changed() 59 nn->ktls_rx_conn_cnt += add; in __nfp_net_tls_conn_cnt_changed() 60 cnt = nn->ktls_rx_conn_cnt; in __nfp_net_tls_conn_cnt_changed() [all …]
|
D | crypto.h | 23 int nfp_net_tls_init(struct nfp_net *nn); 28 static inline int nfp_net_tls_init(struct nfp_net *nn) in nfp_net_tls_init() argument
|
/drivers/net/ethernet/netronome/nfp/bpf/ |
D | main.c | 24 static bool nfp_net_ebpf_capable(struct nfp_net *nn) in nfp_net_ebpf_capable() argument 27 struct nfp_app_bpf *bpf = nn->app->priv; in nfp_net_ebpf_capable() 29 return nn->cap & NFP_NET_CFG_CTRL_BPF && in nfp_net_ebpf_capable() 31 nn_readb(nn, NFP_NET_CFG_BPF_ABI) == bpf->abi_version; in nfp_net_ebpf_capable() 38 nfp_bpf_xdp_offload(struct nfp_app *app, struct nfp_net *nn, in nfp_bpf_xdp_offload() argument 43 if (!nfp_net_ebpf_capable(nn)) in nfp_bpf_xdp_offload() 46 running = nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF; in nfp_bpf_xdp_offload() 47 xdp_running = running && nn->xdp_hw.prog; in nfp_bpf_xdp_offload() 54 return nfp_net_bpf_offload(nn, prog, running, extack); in nfp_bpf_xdp_offload() 57 static const char *nfp_bpf_extra_cap(struct nfp_app *app, struct nfp_net *nn) in nfp_bpf_extra_cap() argument [all …]
|
D | offload.c | 221 struct nfp_net *nn = netdev_priv(prog->aux->offload->netdev); in nfp_bpf_translate() local 230 max_instr = nn_readw(nn, NFP_NET_CFG_BPF_MAX_LEN); in nfp_bpf_translate() 425 int nfp_ndo_bpf(struct nfp_app *app, struct nfp_net *nn, struct netdev_bpf *bpf) in nfp_ndo_bpf() argument 484 bool nfp_bpf_offload_check_mtu(struct nfp_net *nn, struct bpf_prog *prog, in nfp_bpf_offload_check_mtu() argument 489 fw_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32; in nfp_bpf_offload_check_mtu() 496 nfp_net_bpf_load(struct nfp_net *nn, struct bpf_prog *prog, in nfp_net_bpf_load() argument 505 if (nfp_bpf_offload_check_mtu(nn, prog, nn->dp.netdev->mtu)) { in nfp_net_bpf_load() 510 max_stack = nn_readb(nn, NFP_NET_CFG_BPF_STACK_SZ) * 64; in nfp_net_bpf_load() 516 max_prog_len = nn_readw(nn, NFP_NET_CFG_BPF_MAX_LEN); in nfp_net_bpf_load() 522 img = nfp_bpf_relo_for_vnic(nfp_prog, nn->app_priv); in nfp_net_bpf_load() [all …]
|
D | main.h | 563 bool nfp_bpf_offload_check_mtu(struct nfp_net *nn, struct bpf_prog *prog, 580 int nfp_ndo_bpf(struct nfp_app *app, struct nfp_net *nn, 582 int nfp_net_bpf_offload(struct nfp_net *nn, struct bpf_prog *prog,
|
/drivers/net/ethernet/netronome/nfp/abm/ |
D | main.c | 176 struct nfp_net *nn; in nfp_abm_kill_reprs_all() local 178 list_for_each_entry(nn, &pf->vnics, vnic_list) in nfp_abm_kill_reprs_all() 179 nfp_abm_kill_reprs(abm, (struct nfp_abm_link *)nn->app_priv); in nfp_abm_kill_reprs_all() 208 struct nfp_net *nn; in nfp_abm_eswitch_set_switchdev() local 218 list_for_each_entry(nn, &pf->vnics, vnic_list) { in nfp_abm_eswitch_set_switchdev() 219 struct nfp_abm_link *alink = nn->app_priv; in nfp_abm_eswitch_set_switchdev() 257 nfp_abm_vnic_set_mac(struct nfp_pf *pf, struct nfp_abm *abm, struct nfp_net *nn, in nfp_abm_vnic_set_mac() argument 268 eth_hw_addr_random(nn->dp.netdev); in nfp_abm_vnic_set_mac() 279 eth_hw_addr_random(nn->dp.netdev); in nfp_abm_vnic_set_mac() 285 eth_hw_addr_random(nn->dp.netdev); in nfp_abm_vnic_set_mac() [all …]
|
D | ctrl.c | 265 struct nfp_net *nn = alink->vnic; in nfp_abm_ctrl_prio_map_update() local 269 err = nfp_net_mbox_lock(nn, alink->abm->prio_map_len); in nfp_abm_ctrl_prio_map_update() 274 nn_writeq(nn, nn->tlv_caps.mbox_off + NFP_NET_ABM_MBOX_DATALEN, in nfp_abm_ctrl_prio_map_update() 278 nn_writel(nn, nn->tlv_caps.mbox_off + NFP_NET_ABM_MBOX_DATA + i, in nfp_abm_ctrl_prio_map_update() 281 err = nfp_net_mbox_reconfig_and_unlock(nn, cmd); in nfp_abm_ctrl_prio_map_update() 291 struct nfp_net *nn = alink->vnic; in nfp_abm_ctrl_prio_check_params() local 298 if (nn->tlv_caps.mbox_len < min_mbox_sz) { in nfp_abm_ctrl_prio_check_params() 300 nn->tlv_caps.mbox_len, min_mbox_sz); in nfp_abm_ctrl_prio_check_params()
|
/drivers/net/ethernet/netronome/nfp/flower/ |
D | main.c | 28 static const char *nfp_flower_extra_cap(struct nfp_app *app, struct nfp_net *nn) in nfp_flower_extra_cap() argument 361 if (!priv->nn) in nfp_flower_sriov_disable() 423 port->vnic = priv->nn->dp.ctrl_bar; in nfp_flower_spawn_vnic_reprs() 436 port_id, port, priv->nn->dp.netdev); in nfp_flower_spawn_vnic_reprs() 476 if (!priv->nn) in nfp_flower_sriov_enable() 544 SET_NETDEV_DEV(repr, &priv->nn->pdev->dev); in nfp_flower_spawn_phy_reprs() 549 cmsg_port_id, port, priv->nn->dp.netdev); in nfp_flower_spawn_phy_reprs() 600 static int nfp_flower_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, in nfp_flower_vnic_alloc() argument 608 eth_hw_addr_random(nn->dp.netdev); in nfp_flower_vnic_alloc() 609 netif_keep_dst(nn->dp.netdev); in nfp_flower_vnic_alloc() [all …]
|
/drivers/crypto/marvell/octeontx/ |
D | otx_cptpf_ucode.c | 139 u8 nn; in get_ucode_type() local 145 nn = ucode_hdr->ver_num.nn; in get_ucode_type() 147 (nn == OTX_CPT_SE_UC_TYPE1 || nn == OTX_CPT_SE_UC_TYPE2 || in get_ucode_type() 148 nn == OTX_CPT_SE_UC_TYPE3)) in get_ucode_type() 151 nn == OTX_CPT_AE_UC_TYPE) in get_ucode_type() 373 if (uc_found->ucode.ver_num.nn == OTX_CPT_SE_UC_TYPE2 || in get_uc_from_tar_archive() 374 (uc_found->ucode.ver_num.nn == OTX_CPT_SE_UC_TYPE3 in get_uc_from_tar_archive() 375 && curr->ucode.ver_num.nn == OTX_CPT_SE_UC_TYPE1)) in get_uc_from_tar_archive() 396 curr->ucode.ver_num.nn, curr->ucode.ver_num.xx, in print_tar_dbg_info() 575 pr_debug("Ucode version %d.%d.%d.%d\n", ucode->ver_num.nn, in print_ucode_dbg_info()
|
/drivers/net/ethernet/mellanox/mlx5/core/en/rep/ |
D | bond.c | 15 struct netdev_net_notifier nn; member 328 &uplink_priv->bond->nn); in mlx5e_rep_bond_init() 349 &rpriv->uplink_priv.bond->nn); in mlx5e_rep_bond_cleanup()
|
/drivers/clk/ |
D | clk-cdce925.c | 225 u16 nn; in cdce925_pll_prepare() local 239 nn = n * BIT(p); in cdce925_pll_prepare() 241 q = nn / m; in cdce925_pll_prepare() 246 r = nn - (m*q); in cdce925_pll_prepare()
|