nn                225 drivers/clk/clk-cdce925.c 	u16 nn;
nn                239 drivers/clk/clk-cdce925.c 		nn = n * BIT(p);
nn                241 drivers/clk/clk-cdce925.c 		q = nn / m;
nn                246 drivers/clk/clk-cdce925.c 		r = nn - (m*q);
nn               1281 drivers/crypto/qat/qat_common/qat_hal.c 			      unsigned short nn, unsigned int val)
nn               1290 drivers/crypto/qat/qat_common/qat_hal.c 	stat = qat_hal_put_rel_wr_xfer(handle, ae, ctx, ICP_NEIGH_REL, nn, val);
nn                164 drivers/gpu/drm/i915/gt/intel_engine_pool.c 		struct intel_engine_pool_node *node, *nn;
nn                166 drivers/gpu/drm/i915/gt/intel_engine_pool.c 		list_for_each_entry_safe(node, nn, list, link)
nn               1931 drivers/gpu/drm/selftests/test-drm_mm.c 	struct drm_mm_node *node, *nn;
nn               1960 drivers/gpu/drm/selftests/test-drm_mm.c 	drm_mm_for_each_node_safe(node, nn, &mm) {
nn               2046 drivers/gpu/drm/selftests/test-drm_mm.c 		drm_mm_for_each_node_safe(node, nn, &mm) {
nn               2075 drivers/gpu/drm/selftests/test-drm_mm.c 	drm_mm_for_each_node_safe(node, nn, &mm) {
nn                428 drivers/message/fusion/mptfc.c 	u64			pn, nn;
nn                484 drivers/message/fusion/mptfc.c 			nn = (u64)ri->pg0.WWNN.High << 32 | (u64)ri->pg0.WWNN.Low;
nn                491 drivers/message/fusion/mptfc.c 					(unsigned long long)nn,
nn                571 drivers/message/fusion/mptfc.c 	u64 nn, pn;
nn                576 drivers/message/fusion/mptfc.c 	nn = (u64)ri->pg0.WWNN.High << 32 | (u64)ri->pg0.WWNN.Low;
nn                586 drivers/message/fusion/mptfc.c 		(unsigned long long)nn));
nn                197 drivers/mtd/nand/raw/atmel/pmecc.c 	unsigned int nn = BIT(mm) - 1;
nn                203 drivers/mtd/nand/raw/atmel/pmecc.c 	for (i = 0; i < nn; i++) {
nn                213 drivers/mtd/nand/raw/atmel/pmecc.c 	gf_tables->alpha_to[nn] = 1;
nn                265 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	struct nfp_net *nn = alink->vnic;
nn                269 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_net_mbox_lock(nn, alink->abm->prio_map_len);
nn                274 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	nn_writeq(nn, nn->tlv_caps.mbox_off + NFP_NET_ABM_MBOX_DATALEN,
nn                278 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 		nn_writel(nn, nn->tlv_caps.mbox_off + NFP_NET_ABM_MBOX_DATA + i,
nn                281 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_net_mbox_reconfig_and_unlock(nn, cmd);
nn                291 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	struct nfp_net *nn = alink->vnic;
nn                298 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	if (nn->tlv_caps.mbox_len < min_mbox_sz) {
nn                300 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 			nn->tlv_caps.mbox_len,  min_mbox_sz);
nn                176 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_net *nn;
nn                178 drivers/net/ethernet/netronome/nfp/abm/main.c 	list_for_each_entry(nn, &pf->vnics, vnic_list)
nn                179 drivers/net/ethernet/netronome/nfp/abm/main.c 		nfp_abm_kill_reprs(abm, (struct nfp_abm_link *)nn->app_priv);
nn                208 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_net *nn;
nn                218 drivers/net/ethernet/netronome/nfp/abm/main.c 	list_for_each_entry(nn, &pf->vnics, vnic_list) {
nn                219 drivers/net/ethernet/netronome/nfp/abm/main.c 		struct nfp_abm_link *alink = nn->app_priv;
nn                257 drivers/net/ethernet/netronome/nfp/abm/main.c nfp_abm_vnic_set_mac(struct nfp_pf *pf, struct nfp_abm *abm, struct nfp_net *nn,
nn                268 drivers/net/ethernet/netronome/nfp/abm/main.c 		eth_hw_addr_random(nn->dp.netdev);
nn                279 drivers/net/ethernet/netronome/nfp/abm/main.c 		eth_hw_addr_random(nn->dp.netdev);
nn                285 drivers/net/ethernet/netronome/nfp/abm/main.c 		eth_hw_addr_random(nn->dp.netdev);
nn                295 drivers/net/ethernet/netronome/nfp/abm/main.c 		eth_hw_addr_random(nn->dp.netdev);
nn                304 drivers/net/ethernet/netronome/nfp/abm/main.c 		eth_hw_addr_random(nn->dp.netdev);
nn                308 drivers/net/ethernet/netronome/nfp/abm/main.c 	ether_addr_copy(nn->dp.netdev->dev_addr, mac_addr);
nn                309 drivers/net/ethernet/netronome/nfp/abm/main.c 	ether_addr_copy(nn->dp.netdev->perm_addr, mac_addr);
nn                313 drivers/net/ethernet/netronome/nfp/abm/main.c nfp_abm_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, unsigned int id)
nn                323 drivers/net/ethernet/netronome/nfp/abm/main.c 	nn->app_priv = alink;
nn                325 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink->vnic = nn;
nn                348 drivers/net/ethernet/netronome/nfp/abm/main.c 	netif_keep_dst(nn->dp.netdev);
nn                350 drivers/net/ethernet/netronome/nfp/abm/main.c 	nfp_abm_vnic_set_mac(app->pf, abm, nn, id);
nn                362 drivers/net/ethernet/netronome/nfp/abm/main.c static void nfp_abm_vnic_free(struct nfp_app *app, struct nfp_net *nn)
nn                364 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_abm_link *alink = nn->app_priv;
nn                372 drivers/net/ethernet/netronome/nfp/abm/main.c static int nfp_abm_vnic_init(struct nfp_app *app, struct nfp_net *nn)
nn                374 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_abm_link *alink = nn->app_priv;
nn                 24 drivers/net/ethernet/netronome/nfp/bpf/main.c static bool nfp_net_ebpf_capable(struct nfp_net *nn)
nn                 27 drivers/net/ethernet/netronome/nfp/bpf/main.c 	struct nfp_app_bpf *bpf = nn->app->priv;
nn                 29 drivers/net/ethernet/netronome/nfp/bpf/main.c 	return nn->cap & NFP_NET_CFG_CTRL_BPF &&
nn                 31 drivers/net/ethernet/netronome/nfp/bpf/main.c 	       nn_readb(nn, NFP_NET_CFG_BPF_ABI) == bpf->abi_version;
nn                 38 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_xdp_offload(struct nfp_app *app, struct nfp_net *nn,
nn                 43 drivers/net/ethernet/netronome/nfp/bpf/main.c 	if (!nfp_net_ebpf_capable(nn))
nn                 46 drivers/net/ethernet/netronome/nfp/bpf/main.c 	running = nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF;
nn                 47 drivers/net/ethernet/netronome/nfp/bpf/main.c 	xdp_running = running && nn->xdp_hw.prog;
nn                 54 drivers/net/ethernet/netronome/nfp/bpf/main.c 	return nfp_net_bpf_offload(nn, prog, running, extack);
nn                 57 drivers/net/ethernet/netronome/nfp/bpf/main.c static const char *nfp_bpf_extra_cap(struct nfp_app *app, struct nfp_net *nn)
nn                 59 drivers/net/ethernet/netronome/nfp/bpf/main.c 	return nfp_net_ebpf_capable(nn) ? "BPF" : "";
nn                 63 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, unsigned int id)
nn                 82 drivers/net/ethernet/netronome/nfp/bpf/main.c 	nn->app_priv = bv;
nn                 84 drivers/net/ethernet/netronome/nfp/bpf/main.c 	err = nfp_app_nic_vnic_alloc(app, nn, id);
nn                 88 drivers/net/ethernet/netronome/nfp/bpf/main.c 	bv->start_off = nn_readw(nn, NFP_NET_CFG_BPF_START);
nn                 89 drivers/net/ethernet/netronome/nfp/bpf/main.c 	bv->tgt_done = nn_readw(nn, NFP_NET_CFG_BPF_DONE);
nn                 93 drivers/net/ethernet/netronome/nfp/bpf/main.c 	kfree(nn->app_priv);
nn                 97 drivers/net/ethernet/netronome/nfp/bpf/main.c static void nfp_bpf_vnic_free(struct nfp_app *app, struct nfp_net *nn)
nn                 99 drivers/net/ethernet/netronome/nfp/bpf/main.c 	struct nfp_bpf_vnic *bv = nn->app_priv;
nn                109 drivers/net/ethernet/netronome/nfp/bpf/main.c 	struct nfp_net *nn = cb_priv;
nn                119 drivers/net/ethernet/netronome/nfp/bpf/main.c 	if (!tc_cls_can_offload_and_chain0(nn->dp.netdev, &cls_bpf->common))
nn                121 drivers/net/ethernet/netronome/nfp/bpf/main.c 	if (!nfp_net_ebpf_capable(nn)) {
nn                143 drivers/net/ethernet/netronome/nfp/bpf/main.c 	bv = nn->app_priv;
nn                153 drivers/net/ethernet/netronome/nfp/bpf/main.c 	err = nfp_net_bpf_offload(nn, cls_bpf->prog, oldprog,
nn                159 drivers/net/ethernet/netronome/nfp/bpf/main.c 	nn->port->tc_offload_cnt = !!bv->tc_prog;
nn                168 drivers/net/ethernet/netronome/nfp/bpf/main.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                175 drivers/net/ethernet/netronome/nfp/bpf/main.c 						  nn, nn, true);
nn                184 drivers/net/ethernet/netronome/nfp/bpf/main.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                187 drivers/net/ethernet/netronome/nfp/bpf/main.c 	if (~nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF)
nn                190 drivers/net/ethernet/netronome/nfp/bpf/main.c 	max_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32;
nn                192 drivers/net/ethernet/netronome/nfp/bpf/main.c 		nn_info(nn, "BPF offload active, MTU over %u not supported\n",
nn                578 drivers/net/ethernet/netronome/nfp/bpf/main.h int nfp_ndo_bpf(struct nfp_app *app, struct nfp_net *nn,
nn                580 drivers/net/ethernet/netronome/nfp/bpf/main.h int nfp_net_bpf_offload(struct nfp_net *nn, struct bpf_prog *prog,
nn                217 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	struct nfp_net *nn = netdev_priv(prog->aux->offload->netdev);
nn                226 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	max_instr = nn_readw(nn, NFP_NET_CFG_BPF_MAX_LEN);
nn                421 drivers/net/ethernet/netronome/nfp/bpf/offload.c int nfp_ndo_bpf(struct nfp_app *app, struct nfp_net *nn, struct netdev_bpf *bpf)
nn                481 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_net_bpf_load(struct nfp_net *nn, struct bpf_prog *prog,
nn                490 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	fw_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32;
nn                491 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	pkt_off = min(prog->aux->max_pkt_offset, nn->dp.netdev->mtu);
nn                497 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	max_stack = nn_readb(nn, NFP_NET_CFG_BPF_STACK_SZ) * 64;
nn                503 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	max_prog_len = nn_readw(nn, NFP_NET_CFG_BPF_MAX_LEN);
nn                509 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	img = nfp_bpf_relo_for_vnic(nfp_prog, nn->app_priv);
nn                513 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	dma_addr = dma_map_single(nn->dp.dev, img,
nn                516 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	if (dma_mapping_error(nn->dp.dev, dma_addr)) {
nn                521 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	nn_writew(nn, NFP_NET_CFG_BPF_SIZE, nfp_prog->prog_len);
nn                522 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	nn_writeq(nn, NFP_NET_CFG_BPF_ADDR, dma_addr);
nn                525 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	err = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_BPF);
nn                530 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	dma_unmap_single(nn->dp.dev, dma_addr, nfp_prog->prog_len * sizeof(u64),
nn                538 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_net_bpf_start(struct nfp_net *nn, struct netlink_ext_ack *extack)
nn                543 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	nn->dp.ctrl |= NFP_NET_CFG_CTRL_BPF;
nn                544 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	nn_writel(nn, NFP_NET_CFG_CTRL, nn->dp.ctrl);
nn                545 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	err = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_GEN);
nn                551 drivers/net/ethernet/netronome/nfp/bpf/offload.c static int nfp_net_bpf_stop(struct nfp_net *nn)
nn                553 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	if (!(nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF))
nn                556 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	nn->dp.ctrl &= ~NFP_NET_CFG_CTRL_BPF;
nn                557 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	nn_writel(nn, NFP_NET_CFG_CTRL, nn->dp.ctrl);
nn                559 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	return nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_GEN);
nn                562 drivers/net/ethernet/netronome/nfp/bpf/offload.c int nfp_net_bpf_offload(struct nfp_net *nn, struct bpf_prog *prog,
nn                567 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	if (prog && !bpf_offload_dev_match(prog, nn->dp.netdev))
nn                573 drivers/net/ethernet/netronome/nfp/bpf/offload.c 		cap = nn_readb(nn, NFP_NET_CFG_BPF_CAP);
nn                582 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	if (!old_prog && nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF)
nn                586 drivers/net/ethernet/netronome/nfp/bpf/offload.c 		return nfp_net_bpf_stop(nn);
nn                588 drivers/net/ethernet/netronome/nfp/bpf/offload.c 	err = nfp_net_bpf_load(nn, prog, extack);
nn                593 drivers/net/ethernet/netronome/nfp/bpf/offload.c 		nfp_net_bpf_start(nn, extack);
nn                763 drivers/net/ethernet/netronome/nfp/bpf/verifier.c 	struct nfp_net *nn;
nn                789 drivers/net/ethernet/netronome/nfp/bpf/verifier.c 	nn = netdev_priv(env->prog->aux->offload->netdev);
nn                790 drivers/net/ethernet/netronome/nfp/bpf/verifier.c 	max_stack = nn_readb(nn, NFP_NET_CFG_BPF_STACK_SZ) * 64;
nn                113 drivers/net/ethernet/netronome/nfp/ccm.h int nfp_ccm_mbox_alloc(struct nfp_net *nn);
nn                114 drivers/net/ethernet/netronome/nfp/ccm.h void nfp_ccm_mbox_free(struct nfp_net *nn);
nn                115 drivers/net/ethernet/netronome/nfp/ccm.h int nfp_ccm_mbox_init(struct nfp_net *nn);
nn                116 drivers/net/ethernet/netronome/nfp/ccm.h void nfp_ccm_mbox_clean(struct nfp_net *nn);
nn                117 drivers/net/ethernet/netronome/nfp/ccm.h bool nfp_ccm_mbox_fits(struct nfp_net *nn, unsigned int size);
nn                119 drivers/net/ethernet/netronome/nfp/ccm.h nfp_ccm_mbox_msg_alloc(struct nfp_net *nn, unsigned int req_size,
nn                121 drivers/net/ethernet/netronome/nfp/ccm.h int __nfp_ccm_mbox_communicate(struct nfp_net *nn, struct sk_buff *skb,
nn                125 drivers/net/ethernet/netronome/nfp/ccm.h int nfp_ccm_mbox_communicate(struct nfp_net *nn, struct sk_buff *skb,
nn                129 drivers/net/ethernet/netronome/nfp/ccm.h int nfp_ccm_mbox_post(struct nfp_net *nn, struct sk_buff *skb,
nn                 54 drivers/net/ethernet/netronome/nfp/ccm_mbox.c static u32 nfp_ccm_mbox_max_msg(struct nfp_net *nn)
nn                 56 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	return round_down(nn->tlv_caps.mbox_len, 4) -
nn                116 drivers/net/ethernet/netronome/nfp/ccm_mbox.c static bool nfp_ccm_mbox_is_first(struct nfp_net *nn, struct sk_buff *skb)
nn                118 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	return skb_queue_is_first(&nn->mbox_cmsg.queue, skb);
nn                121 drivers/net/ethernet/netronome/nfp/ccm_mbox.c static bool nfp_ccm_mbox_should_run(struct nfp_net *nn, struct sk_buff *skb)
nn                128 drivers/net/ethernet/netronome/nfp/ccm_mbox.c static void nfp_ccm_mbox_mark_next_runner(struct nfp_net *nn)
nn                133 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	skb = skb_peek(&nn->mbox_cmsg.queue);
nn                140 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		queue_work(nn->mbox_cmsg.workq, &nn->mbox_cmsg.runq_work);
nn                144 drivers/net/ethernet/netronome/nfp/ccm_mbox.c nfp_ccm_mbox_write_tlv(struct nfp_net *nn, u32 off, u32 type, u32 len)
nn                146 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nn_writel(nn, off,
nn                151 drivers/net/ethernet/netronome/nfp/ccm_mbox.c static void nfp_ccm_mbox_copy_in(struct nfp_net *nn, struct sk_buff *last)
nn                158 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	off = nn->tlv_caps.mbox_off + NFP_NET_CFG_MBOX_SIMPLE_VAL;
nn                159 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	skb = __skb_peek(&nn->mbox_cmsg.queue);
nn                161 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nfp_ccm_mbox_write_tlv(nn, off, NFP_NET_MBOX_TLV_TYPE_MSG,
nn                169 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_writel(nn, off, be32_to_cpu(data[i]));
nn                176 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_writel(nn, off, be32_to_cpu(tmp));
nn                184 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nfp_ccm_mbox_write_tlv(nn, off,
nn                192 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		skb = skb_queue_next(&nn->mbox_cmsg.queue, skb);
nn                195 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nfp_ccm_mbox_write_tlv(nn, off, NFP_NET_MBOX_TLV_TYPE_END, 0);
nn                199 drivers/net/ethernet/netronome/nfp/ccm_mbox.c nfp_ccm_mbox_find_req(struct nfp_net *nn, __be16 tag, struct sk_buff *last)
nn                203 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	skb = __skb_peek(&nn->mbox_cmsg.queue);
nn                210 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		skb = skb_queue_next(&nn->mbox_cmsg.queue, skb);
nn                214 drivers/net/ethernet/netronome/nfp/ccm_mbox.c static void nfp_ccm_mbox_copy_out(struct nfp_net *nn, struct sk_buff *last)
nn                220 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	data = nn->dp.ctrl_bar + nn->tlv_caps.mbox_off +
nn                222 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	end = data + nn->tlv_caps.mbox_len;
nn                232 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		offset = data - nn->dp.ctrl_bar;
nn                238 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp, "mailbox oversized TLV type:%d offset:%u len:%u\n",
nn                249 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp, "mailbox unknown TLV type:%d offset:%u len:%u\n",
nn                255 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp, "mailbox msg too short to contain header TLV type:%d offset:%u len:%u\n",
nn                262 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		skb = nfp_ccm_mbox_find_req(nn, hdr.tag, last);
nn                264 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp, "mailbox request not found:%u\n",
nn                271 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp,
nn                279 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp, "mailbox msg reply wrong type:%u expected:%lu\n",
nn                286 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp, "mailbox msg reply wrong size type:%u expected:%u have:%u\n",
nn                292 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp, "mailbox msg oversized reply type:%u max:%u have:%u\n",
nn                323 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp,
nn                330 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_lock_bh(&nn->mbox_cmsg.queue.lock);
nn                332 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		skb = __skb_dequeue(&nn->mbox_cmsg.queue);
nn                343 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 				nn_dp_warn(&nn->dp,
nn                350 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nfp_ccm_mbox_mark_next_runner(nn);
nn                351 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                355 drivers/net/ethernet/netronome/nfp/ccm_mbox.c nfp_ccm_mbox_mark_all_err(struct nfp_net *nn, struct sk_buff *last, int err)
nn                360 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_lock_bh(&nn->mbox_cmsg.queue.lock);
nn                362 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		skb = __skb_dequeue(&nn->mbox_cmsg.queue);
nn                370 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nfp_ccm_mbox_mark_next_runner(nn);
nn                371 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                374 drivers/net/ethernet/netronome/nfp/ccm_mbox.c static void nfp_ccm_mbox_run_queue_unlock(struct nfp_net *nn)
nn                375 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	__releases(&nn->mbox_cmsg.queue.lock)
nn                377 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	int space = nn->tlv_caps.mbox_len - NFP_NET_CFG_MBOX_SIMPLE_VAL;
nn                385 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	last = skb = __skb_peek(&nn->mbox_cmsg.queue);
nn                388 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	while (!skb_queue_is_last(&nn->mbox_cmsg.queue, last)) {
nn                389 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		skb = skb_queue_next(&nn->mbox_cmsg.queue, last);
nn                399 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                405 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nn_ctrl_bar_lock(nn);
nn                407 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nfp_ccm_mbox_copy_in(nn, last);
nn                409 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	err = nfp_net_mbox_reconfig(nn, NFP_NET_CFG_MBOX_CMD_TLV_CMSG);
nn                411 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nfp_ccm_mbox_copy_out(nn, last);
nn                413 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nfp_ccm_mbox_mark_all_err(nn, last, -EIO);
nn                415 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nn_ctrl_bar_unlock(nn);
nn                417 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	wake_up_all(&nn->mbox_cmsg.wq);
nn                434 drivers/net/ethernet/netronome/nfp/ccm_mbox.c nfp_ccm_mbox_unlink_unlock(struct nfp_net *nn, struct sk_buff *skb,
nn                436 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	__releases(&nn->mbox_cmsg.queue.lock)
nn                441 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                443 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		wait_event(nn->mbox_cmsg.wq, nfp_ccm_mbox_done(skb));
nn                448 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	was_first = nfp_ccm_mbox_should_run(nn, skb);
nn                449 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	__skb_unlink(skb, &nn->mbox_cmsg.queue);
nn                451 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nfp_ccm_mbox_mark_next_runner(nn);
nn                453 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                456 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		wake_up_all(&nn->mbox_cmsg.wq);
nn                458 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nn_dp_warn(&nn->dp, "time out waiting for mbox response to 0x%02x\n",
nn                464 drivers/net/ethernet/netronome/nfp/ccm_mbox.c nfp_ccm_mbox_msg_prepare(struct nfp_net *nn, struct sk_buff *skb,
nn                469 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	const unsigned int mbox_max = nfp_ccm_mbox_max_msg(nn);
nn                474 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	if (unlikely(!(nn->tlv_caps.mbox_cmsg_types & BIT(type)))) {
nn                475 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nn_dp_warn(&nn->dp,
nn                496 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nn_dp_warn(&nn->dp,
nn                505 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nn_dp_warn(&nn->dp,
nn                517 drivers/net/ethernet/netronome/nfp/ccm_mbox.c nfp_ccm_mbox_msg_enqueue(struct nfp_net *nn, struct sk_buff *skb,
nn                522 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	assert_spin_locked(&nn->mbox_cmsg.queue.lock);
nn                524 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	if (!critical && nn->mbox_cmsg.queue.qlen >= NFP_CCM_MAX_QLEN) {
nn                525 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nn_dp_warn(&nn->dp, "mailbox request queue too long\n");
nn                532 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	hdr->tag = cpu_to_be16(nn->mbox_cmsg.tag++);
nn                534 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	__skb_queue_tail(&nn->mbox_cmsg.queue, skb);
nn                539 drivers/net/ethernet/netronome/nfp/ccm_mbox.c int __nfp_ccm_mbox_communicate(struct nfp_net *nn, struct sk_buff *skb,
nn                546 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	err = nfp_ccm_mbox_msg_prepare(nn, skb, type, reply_size,
nn                551 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_lock_bh(&nn->mbox_cmsg.queue.lock);
nn                553 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	err = nfp_ccm_mbox_msg_enqueue(nn, skb, type, critical);
nn                558 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	if (!nfp_ccm_mbox_is_first(nn, skb)) {
nn                561 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                563 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		to = !wait_event_timeout(nn->mbox_cmsg.wq,
nn                565 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 					 nfp_ccm_mbox_should_run(nn, skb),
nn                574 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		spin_lock_bh(&nn->mbox_cmsg.queue.lock);
nn                576 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		if (!nfp_ccm_mbox_is_first(nn, skb)) {
nn                579 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			err = nfp_ccm_mbox_unlink_unlock(nn, skb, type);
nn                587 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nfp_ccm_mbox_run_queue_unlock(nn);
nn                591 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                597 drivers/net/ethernet/netronome/nfp/ccm_mbox.c int nfp_ccm_mbox_communicate(struct nfp_net *nn, struct sk_buff *skb,
nn                602 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	return __nfp_ccm_mbox_communicate(nn, skb, type, reply_size,
nn                609 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	struct nfp_net *nn;
nn                611 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nn = container_of(work, struct nfp_net, mbox_cmsg.runq_work);
nn                613 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_lock_bh(&nn->mbox_cmsg.queue.lock);
nn                615 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	skb = __skb_peek(&nn->mbox_cmsg.queue);
nn                617 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		    !nfp_ccm_mbox_should_run(nn, skb))) {
nn                618 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                622 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nfp_ccm_mbox_run_queue_unlock(nn);
nn                628 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	struct nfp_net *nn;
nn                631 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nn = container_of(work, struct nfp_net, mbox_cmsg.wait_work);
nn                633 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	skb = skb_peek(&nn->mbox_cmsg.queue);
nn                638 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	err = nfp_net_mbox_reconfig_wait_posted(nn);
nn                640 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nfp_ccm_mbox_copy_out(nn, skb);
nn                642 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		nfp_ccm_mbox_mark_all_err(nn, skb, -EIO);
nn                644 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nn_ctrl_bar_unlock(nn);
nn                645 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	wake_up_all(&nn->mbox_cmsg.wq);
nn                648 drivers/net/ethernet/netronome/nfp/ccm_mbox.c int nfp_ccm_mbox_post(struct nfp_net *nn, struct sk_buff *skb,
nn                653 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	err = nfp_ccm_mbox_msg_prepare(nn, skb, type, 0, max_reply_size,
nn                660 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_lock_bh(&nn->mbox_cmsg.queue.lock);
nn                662 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	err = nfp_ccm_mbox_msg_enqueue(nn, skb, type, false);
nn                666 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	if (nfp_ccm_mbox_is_first(nn, skb)) {
nn                667 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		if (nn_ctrl_bar_trylock(nn)) {
nn                668 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nfp_ccm_mbox_copy_in(nn, skb);
nn                669 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nfp_net_mbox_reconfig_post(nn,
nn                671 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			queue_work(nn->mbox_cmsg.workq,
nn                672 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 				   &nn->mbox_cmsg.wait_work);
nn                674 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 			nfp_ccm_mbox_mark_next_runner(nn);
nn                678 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                683 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	spin_unlock_bh(&nn->mbox_cmsg.queue.lock);
nn                690 drivers/net/ethernet/netronome/nfp/ccm_mbox.c nfp_ccm_mbox_msg_alloc(struct nfp_net *nn, unsigned int req_size,
nn                697 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 		max_size = nfp_ccm_mbox_max_msg(nn);
nn                711 drivers/net/ethernet/netronome/nfp/ccm_mbox.c bool nfp_ccm_mbox_fits(struct nfp_net *nn, unsigned int size)
nn                713 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	return nfp_ccm_mbox_max_msg(nn) >= size;
nn                716 drivers/net/ethernet/netronome/nfp/ccm_mbox.c int nfp_ccm_mbox_init(struct nfp_net *nn)
nn                721 drivers/net/ethernet/netronome/nfp/ccm_mbox.c void nfp_ccm_mbox_clean(struct nfp_net *nn)
nn                723 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	drain_workqueue(nn->mbox_cmsg.workq);
nn                726 drivers/net/ethernet/netronome/nfp/ccm_mbox.c int nfp_ccm_mbox_alloc(struct nfp_net *nn)
nn                728 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	skb_queue_head_init(&nn->mbox_cmsg.queue);
nn                729 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	init_waitqueue_head(&nn->mbox_cmsg.wq);
nn                730 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	INIT_WORK(&nn->mbox_cmsg.wait_work, nfp_ccm_mbox_post_wait_work);
nn                731 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	INIT_WORK(&nn->mbox_cmsg.runq_work, nfp_ccm_mbox_post_runq_work);
nn                733 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	nn->mbox_cmsg.workq = alloc_workqueue("nfp-ccm-mbox", WQ_UNBOUND, 0);
nn                734 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	if (!nn->mbox_cmsg.workq)
nn                739 drivers/net/ethernet/netronome/nfp/ccm_mbox.c void nfp_ccm_mbox_free(struct nfp_net *nn)
nn                741 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	destroy_workqueue(nn->mbox_cmsg.workq);
nn                742 drivers/net/ethernet/netronome/nfp/ccm_mbox.c 	WARN_ON(!skb_queue_empty(&nn->mbox_cmsg.queue));
nn                 19 drivers/net/ethernet/netronome/nfp/crypto/crypto.h int nfp_net_tls_init(struct nfp_net *nn);
nn                 21 drivers/net/ethernet/netronome/nfp/crypto/crypto.h static inline int nfp_net_tls_init(struct nfp_net *nn)
nn                 30 drivers/net/ethernet/netronome/nfp/crypto/tls.c static void nfp_net_crypto_set_op(struct nfp_net *nn, u8 opcode, bool on)
nn                 34 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	off = nn->tlv_caps.crypto_enable_off + round_down(opcode / 8, 4);
nn                 36 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	val = nn_readl(nn, off);
nn                 41 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nn_writel(nn, off, val);
nn                 45 drivers/net/ethernet/netronome/nfp/crypto/tls.c __nfp_net_tls_conn_cnt_changed(struct nfp_net *nn, int add,
nn                 53 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nn->ktls_tx_conn_cnt += add;
nn                 54 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		cnt = nn->ktls_tx_conn_cnt;
nn                 55 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nn->dp.ktls_tx = !!nn->ktls_tx_conn_cnt;
nn                 58 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nn->ktls_rx_conn_cnt += add;
nn                 59 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		cnt = nn->ktls_rx_conn_cnt;
nn                 66 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nfp_net_crypto_set_op(nn, opcode, cnt);
nn                 71 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_tls_conn_cnt_changed(struct nfp_net *nn, int add,
nn                 77 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nn_ctrl_bar_lock(nn);
nn                 78 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	if (__nfp_net_tls_conn_cnt_changed(nn, add, direction)) {
nn                 79 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		ret = __nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_CRYPTO);
nn                 82 drivers/net/ethernet/netronome/nfp/crypto/tls.c 			__nfp_net_tls_conn_cnt_changed(nn, -add, direction);
nn                 84 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nn_ctrl_bar_unlock(nn);
nn                 90 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_tls_conn_add(struct nfp_net *nn, enum tls_offload_ctx_dir direction)
nn                 92 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	return nfp_net_tls_conn_cnt_changed(nn, 1, direction);
nn                 96 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_tls_conn_remove(struct nfp_net *nn, enum tls_offload_ctx_dir direction)
nn                 98 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	return nfp_net_tls_conn_cnt_changed(nn, -1, direction);
nn                102 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_tls_alloc_simple(struct nfp_net *nn, size_t req_sz, gfp_t flags)
nn                104 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	return nfp_ccm_mbox_msg_alloc(nn, req_sz,
nn                110 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_tls_communicate_simple(struct nfp_net *nn, struct sk_buff *skb,
nn                116 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	err = __nfp_ccm_mbox_communicate(nn, skb, type,
nn                120 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nn_dp_warn(&nn->dp, "failed to %s TLS: %d\n", name, err);
nn                127 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nn_dp_warn(&nn->dp, "failed to %s TLS, fw replied: %d\n",
nn                134 drivers/net/ethernet/netronome/nfp/crypto/tls.c static void nfp_net_tls_del_fw(struct nfp_net *nn, __be32 *fw_handle)
nn                139 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	skb = nfp_net_tls_alloc_simple(nn, sizeof(*req), GFP_KERNEL);
nn                147 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nfp_net_tls_communicate_simple(nn, skb, "delete",
nn                160 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_tls_assign_conn_id(struct nfp_net *nn,
nn                166 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	id = atomic64_inc_return(&nn->ktls_conn_id_gen);
nn                174 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_tls_set_ipv4(struct nfp_net *nn, struct nfp_crypto_req_add_v4 *req,
nn                182 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nfp_net_tls_assign_conn_id(nn, &req->front);
nn                192 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_tls_set_ipv6(struct nfp_net *nn, struct nfp_crypto_req_add_v6 *req,
nn                201 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nfp_net_tls_assign_conn_id(nn, &req->front);
nn                243 drivers/net/ethernet/netronome/nfp/crypto/tls.c nfp_net_cipher_supported(struct nfp_net *nn, u16 cipher_type,
nn                259 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	return nn->tlv_caps.crypto_ops & BIT(bit);
nn                269 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                285 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	if (!nfp_net_cipher_supported(nn, crypto_info->cipher_type, direction))
nn                307 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	err = nfp_net_tls_conn_add(nn, direction);
nn                311 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	skb = nfp_ccm_mbox_msg_alloc(nn, req_sz, sizeof(*reply), GFP_KERNEL);
nn                327 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		back = nfp_net_tls_set_ipv6(nn, req, sk, direction);
nn                329 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		back = nfp_net_tls_set_ipv4(nn, req, sk, direction);
nn                347 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	err = nfp_ccm_mbox_communicate(nn, skb, NFP_CCM_TYPE_CRYPTO_ADD,
nn                361 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nn_dp_warn(&nn->dp, "failed to add TLS: %d (%d)\n",
nn                370 drivers/net/ethernet/netronome/nfp/crypto/tls.c 			if (!atomic_fetch_inc(&nn->ktls_no_space))
nn                371 drivers/net/ethernet/netronome/nfp/crypto/tls.c 				nn_info(nn, "HW TLS table full\n");
nn                373 drivers/net/ethernet/netronome/nfp/crypto/tls.c 			nn_dp_warn(&nn->dp,
nn                380 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nn_dp_warn(&nn->dp, "FW returned NULL handle\n");
nn                399 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nfp_net_tls_del_fw(nn, reply->handle);
nn                403 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nfp_net_tls_conn_remove(nn, direction);
nn                411 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                414 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nfp_net_tls_conn_remove(nn, direction);
nn                417 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nfp_net_tls_del_fw(nn, ntls->fw_handle);
nn                424 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                432 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	skb = nfp_net_tls_alloc_simple(nn, sizeof(*req), flags);
nn                446 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		err = nfp_net_tls_communicate_simple(nn, skb, "sync",
nn                452 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nfp_ccm_mbox_post(nn, skb, NFP_CCM_TYPE_CRYPTO_UPDATE,
nn                465 drivers/net/ethernet/netronome/nfp/crypto/tls.c static int nfp_net_tls_reset(struct nfp_net *nn)
nn                470 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	skb = nfp_net_tls_alloc_simple(nn, sizeof(*req), GFP_KERNEL);
nn                477 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	return nfp_net_tls_communicate_simple(nn, skb, "reset",
nn                481 drivers/net/ethernet/netronome/nfp/crypto/tls.c int nfp_net_tls_init(struct nfp_net *nn)
nn                483 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	struct net_device *netdev = nn->dp.netdev;
nn                486 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	if (!(nn->tlv_caps.crypto_ops & NFP_NET_TLS_OPCODE_MASK))
nn                489 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	if ((nn->tlv_caps.mbox_cmsg_types & NFP_NET_TLS_CCM_MBOX_OPS_MASK) !=
nn                493 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	if (!nfp_ccm_mbox_fits(nn, sizeof(struct nfp_crypto_req_add_v6))) {
nn                494 drivers/net/ethernet/netronome/nfp/crypto/tls.c 		nn_warn(nn, "disabling TLS offload - mbox too small: %d\n",
nn                495 drivers/net/ethernet/netronome/nfp/crypto/tls.c 			nn->tlv_caps.mbox_len);
nn                499 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	err = nfp_net_tls_reset(nn);
nn                503 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nn_ctrl_bar_lock(nn);
nn                504 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nn_writel(nn, nn->tlv_caps.crypto_enable_off, 0);
nn                505 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	err = __nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_CRYPTO);
nn                506 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	nn_ctrl_bar_unlock(nn);
nn                510 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	if (nn->tlv_caps.crypto_ops & NFP_NET_TLS_OPCODE_MASK_RX) {
nn                514 drivers/net/ethernet/netronome/nfp/crypto/tls.c 	if (nn->tlv_caps.crypto_ops & NFP_NET_TLS_OPCODE_MASK_TX) {
nn                 28 drivers/net/ethernet/netronome/nfp/flower/main.c static const char *nfp_flower_extra_cap(struct nfp_app *app, struct nfp_net *nn)
nn                361 drivers/net/ethernet/netronome/nfp/flower/main.c 	if (!priv->nn)
nn                423 drivers/net/ethernet/netronome/nfp/flower/main.c 			port->vnic = priv->nn->dp.ctrl_bar;
nn                436 drivers/net/ethernet/netronome/nfp/flower/main.c 				    port_id, port, priv->nn->dp.netdev);
nn                476 drivers/net/ethernet/netronome/nfp/flower/main.c 	if (!priv->nn)
nn                544 drivers/net/ethernet/netronome/nfp/flower/main.c 		SET_NETDEV_DEV(repr, &priv->nn->pdev->dev);
nn                549 drivers/net/ethernet/netronome/nfp/flower/main.c 				    cmsg_port_id, port, priv->nn->dp.netdev);
nn                600 drivers/net/ethernet/netronome/nfp/flower/main.c static int nfp_flower_vnic_alloc(struct nfp_app *app, struct nfp_net *nn,
nn                608 drivers/net/ethernet/netronome/nfp/flower/main.c 	eth_hw_addr_random(nn->dp.netdev);
nn                609 drivers/net/ethernet/netronome/nfp/flower/main.c 	netif_keep_dst(nn->dp.netdev);
nn                610 drivers/net/ethernet/netronome/nfp/flower/main.c 	nn->vnic_no_name = true;
nn                615 drivers/net/ethernet/netronome/nfp/flower/main.c 	nn->port = nfp_port_alloc(app, NFP_PORT_INVALID, nn->dp.netdev);
nn                616 drivers/net/ethernet/netronome/nfp/flower/main.c 	return PTR_ERR_OR_ZERO(nn->port);
nn                619 drivers/net/ethernet/netronome/nfp/flower/main.c static void nfp_flower_vnic_clean(struct nfp_app *app, struct nfp_net *nn)
nn                628 drivers/net/ethernet/netronome/nfp/flower/main.c 	priv->nn = NULL;
nn                631 drivers/net/ethernet/netronome/nfp/flower/main.c static int nfp_flower_vnic_init(struct nfp_app *app, struct nfp_net *nn)
nn                636 drivers/net/ethernet/netronome/nfp/flower/main.c 	priv->nn = nn;
nn                664 drivers/net/ethernet/netronome/nfp/flower/main.c 	priv->nn = NULL;
nn                170 drivers/net/ethernet/netronome/nfp/flower/main.h 	struct nfp_net *nn;
nn                 41 drivers/net/ethernet/netronome/nfp/nfp_app.c 		struct nfp_net *nn = netdev_priv(netdev);
nn                 43 drivers/net/ethernet/netronome/nfp/nfp_app.c 		return nn->app;
nn                144 drivers/net/ethernet/netronome/nfp/nfp_app.c 	struct nfp_net *nn;
nn                149 drivers/net/ethernet/netronome/nfp/nfp_app.c 	nn = netdev_priv(netdev);
nn                150 drivers/net/ethernet/netronome/nfp/nfp_app.c 	if (nn->app != app)
nn                 94 drivers/net/ethernet/netronome/nfp/nfp_app.h 	const char *(*extra_cap)(struct nfp_app *app, struct nfp_net *nn);
nn                 99 drivers/net/ethernet/netronome/nfp/nfp_app.h 	int (*vnic_alloc)(struct nfp_app *app, struct nfp_net *nn,
nn                101 drivers/net/ethernet/netronome/nfp/nfp_app.h 	void (*vnic_free)(struct nfp_app *app, struct nfp_net *nn);
nn                102 drivers/net/ethernet/netronome/nfp/nfp_app.h 	int (*vnic_init)(struct nfp_app *app, struct nfp_net *nn);
nn                103 drivers/net/ethernet/netronome/nfp/nfp_app.h 	void (*vnic_clean)(struct nfp_app *app, struct nfp_net *nn);
nn                135 drivers/net/ethernet/netronome/nfp/nfp_app.h 	int (*bpf)(struct nfp_app *app, struct nfp_net *nn,
nn                137 drivers/net/ethernet/netronome/nfp/nfp_app.h 	int (*xdp_offload)(struct nfp_app *app, struct nfp_net *nn,
nn                179 drivers/net/ethernet/netronome/nfp/nfp_app.h bool __nfp_ctrl_tx(struct nfp_net *nn, struct sk_buff *skb);
nn                180 drivers/net/ethernet/netronome/nfp/nfp_app.h bool nfp_ctrl_tx(struct nfp_net *nn, struct sk_buff *skb);
nn                198 drivers/net/ethernet/netronome/nfp/nfp_app.h static inline int nfp_app_vnic_alloc(struct nfp_app *app, struct nfp_net *nn,
nn                201 drivers/net/ethernet/netronome/nfp/nfp_app.h 	return app->type->vnic_alloc(app, nn, id);
nn                204 drivers/net/ethernet/netronome/nfp/nfp_app.h static inline void nfp_app_vnic_free(struct nfp_app *app, struct nfp_net *nn)
nn                207 drivers/net/ethernet/netronome/nfp/nfp_app.h 		app->type->vnic_free(app, nn);
nn                210 drivers/net/ethernet/netronome/nfp/nfp_app.h static inline int nfp_app_vnic_init(struct nfp_app *app, struct nfp_net *nn)
nn                214 drivers/net/ethernet/netronome/nfp/nfp_app.h 	return app->type->vnic_init(app, nn);
nn                217 drivers/net/ethernet/netronome/nfp/nfp_app.h static inline void nfp_app_vnic_clean(struct nfp_app *app, struct nfp_net *nn)
nn                220 drivers/net/ethernet/netronome/nfp/nfp_app.h 		app->type->vnic_clean(app, nn);
nn                299 drivers/net/ethernet/netronome/nfp/nfp_app.h 					    struct nfp_net *nn)
nn                303 drivers/net/ethernet/netronome/nfp/nfp_app.h 	return app->type->extra_cap(app, nn);
nn                320 drivers/net/ethernet/netronome/nfp/nfp_app.h static inline int nfp_app_bpf(struct nfp_app *app, struct nfp_net *nn,
nn                325 drivers/net/ethernet/netronome/nfp/nfp_app.h 	return app->type->bpf(app, nn, bpf);
nn                328 drivers/net/ethernet/netronome/nfp/nfp_app.h static inline int nfp_app_xdp_offload(struct nfp_app *app, struct nfp_net *nn,
nn                334 drivers/net/ethernet/netronome/nfp/nfp_app.h 	return app->type->xdp_offload(app, nn, prog, extack);
nn                434 drivers/net/ethernet/netronome/nfp/nfp_app.h int nfp_app_nic_vnic_alloc(struct nfp_app *app, struct nfp_net *nn,
nn                437 drivers/net/ethernet/netronome/nfp/nfp_app.h 				   struct nfp_net *nn, unsigned int id);
nn                 12 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 				   struct nfp_net *nn, unsigned int id)
nn                 19 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 	nn->port = nfp_port_alloc(app, NFP_PORT_PHYS_PORT, nn->dp.netdev);
nn                 20 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 	if (IS_ERR(nn->port))
nn                 21 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 		return PTR_ERR(nn->port);
nn                 23 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 	err = nfp_port_init_phy_port(pf, app, nn->port, id);
nn                 25 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 		nfp_port_free(nn->port);
nn                 29 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 	return nn->port->type == NFP_PORT_INVALID;
nn                 32 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c int nfp_app_nic_vnic_alloc(struct nfp_app *app, struct nfp_net *nn,
nn                 37 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 	err = nfp_app_nic_vnic_init_phy_port(app->pf, app, nn, id);
nn                 41 drivers/net/ethernet/netronome/nfp/nfp_app_nic.c 	nfp_net_get_mac_addr(app->pf, nn->dp.netdev, nn->port);
nn                160 drivers/net/ethernet/netronome/nfp/nfp_main.h bool nfp_ctrl_tx(struct nfp_net *nn, struct sk_buff *skb);
nn                 27 drivers/net/ethernet/netronome/nfp/nfp_net.h #define nn_pr(nn, lvl, fmt, args...)					\
nn                 29 drivers/net/ethernet/netronome/nfp/nfp_net.h 		struct nfp_net *__nn = (nn);				\
nn                 37 drivers/net/ethernet/netronome/nfp/nfp_net.h #define nn_err(nn, fmt, args...)	nn_pr(nn, KERN_ERR, fmt, ## args)
nn                 38 drivers/net/ethernet/netronome/nfp/nfp_net.h #define nn_warn(nn, fmt, args...)	nn_pr(nn, KERN_WARNING, fmt, ## args)
nn                 39 drivers/net/ethernet/netronome/nfp/nfp_net.h #define nn_info(nn, fmt, args...)	nn_pr(nn, KERN_INFO, fmt, ## args)
nn                 40 drivers/net/ethernet/netronome/nfp/nfp_net.h #define nn_dbg(nn, fmt, args...)	nn_pr(nn, KERN_DEBUG, fmt, ## args)
nn                704 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline u16 nn_readb(struct nfp_net *nn, int off)
nn                706 drivers/net/ethernet/netronome/nfp/nfp_net.h 	return readb(nn->dp.ctrl_bar + off);
nn                709 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nn_writeb(struct nfp_net *nn, int off, u8 val)
nn                711 drivers/net/ethernet/netronome/nfp/nfp_net.h 	writeb(val, nn->dp.ctrl_bar + off);
nn                714 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline u16 nn_readw(struct nfp_net *nn, int off)
nn                716 drivers/net/ethernet/netronome/nfp/nfp_net.h 	return readw(nn->dp.ctrl_bar + off);
nn                719 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nn_writew(struct nfp_net *nn, int off, u16 val)
nn                721 drivers/net/ethernet/netronome/nfp/nfp_net.h 	writew(val, nn->dp.ctrl_bar + off);
nn                724 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline u32 nn_readl(struct nfp_net *nn, int off)
nn                726 drivers/net/ethernet/netronome/nfp/nfp_net.h 	return readl(nn->dp.ctrl_bar + off);
nn                729 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nn_writel(struct nfp_net *nn, int off, u32 val)
nn                731 drivers/net/ethernet/netronome/nfp/nfp_net.h 	writel(val, nn->dp.ctrl_bar + off);
nn                734 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline u64 nn_readq(struct nfp_net *nn, int off)
nn                736 drivers/net/ethernet/netronome/nfp/nfp_net.h 	return readq(nn->dp.ctrl_bar + off);
nn                739 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nn_writeq(struct nfp_net *nn, int off, u64 val)
nn                741 drivers/net/ethernet/netronome/nfp/nfp_net.h 	writeq(val, nn->dp.ctrl_bar + off);
nn                745 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nn_pci_flush(struct nfp_net *nn)
nn                747 drivers/net/ethernet/netronome/nfp/nfp_net.h 	nn_readl(nn, NFP_NET_CFG_VERSION);
nn                868 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline bool nfp_net_is_data_vnic(struct nfp_net *nn)
nn                870 drivers/net/ethernet/netronome/nfp/nfp_net.h 	WARN_ON_ONCE(!nn->dp.netdev && nn->port);
nn                871 drivers/net/ethernet/netronome/nfp/nfp_net.h 	return !!nn->dp.netdev;
nn                874 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline bool nfp_net_running(struct nfp_net *nn)
nn                876 drivers/net/ethernet/netronome/nfp/nfp_net.h 	return nn->dp.ctrl & NFP_NET_CFG_CTRL_ENABLE;
nn                879 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline const char *nfp_net_name(struct nfp_net *nn)
nn                881 drivers/net/ethernet/netronome/nfp/nfp_net.h 	return nn->dp.netdev ? nn->dp.netdev->name : "ctrl";
nn                884 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nfp_ctrl_lock(struct nfp_net *nn)
nn                885 drivers/net/ethernet/netronome/nfp/nfp_net.h 	__acquires(&nn->r_vecs[0].lock)
nn                887 drivers/net/ethernet/netronome/nfp/nfp_net.h 	spin_lock_bh(&nn->r_vecs[0].lock);
nn                890 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nfp_ctrl_unlock(struct nfp_net *nn)
nn                891 drivers/net/ethernet/netronome/nfp/nfp_net.h 	__releases(&nn->r_vecs[0].lock)
nn                893 drivers/net/ethernet/netronome/nfp/nfp_net.h 	spin_unlock_bh(&nn->r_vecs[0].lock);
nn                896 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nn_ctrl_bar_lock(struct nfp_net *nn)
nn                898 drivers/net/ethernet/netronome/nfp/nfp_net.h 	down(&nn->bar_lock);
nn                901 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline bool nn_ctrl_bar_trylock(struct nfp_net *nn)
nn                903 drivers/net/ethernet/netronome/nfp/nfp_net.h 	return !down_trylock(&nn->bar_lock);
nn                906 drivers/net/ethernet/netronome/nfp/nfp_net.h static inline void nn_ctrl_bar_unlock(struct nfp_net *nn)
nn                908 drivers/net/ethernet/netronome/nfp/nfp_net.h 	up(&nn->bar_lock);
nn                928 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_net_free(struct nfp_net *nn);
nn                930 drivers/net/ethernet/netronome/nfp/nfp_net.h int nfp_net_init(struct nfp_net *nn);
nn                931 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_net_clean(struct nfp_net *nn);
nn                933 drivers/net/ethernet/netronome/nfp/nfp_net.h int nfp_ctrl_open(struct nfp_net *nn);
nn                934 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_ctrl_close(struct nfp_net *nn);
nn                937 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_net_info(struct nfp_net *nn);
nn                938 drivers/net/ethernet/netronome/nfp/nfp_net.h int __nfp_net_reconfig(struct nfp_net *nn, u32 update);
nn                939 drivers/net/ethernet/netronome/nfp/nfp_net.h int nfp_net_reconfig(struct nfp_net *nn, u32 update);
nn                940 drivers/net/ethernet/netronome/nfp/nfp_net.h unsigned int nfp_net_rss_key_sz(struct nfp_net *nn);
nn                941 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_net_rss_write_itbl(struct nfp_net *nn);
nn                942 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_net_rss_write_key(struct nfp_net *nn);
nn                943 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_net_coalesce_write_cfg(struct nfp_net *nn);
nn                944 drivers/net/ethernet/netronome/nfp/nfp_net.h int nfp_net_mbox_lock(struct nfp_net *nn, unsigned int data_size);
nn                945 drivers/net/ethernet/netronome/nfp/nfp_net.h int nfp_net_mbox_reconfig(struct nfp_net *nn, u32 mbox_cmd);
nn                946 drivers/net/ethernet/netronome/nfp/nfp_net.h int nfp_net_mbox_reconfig_and_unlock(struct nfp_net *nn, u32 mbox_cmd);
nn                947 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_net_mbox_reconfig_post(struct nfp_net *nn, u32 update);
nn                948 drivers/net/ethernet/netronome/nfp/nfp_net.h int nfp_net_mbox_reconfig_wait_posted(struct nfp_net *nn);
nn                955 drivers/net/ethernet/netronome/nfp/nfp_net.h nfp_net_irqs_assign(struct nfp_net *nn, struct msix_entry *irq_entries,
nn                958 drivers/net/ethernet/netronome/nfp/nfp_net.h struct nfp_net_dp *nfp_net_clone_dp(struct nfp_net *nn);
nn                959 drivers/net/ethernet/netronome/nfp/nfp_net.h int nfp_net_ring_reconfig(struct nfp_net *nn, struct nfp_net_dp *new,
nn                966 drivers/net/ethernet/netronome/nfp/nfp_net.h void nfp_net_debugfs_vnic_add(struct nfp_net *nn, struct dentry *ddir);
nn                983 drivers/net/ethernet/netronome/nfp/nfp_net.h nfp_net_debugfs_vnic_add(struct nfp_net *nn, struct dentry *ddir)
nn                100 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_reconfig_start(struct nfp_net *nn, u32 update)
nn                102 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_UPDATE, update);
nn                104 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_pci_flush(nn);
nn                105 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_qcp_wr_ptr_add(nn->qcp_cfg, 1);
nn                106 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->reconfig_in_progress_update = update;
nn                110 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_reconfig_start_async(struct nfp_net *nn, u32 update)
nn                112 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	update |= nn->reconfig_posted;
nn                113 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->reconfig_posted = 0;
nn                115 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_start(nn, update);
nn                117 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->reconfig_timer_active = true;
nn                118 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	mod_timer(&nn->reconfig_timer, jiffies + NFP_NET_POLL_TIMEOUT * HZ);
nn                121 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static bool nfp_net_reconfig_check_done(struct nfp_net *nn, bool last_check)
nn                125 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	reg = nn_readl(nn, NFP_NET_CFG_UPDATE);
nn                129 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_err(nn, "Reconfig error (status: 0x%08x update: 0x%08x ctrl: 0x%08x)\n",
nn                130 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		       reg, nn->reconfig_in_progress_update,
nn                131 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		       nn_readl(nn, NFP_NET_CFG_CTRL));
nn                134 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_err(nn, "Reconfig timeout (status: 0x%08x update: 0x%08x ctrl: 0x%08x)\n",
nn                135 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		       reg, nn->reconfig_in_progress_update,
nn                136 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		       nn_readl(nn, NFP_NET_CFG_CTRL));
nn                143 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static bool __nfp_net_reconfig_wait(struct nfp_net *nn, unsigned long deadline)
nn                152 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (nfp_net_reconfig_check_done(nn, false))
nn                157 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	while (!nfp_net_reconfig_check_done(nn, timed_out)) {
nn                165 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_reconfig_wait(struct nfp_net *nn, unsigned long deadline)
nn                167 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (__nfp_net_reconfig_wait(nn, deadline))
nn                170 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn_readl(nn, NFP_NET_CFG_UPDATE) & NFP_NET_CFG_UPDATE_ERR)
nn                178 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = from_timer(nn, t, reconfig_timer);
nn                180 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_lock_bh(&nn->reconfig_lock);
nn                182 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->reconfig_timer_active = false;
nn                185 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->reconfig_sync_present)
nn                189 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_check_done(nn, true);
nn                191 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->reconfig_posted)
nn                192 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_reconfig_start_async(nn, 0);
nn                194 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_unlock_bh(&nn->reconfig_lock);
nn                206 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_reconfig_post(struct nfp_net *nn, u32 update)
nn                208 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_lock_bh(&nn->reconfig_lock);
nn                211 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->reconfig_sync_present) {
nn                212 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->reconfig_posted |= update;
nn                217 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!nn->reconfig_timer_active ||
nn                218 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	    nfp_net_reconfig_check_done(nn, false))
nn                219 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_reconfig_start_async(nn, update);
nn                221 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->reconfig_posted |= update;
nn                223 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_unlock_bh(&nn->reconfig_lock);
nn                226 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_reconfig_sync_enter(struct nfp_net *nn)
nn                231 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_lock_bh(&nn->reconfig_lock);
nn                233 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	WARN_ON(nn->reconfig_sync_present);
nn                234 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->reconfig_sync_present = true;
nn                236 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->reconfig_timer_active) {
nn                237 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->reconfig_timer_active = false;
nn                240 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	pre_posted_requests = nn->reconfig_posted;
nn                241 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->reconfig_posted = 0;
nn                243 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_unlock_bh(&nn->reconfig_lock);
nn                246 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		del_timer_sync(&nn->reconfig_timer);
nn                247 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_reconfig_wait(nn, nn->reconfig_timer.expires);
nn                252 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_reconfig_start(nn, pre_posted_requests);
nn                253 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_reconfig_wait(nn, jiffies + HZ * NFP_NET_POLL_TIMEOUT);
nn                257 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_reconfig_wait_posted(struct nfp_net *nn)
nn                259 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_sync_enter(nn);
nn                261 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_lock_bh(&nn->reconfig_lock);
nn                262 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->reconfig_sync_present = false;
nn                263 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_unlock_bh(&nn->reconfig_lock);
nn                277 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int __nfp_net_reconfig(struct nfp_net *nn, u32 update)
nn                281 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_sync_enter(nn);
nn                283 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_start(nn, update);
nn                284 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	ret = nfp_net_reconfig_wait(nn, jiffies + HZ * NFP_NET_POLL_TIMEOUT);
nn                286 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_lock_bh(&nn->reconfig_lock);
nn                288 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->reconfig_posted)
nn                289 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_reconfig_start_async(nn, 0);
nn                291 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->reconfig_sync_present = false;
nn                293 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_unlock_bh(&nn->reconfig_lock);
nn                298 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int nfp_net_reconfig(struct nfp_net *nn, u32 update)
nn                302 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_ctrl_bar_lock(nn);
nn                303 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	ret = __nfp_net_reconfig(nn, update);
nn                304 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_ctrl_bar_unlock(nn);
nn                309 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int nfp_net_mbox_lock(struct nfp_net *nn, unsigned int data_size)
nn                311 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->tlv_caps.mbox_len < NFP_NET_CFG_MBOX_SIMPLE_VAL + data_size) {
nn                312 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_err(nn, "mailbox too small for %u of data (%u)\n",
nn                313 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		       data_size, nn->tlv_caps.mbox_len);
nn                317 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_ctrl_bar_lock(nn);
nn                330 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int nfp_net_mbox_reconfig(struct nfp_net *nn, u32 mbox_cmd)
nn                332 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	u32 mbox = nn->tlv_caps.mbox_off;
nn                335 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, mbox + NFP_NET_CFG_MBOX_SIMPLE_CMD, mbox_cmd);
nn                337 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	ret = __nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_MBOX);
nn                339 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_err(nn, "Mailbox update error\n");
nn                343 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return -nn_readl(nn, mbox + NFP_NET_CFG_MBOX_SIMPLE_RET);
nn                346 drivers/net/ethernet/netronome/nfp/nfp_net_common.c void nfp_net_mbox_reconfig_post(struct nfp_net *nn, u32 mbox_cmd)
nn                348 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	u32 mbox = nn->tlv_caps.mbox_off;
nn                350 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, mbox + NFP_NET_CFG_MBOX_SIMPLE_CMD, mbox_cmd);
nn                352 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_post(nn, NFP_NET_CFG_UPDATE_MBOX);
nn                355 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int nfp_net_mbox_reconfig_wait_posted(struct nfp_net *nn)
nn                357 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	u32 mbox = nn->tlv_caps.mbox_off;
nn                359 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_wait_posted(nn);
nn                361 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return -nn_readl(nn, mbox + NFP_NET_CFG_MBOX_SIMPLE_RET);
nn                364 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int nfp_net_mbox_reconfig_and_unlock(struct nfp_net *nn, u32 mbox_cmd)
nn                368 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	ret = nfp_net_mbox_reconfig(nn, mbox_cmd);
nn                369 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_ctrl_bar_unlock(nn);
nn                383 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_irq_unmask(struct nfp_net *nn, unsigned int entry_nr)
nn                385 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_ICR(entry_nr), NFP_NET_CFG_ICR_UNMASKED);
nn                386 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_pci_flush(nn);
nn                433 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_net_irqs_assign(struct nfp_net *nn, struct msix_entry *irq_entries,
nn                436 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net_dp *dp = &nn->dp;
nn                438 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->max_r_vecs = n - NFP_NET_NON_Q_VECTORS;
nn                439 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	dp->num_r_vecs = nn->max_r_vecs;
nn                441 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	memcpy(nn->irq_entries, irq_entries, sizeof(*irq_entries) * n);
nn                445 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		dev_warn(nn->dp.dev, "More rings (%d,%d) than vectors (%d).\n",
nn                498 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_read_link_status(struct nfp_net *nn)
nn                504 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_lock_irqsave(&nn->link_status_lock, flags);
nn                506 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	sts = nn_readl(nn, NFP_NET_CFG_STS);
nn                509 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->link_up == link_up)
nn                512 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->link_up = link_up;
nn                513 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->port)
nn                514 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		set_bit(NFP_PORT_CHANGED, &nn->port->flags);
nn                516 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->link_up) {
nn                517 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		netif_carrier_on(nn->dp.netdev);
nn                518 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		netdev_info(nn->dp.netdev, "NIC Link is Up\n");
nn                520 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		netif_carrier_off(nn->dp.netdev);
nn                521 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		netdev_info(nn->dp.netdev, "NIC Link is Down\n");
nn                524 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_unlock_irqrestore(&nn->link_status_lock, flags);
nn                536 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = data;
nn                539 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	entry = &nn->irq_entries[NFP_NET_IRQ_LSC_IDX];
nn                541 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_read_link_status(nn);
nn                543 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_irq_unmask(nn, entry->entry);
nn                557 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = data;
nn                559 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_err(nn, "%s: UNIMPLEMENTED.\n", __func__);
nn                576 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = r_vec->nfp_net;
nn                583 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	tx_ring->qcidx = tx_ring->idx * nn->stride_tx;
nn                584 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	tx_ring->qcp_q = nn->tx_bar + NFP_QCP_QUEUE_OFF(tx_ring->qcidx);
nn                597 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = r_vec->nfp_net;
nn                603 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	rx_ring->fl_qcidx = rx_ring->idx * nn->stride_rx;
nn                604 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	rx_ring->qcp_fl = nn->rx_bar + NFP_QCP_QUEUE_OFF(rx_ring->fl_qcidx);
nn                618 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_net_aux_irq_request(struct nfp_net *nn, u32 ctrl_offset,
nn                625 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	entry = &nn->irq_entries[vector_idx];
nn                627 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	snprintf(name, name_sz, format, nfp_net_name(nn));
nn                628 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = request_irq(entry->vector, handler, 0, name, nn);
nn                630 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_err(nn, "Failed to request IRQ %d (err=%d).\n",
nn                634 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, ctrl_offset, entry->entry);
nn                635 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_irq_unmask(nn, entry->entry);
nn                646 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_aux_irq_free(struct nfp_net *nn, u32 ctrl_offset,
nn                649 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, ctrl_offset, 0xff);
nn                650 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_pci_flush(nn);
nn                651 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	free_irq(nn->irq_entries[vector_idx].vector, nn);
nn                977 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                991 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	dp = &nn->dp;
nn               1325 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               1328 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (i = 0; i < nn->dp.netdev->real_num_tx_queues; i++) {
nn               1331 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_warn(nn, "TX timeout on ring: %d\n", i);
nn               1333 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_warn(nn, "TX watchdog timeout\n");
nn               1951 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			struct nfp_net *nn = netdev_priv(dp->netdev);
nn               1953 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			nfp_app_ctrl_rx_raw(nn->app, rxbuf->frag + pkt_off,
nn               1959 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			struct nfp_net *nn;
nn               1961 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			nn = netdev_priv(dp->netdev);
nn               1962 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			netdev = nfp_app_dev_get(nn->app, meta.portid,
nn               2067 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_ctrl_tx_one(struct nfp_net *nn, struct nfp_net_r_vector *r_vec,
nn               2097 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nfp_app_ctrl_has_meta(nn->app)) {
nn               2150 drivers/net/ethernet/netronome/nfp/nfp_net_common.c bool __nfp_ctrl_tx(struct nfp_net *nn, struct sk_buff *skb)
nn               2152 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net_r_vector *r_vec = &nn->r_vecs[0];
nn               2154 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return nfp_ctrl_tx_one(nn, r_vec, skb, false);
nn               2157 drivers/net/ethernet/netronome/nfp/nfp_net_common.c bool nfp_ctrl_tx(struct nfp_net *nn, struct sk_buff *skb)
nn               2159 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net_r_vector *r_vec = &nn->r_vecs[0];
nn               2163 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	ret = nfp_ctrl_tx_one(nn, r_vec, skb, false);
nn               2179 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_ctrl_meta_ok(struct nfp_net *nn, void *data, unsigned int meta_len)
nn               2183 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!nfp_app_ctrl_has_meta(nn->app))
nn               2197 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_ctrl_rx_one(struct nfp_net *nn, struct nfp_net_dp *dp,
nn               2241 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (unlikely(!nfp_ctrl_meta_ok(nn, rxbuf->frag + meta_off, meta_len))) {
nn               2266 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_app_ctrl_rx(nn->app, skb);
nn               2274 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = r_vec->nfp_net;
nn               2275 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net_dp *dp = &nn->dp;
nn               2278 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	while (nfp_ctrl_rx_one(nn, dp, r_vec, rx_ring) && budget--)
nn               2309 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_vecs_init(struct nfp_net *nn)
nn               2314 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->lsc_handler = nfp_net_irq_lsc;
nn               2315 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->exn_handler = nfp_net_irq_exn;
nn               2317 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->max_r_vecs; r++) {
nn               2320 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		entry = &nn->irq_entries[NFP_NET_NON_Q_VECTORS + r];
nn               2322 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		r_vec = &nn->r_vecs[r];
nn               2323 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		r_vec->nfp_net = nn;
nn               2327 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (nn->dp.netdev) {
nn               2444 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_tx_rings_prepare(struct nfp_net *nn, struct nfp_net_dp *dp)
nn               2459 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_tx_ring_init(&dp->tx_rings[r], &nn->r_vecs[r - bias],
nn               2559 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_rx_rings_prepare(struct nfp_net *nn, struct nfp_net_dp *dp)
nn               2569 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_rx_ring_init(&dp->rx_rings[r], &nn->r_vecs[r], r);
nn               2615 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_net_prepare_vector(struct nfp_net *nn, struct nfp_net_r_vector *r_vec,
nn               2621 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.netdev)
nn               2622 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		netif_napi_add(nn->dp.netdev, &r_vec->napi,
nn               2628 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		 "%s-rxtx-%d", nfp_net_name(nn), idx);
nn               2632 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (nn->dp.netdev)
nn               2637 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_err(nn, "Error requesting IRQ %d\n", r_vec->irq_vector);
nn               2644 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_dbg(nn, "RV%02d: irq=%03d/%03d\n", idx, r_vec->irq_vector,
nn               2651 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_net_cleanup_vector(struct nfp_net *nn, struct nfp_net_r_vector *r_vec)
nn               2654 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.netdev)
nn               2666 drivers/net/ethernet/netronome/nfp/nfp_net_common.c void nfp_net_rss_write_itbl(struct nfp_net *nn)
nn               2671 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_writel(nn, NFP_NET_CFG_RSS_ITBL + i,
nn               2672 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			  get_unaligned_le32(nn->rss_itbl + i));
nn               2679 drivers/net/ethernet/netronome/nfp/nfp_net_common.c void nfp_net_rss_write_key(struct nfp_net *nn)
nn               2683 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (i = 0; i < nfp_net_rss_key_sz(nn); i += 4)
nn               2684 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_writel(nn, NFP_NET_CFG_RSS_KEY + i,
nn               2685 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			  get_unaligned_le32(nn->rss_key + i));
nn               2692 drivers/net/ethernet/netronome/nfp/nfp_net_common.c void nfp_net_coalesce_write_cfg(struct nfp_net *nn)
nn               2702 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	factor = nn->tlv_caps.me_freq_mhz / 16;
nn               2705 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	value = (nn->rx_coalesce_max_frames << 16) |
nn               2706 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		(factor * nn->rx_coalesce_usecs);
nn               2707 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (i = 0; i < nn->dp.num_rx_rings; i++)
nn               2708 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_writel(nn, NFP_NET_CFG_RXR_IRQ_MOD(i), value);
nn               2711 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	value = (nn->tx_coalesce_max_frames << 16) |
nn               2712 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		(factor * nn->tx_coalesce_usecs);
nn               2713 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (i = 0; i < nn->dp.num_tx_rings; i++)
nn               2714 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_writel(nn, NFP_NET_CFG_TXR_IRQ_MOD(i), value);
nn               2726 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_write_mac_addr(struct nfp_net *nn, const u8 *addr)
nn               2728 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_MACADDR + 0, get_unaligned_be32(addr));
nn               2729 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writew(nn, NFP_NET_CFG_MACADDR + 6, get_unaligned_be16(addr + 4));
nn               2732 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_vec_clear_ring_data(struct nfp_net *nn, unsigned int idx)
nn               2734 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_RXR_ADDR(idx), 0);
nn               2735 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_RXR_SZ(idx), 0);
nn               2736 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_RXR_VEC(idx), 0);
nn               2738 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_TXR_ADDR(idx), 0);
nn               2739 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_TXR_SZ(idx), 0);
nn               2740 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_TXR_VEC(idx), 0);
nn               2749 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_clear_config_and_disable(struct nfp_net *nn)
nn               2755 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	new_ctrl = nn->dp.ctrl;
nn               2761 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_RINGCFG)
nn               2764 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_TXRS_ENABLE, 0);
nn               2765 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_RXRS_ENABLE, 0);
nn               2767 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_CTRL, new_ctrl);
nn               2768 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_reconfig(nn, update);
nn               2770 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_err(nn, "Could not disable device: %d\n", err);
nn               2772 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_rx_rings; r++)
nn               2773 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_rx_ring_reset(&nn->dp.rx_rings[r]);
nn               2774 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_tx_rings; r++)
nn               2775 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_tx_ring_reset(&nn->dp, &nn->dp.tx_rings[r]);
nn               2776 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_r_vecs; r++)
nn               2777 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_vec_clear_ring_data(nn, r);
nn               2779 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.ctrl = new_ctrl;
nn               2783 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_net_rx_ring_hw_cfg_write(struct nfp_net *nn,
nn               2787 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_RXR_ADDR(idx), rx_ring->dma);
nn               2788 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_RXR_SZ(idx), ilog2(rx_ring->cnt));
nn               2789 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_RXR_VEC(idx), rx_ring->r_vec->irq_entry);
nn               2793 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_net_tx_ring_hw_cfg_write(struct nfp_net *nn,
nn               2796 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_TXR_ADDR(idx), tx_ring->dma);
nn               2797 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_TXR_SZ(idx), ilog2(tx_ring->cnt));
nn               2798 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeb(nn, NFP_NET_CFG_TXR_VEC(idx), tx_ring->r_vec->irq_entry);
nn               2805 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_set_config_and_enable(struct nfp_net *nn)
nn               2811 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	new_ctrl = nn->dp.ctrl;
nn               2813 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.ctrl & NFP_NET_CFG_CTRL_RSS_ANY) {
nn               2814 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_rss_write_key(nn);
nn               2815 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_rss_write_itbl(nn);
nn               2816 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_writel(nn, NFP_NET_CFG_RSS_CTRL, nn->rss_cfg);
nn               2820 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.ctrl & NFP_NET_CFG_CTRL_IRQMOD) {
nn               2821 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_coalesce_write_cfg(nn);
nn               2825 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_tx_rings; r++)
nn               2826 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_tx_ring_hw_cfg_write(nn, &nn->dp.tx_rings[r], r);
nn               2827 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_rx_rings; r++)
nn               2828 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_rx_ring_hw_cfg_write(nn, &nn->dp.rx_rings[r], r);
nn               2830 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_TXRS_ENABLE, nn->dp.num_tx_rings == 64 ?
nn               2831 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		  0xffffffffffffffffULL : ((u64)1 << nn->dp.num_tx_rings) - 1);
nn               2833 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_RXRS_ENABLE, nn->dp.num_rx_rings == 64 ?
nn               2834 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		  0xffffffffffffffffULL : ((u64)1 << nn->dp.num_rx_rings) - 1);
nn               2836 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.netdev)
nn               2837 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_write_mac_addr(nn, nn->dp.netdev->dev_addr);
nn               2839 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_MTU, nn->dp.mtu);
nn               2841 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	bufsz = nn->dp.fl_bufsz - nn->dp.rx_dma_off - NFP_NET_RX_BUF_NON_DATA;
nn               2842 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_FLBUFSZ, bufsz);
nn               2849 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_RINGCFG)
nn               2852 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_CTRL, new_ctrl);
nn               2853 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_reconfig(nn, update);
nn               2855 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_clear_config_and_disable(nn);
nn               2859 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.ctrl = new_ctrl;
nn               2861 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_rx_rings; r++)
nn               2862 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_rx_ring_fill_freelist(&nn->dp, &nn->dp.rx_rings[r]);
nn               2867 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.ctrl & NFP_NET_CFG_CTRL_VXLAN) {
nn               2868 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		memset(&nn->vxlan_ports, 0, sizeof(nn->vxlan_ports));
nn               2869 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		memset(&nn->vxlan_usecnt, 0, sizeof(nn->vxlan_usecnt));
nn               2870 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		udp_tunnel_get_rx_info(nn->dp.netdev);
nn               2880 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_close_stack(struct nfp_net *nn)
nn               2884 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	disable_irq(nn->irq_entries[NFP_NET_IRQ_LSC_IDX].vector);
nn               2885 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	netif_carrier_off(nn->dp.netdev);
nn               2886 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->link_up = false;
nn               2888 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_r_vecs; r++) {
nn               2889 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		disable_irq(nn->r_vecs[r].irq_vector);
nn               2890 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		napi_disable(&nn->r_vecs[r].napi);
nn               2893 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	netif_tx_disable(nn->dp.netdev);
nn               2900 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_close_free_all(struct nfp_net *nn)
nn               2904 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_tx_rings_free(&nn->dp);
nn               2905 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_rx_rings_free(&nn->dp);
nn               2907 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_r_vecs; r++)
nn               2908 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_cleanup_vector(nn, &nn->r_vecs[r]);
nn               2910 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_aux_irq_free(nn, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX);
nn               2911 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_aux_irq_free(nn, NFP_NET_CFG_EXN, NFP_NET_IRQ_EXN_IDX);
nn               2920 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               2924 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_close_stack(nn);
nn               2928 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_clear_config_and_disable(nn);
nn               2933 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_close_free_all(nn);
nn               2935 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_dbg(nn, "%s down", netdev->name);
nn               2939 drivers/net/ethernet/netronome/nfp/nfp_net_common.c void nfp_ctrl_close(struct nfp_net *nn)
nn               2945 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_r_vecs; r++) {
nn               2946 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		disable_irq(nn->r_vecs[r].irq_vector);
nn               2947 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		tasklet_disable(&nn->r_vecs[r].tasklet);
nn               2950 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_clear_config_and_disable(nn);
nn               2952 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_close_free_all(nn);
nn               2961 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_open_stack(struct nfp_net *nn)
nn               2965 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_r_vecs; r++) {
nn               2966 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		napi_enable(&nn->r_vecs[r].napi);
nn               2967 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		enable_irq(nn->r_vecs[r].irq_vector);
nn               2970 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	netif_tx_wake_all_queues(nn->dp.netdev);
nn               2972 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	enable_irq(nn->irq_entries[NFP_NET_IRQ_LSC_IDX].vector);
nn               2973 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_read_link_status(nn);
nn               2976 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_open_alloc_all(struct nfp_net *nn)
nn               2980 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_aux_irq_request(nn, NFP_NET_CFG_EXN, "%s-exn",
nn               2981 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 				      nn->exn_name, sizeof(nn->exn_name),
nn               2982 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 				      NFP_NET_IRQ_EXN_IDX, nn->exn_handler);
nn               2985 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_aux_irq_request(nn, NFP_NET_CFG_LSC, "%s-lsc",
nn               2986 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 				      nn->lsc_name, sizeof(nn->lsc_name),
nn               2987 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 				      NFP_NET_IRQ_LSC_IDX, nn->lsc_handler);
nn               2990 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	disable_irq(nn->irq_entries[NFP_NET_IRQ_LSC_IDX].vector);
nn               2992 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_r_vecs; r++) {
nn               2993 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		err = nfp_net_prepare_vector(nn, &nn->r_vecs[r], r);
nn               2998 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_rx_rings_prepare(nn, &nn->dp);
nn               3002 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_tx_rings_prepare(nn, &nn->dp);
nn               3006 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->max_r_vecs; r++)
nn               3007 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_vector_assign_rings(&nn->dp, &nn->r_vecs[r], r);
nn               3012 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_rx_rings_free(&nn->dp);
nn               3014 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	r = nn->dp.num_r_vecs;
nn               3017 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_cleanup_vector(nn, &nn->r_vecs[r]);
nn               3018 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_aux_irq_free(nn, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX);
nn               3020 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_aux_irq_free(nn, NFP_NET_CFG_EXN, NFP_NET_IRQ_EXN_IDX);
nn               3026 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3034 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_open_alloc_all(nn);
nn               3038 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = netif_set_real_num_tx_queues(netdev, nn->dp.num_stack_tx_rings);
nn               3042 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = netif_set_real_num_rx_queues(netdev, nn->dp.num_rx_rings);
nn               3058 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_set_config_and_enable(nn);
nn               3068 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_open_stack(nn);
nn               3075 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_close_free_all(nn);
nn               3079 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int nfp_ctrl_open(struct nfp_net *nn)
nn               3086 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_open_alloc_all(nn);
nn               3090 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_set_config_and_enable(nn);
nn               3094 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->dp.num_r_vecs; r++)
nn               3095 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		enable_irq(nn->r_vecs[r].irq_vector);
nn               3102 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_close_free_all(nn);
nn               3110 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3113 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	new_ctrl = nn->dp.ctrl;
nn               3116 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		new_ctrl |= nn->cap & NFP_NET_CFG_CTRL_L2MC;
nn               3121 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (nn->cap & NFP_NET_CFG_CTRL_PROMISC)
nn               3124 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			nn_warn(nn, "FW does not support promiscuous mode\n");
nn               3129 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (new_ctrl == nn->dp.ctrl)
nn               3132 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_CTRL, new_ctrl);
nn               3133 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_post(nn, NFP_NET_CFG_UPDATE_GEN);
nn               3135 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.ctrl = new_ctrl;
nn               3138 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_rss_init_itbl(struct nfp_net *nn)
nn               3142 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (i = 0; i < sizeof(nn->rss_itbl); i++)
nn               3143 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->rss_itbl[i] =
nn               3144 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			ethtool_rxfh_indir_default(i, nn->dp.num_rx_rings);
nn               3147 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_dp_swap(struct nfp_net *nn, struct nfp_net_dp *dp)
nn               3151 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	*dp = nn->dp;
nn               3152 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp = new_dp;
nn               3154 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.netdev->mtu = new_dp.mtu;
nn               3156 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!netif_is_rxfh_configured(nn->dp.netdev))
nn               3157 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_rss_init_itbl(nn);
nn               3160 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_dp_swap_enable(struct nfp_net *nn, struct nfp_net_dp *dp)
nn               3165 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_dp_swap(nn, dp);
nn               3167 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r <	nn->max_r_vecs; r++)
nn               3168 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_vector_assign_rings(&nn->dp, &nn->r_vecs[r], r);
nn               3170 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = netif_set_real_num_rx_queues(nn->dp.netdev, nn->dp.num_rx_rings);
nn               3174 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.netdev->real_num_tx_queues != nn->dp.num_stack_tx_rings) {
nn               3175 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		err = netif_set_real_num_tx_queues(nn->dp.netdev,
nn               3176 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 						   nn->dp.num_stack_tx_rings);
nn               3181 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return nfp_net_set_config_and_enable(nn);
nn               3184 drivers/net/ethernet/netronome/nfp/nfp_net_common.c struct nfp_net_dp *nfp_net_clone_dp(struct nfp_net *nn)
nn               3192 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	*new = nn->dp;
nn               3205 drivers/net/ethernet/netronome/nfp/nfp_net_common.c nfp_net_check_config(struct nfp_net *nn, struct nfp_net_dp *dp,
nn               3215 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (dp->num_tx_rings > nn->max_tx_rings) {
nn               3223 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int nfp_net_ring_reconfig(struct nfp_net *nn, struct nfp_net_dp *dp,
nn               3236 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_check_config(nn, dp, extack);
nn               3241 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_dp_swap(nn, dp);
nn               3247 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = nn->dp.num_r_vecs; r < dp->num_r_vecs; r++) {
nn               3248 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		err = nfp_net_prepare_vector(nn, &nn->r_vecs[r], r);
nn               3255 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_rx_rings_prepare(nn, dp);
nn               3259 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_tx_rings_prepare(nn, dp);
nn               3264 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_close_stack(nn);
nn               3265 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_clear_config_and_disable(nn);
nn               3267 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_dp_swap_enable(nn, dp);
nn               3271 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_clear_config_and_disable(nn);
nn               3274 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		err2 = nfp_net_dp_swap_enable(nn, dp);
nn               3276 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			nn_err(nn, "Can't restore ring config - FW communication failed (%d,%d)\n",
nn               3279 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = dp->num_r_vecs - 1; r >= nn->dp.num_r_vecs; r--)
nn               3280 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_cleanup_vector(nn, &nn->r_vecs[r]);
nn               3285 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_open_stack(nn);
nn               3294 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = dp->num_r_vecs - 1; r >= nn->dp.num_r_vecs; r--)
nn               3295 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_cleanup_vector(nn, &nn->r_vecs[r]);
nn               3302 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3306 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_app_check_mtu(nn->app, netdev, new_mtu);
nn               3310 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	dp = nfp_net_clone_dp(nn);
nn               3316 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return nfp_net_ring_reconfig(nn, dp, NULL);
nn               3323 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3332 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_mbox_lock(nn, NFP_NET_CFG_VLAN_FILTER_SZ);
nn               3336 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writew(nn, nn->tlv_caps.mbox_off + NFP_NET_CFG_VLAN_FILTER_VID, vid);
nn               3337 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writew(nn, nn->tlv_caps.mbox_off + NFP_NET_CFG_VLAN_FILTER_PROTO,
nn               3340 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return nfp_net_mbox_reconfig_and_unlock(nn, cmd);
nn               3347 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3356 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_mbox_lock(nn, NFP_NET_CFG_VLAN_FILTER_SZ);
nn               3360 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writew(nn, nn->tlv_caps.mbox_off + NFP_NET_CFG_VLAN_FILTER_VID, vid);
nn               3361 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writew(nn, nn->tlv_caps.mbox_off + NFP_NET_CFG_VLAN_FILTER_PROTO,
nn               3364 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return nfp_net_mbox_reconfig_and_unlock(nn, cmd);
nn               3370 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3374 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	for (r = 0; r < nn->max_r_vecs; r++) {
nn               3375 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		struct nfp_net_r_vector *r_vec = &nn->r_vecs[r];
nn               3401 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	stats->multicast += nn_readq(nn, NFP_NET_CFG_STATS_RX_MC_FRAMES);
nn               3402 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	stats->rx_dropped += nn_readq(nn, NFP_NET_CFG_STATS_RX_DISCARDS);
nn               3403 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	stats->rx_errors += nn_readq(nn, NFP_NET_CFG_STATS_RX_ERRORS);
nn               3405 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	stats->tx_dropped += nn_readq(nn, NFP_NET_CFG_STATS_TX_DISCARDS);
nn               3406 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	stats->tx_errors += nn_readq(nn, NFP_NET_CFG_STATS_TX_ERRORS);
nn               3413 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3419 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	new_ctrl = nn->dp.ctrl;
nn               3423 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			new_ctrl |= nn->cap & NFP_NET_CFG_CTRL_RXCSUM_ANY;
nn               3437 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			new_ctrl |= nn->cap & NFP_NET_CFG_CTRL_LSO2 ?:
nn               3475 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_dbg(nn, "Feature change 0x%llx -> 0x%llx (changed=0x%llx)\n",
nn               3478 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (new_ctrl == nn->dp.ctrl)
nn               3481 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_dbg(nn, "NIC ctrl: 0x%x -> 0x%x\n", nn->dp.ctrl, new_ctrl);
nn               3482 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_CTRL, new_ctrl);
nn               3483 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_GEN);
nn               3487 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.ctrl = new_ctrl;
nn               3544 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3550 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->port)
nn               3553 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.is_vf || nn->vnic_no_name)
nn               3556 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	n = snprintf(name, len, "n%d", nn->id);
nn               3569 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_set_vxlan_port(struct nfp_net *nn, int idx, __be16 port)
nn               3573 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->vxlan_ports[idx] = port;
nn               3575 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!(nn->dp.ctrl & NFP_NET_CFG_CTRL_VXLAN))
nn               3580 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn_writel(nn, NFP_NET_CFG_VXLAN_PORT + i * sizeof(port),
nn               3581 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			  be16_to_cpu(nn->vxlan_ports[i + 1]) << 16 |
nn               3582 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			  be16_to_cpu(nn->vxlan_ports[i]));
nn               3584 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_post(nn, NFP_NET_CFG_UPDATE_VXLAN);
nn               3596 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_find_vxlan_idx(struct nfp_net *nn, __be16 port)
nn               3601 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (nn->vxlan_ports[i] == port)
nn               3603 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (!nn->vxlan_usecnt[i])
nn               3613 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3619 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	idx = nfp_net_find_vxlan_idx(nn, ti->port);
nn               3623 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!nn->vxlan_usecnt[idx]++)
nn               3624 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_set_vxlan_port(nn, idx, ti->port);
nn               3630 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3636 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	idx = nfp_net_find_vxlan_idx(nn, ti->port);
nn               3637 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (idx == -ENOSPC || !nn->vxlan_usecnt[idx])
nn               3640 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!--nn->vxlan_usecnt[idx])
nn               3641 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_set_vxlan_port(nn, idx, 0);
nn               3644 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_xdp_setup_drv(struct nfp_net *nn, struct netdev_bpf *bpf)
nn               3650 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!xdp_attachment_flags_ok(&nn->xdp, bpf))
nn               3653 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!prog == !nn->dp.xdp_prog) {
nn               3654 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		WRITE_ONCE(nn->dp.xdp_prog, prog);
nn               3655 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		xdp_attachment_setup(&nn->xdp, bpf);
nn               3659 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	dp = nfp_net_clone_dp(nn);
nn               3664 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	dp->num_tx_rings += prog ? nn->dp.num_rx_rings : -nn->dp.num_rx_rings;
nn               3666 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	dp->rx_dma_off = prog ? XDP_PACKET_HEADROOM - nn->dp.rx_offset : 0;
nn               3669 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_ring_reconfig(nn, dp, bpf->extack);
nn               3673 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	xdp_attachment_setup(&nn->xdp, bpf);
nn               3677 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_xdp_setup_hw(struct nfp_net *nn, struct netdev_bpf *bpf)
nn               3681 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!xdp_attachment_flags_ok(&nn->xdp_hw, bpf))
nn               3684 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_app_xdp_offload(nn->app, nn, bpf->prog, bpf->extack);
nn               3688 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	xdp_attachment_setup(&nn->xdp_hw, bpf);
nn               3694 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3698 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		return nfp_net_xdp_setup_drv(nn, xdp);
nn               3700 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		return nfp_net_xdp_setup_hw(nn, xdp);
nn               3702 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		return xdp_attachment_query(&nn->xdp, xdp);
nn               3704 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		return xdp_attachment_query(&nn->xdp_hw, xdp);
nn               3706 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		return nfp_app_bpf(nn->app, nn, xdp);
nn               3712 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               3720 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_write_mac_addr(nn, saddr->sa_data);
nn               3722 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_MACADDR);
nn               3764 drivers/net/ethernet/netronome/nfp/nfp_net_common.c void nfp_net_info(struct nfp_net *nn)
nn               3766 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_info(nn, "Netronome NFP-6xxx %sNetdev: TxQs=%d/%d RxQs=%d/%d\n",
nn               3767 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.is_vf ? "VF " : "",
nn               3768 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.num_tx_rings, nn->max_tx_rings,
nn               3769 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.num_rx_rings, nn->max_rx_rings);
nn               3770 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_info(nn, "VER: %d.%d.%d.%d, Maximum supported MTU: %d\n",
nn               3771 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->fw_ver.resv, nn->fw_ver.class,
nn               3772 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->fw_ver.major, nn->fw_ver.minor,
nn               3773 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->max_mtu);
nn               3774 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_info(nn, "CAP: %#x %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
nn               3775 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap,
nn               3776 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_PROMISC  ? "PROMISC "  : "",
nn               3777 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_L2BC     ? "L2BCFILT " : "",
nn               3778 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_L2MC     ? "L2MCFILT " : "",
nn               3779 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_RXCSUM   ? "RXCSUM "   : "",
nn               3780 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_TXCSUM   ? "TXCSUM "   : "",
nn               3781 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_RXVLAN   ? "RXVLAN "   : "",
nn               3782 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_TXVLAN   ? "TXVLAN "   : "",
nn               3783 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_SCATTER  ? "SCATTER "  : "",
nn               3784 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_GATHER   ? "GATHER "   : "",
nn               3785 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_LSO      ? "TSO1 "     : "",
nn               3786 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_LSO2     ? "TSO2 "     : "",
nn               3787 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_RSS      ? "RSS1 "     : "",
nn               3788 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_RSS2     ? "RSS2 "     : "",
nn               3789 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_CTAG_FILTER ? "CTAG_FILTER " : "",
nn               3790 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_MSIXAUTO ? "AUTOMASK " : "",
nn               3791 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_IRQMOD   ? "IRQMOD "   : "",
nn               3792 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_VXLAN    ? "VXLAN "    : "",
nn               3793 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_NVGRE    ? "NVGRE "	  : "",
nn               3794 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_CSUM_COMPLETE ?
nn               3796 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap & NFP_NET_CFG_CTRL_LIVE_ADDR ? "LIVE_ADDR " : "",
nn               3797 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_app_extra_cap(nn->app, nn));
nn               3818 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct nfp_net *nn;
nn               3830 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn = netdev_priv(netdev);
nn               3831 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.netdev = netdev;
nn               3833 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn = vzalloc(sizeof(*nn));
nn               3834 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (!nn)
nn               3838 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.dev = &pdev->dev;
nn               3839 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.ctrl_bar = ctrl_bar;
nn               3840 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->pdev = pdev;
nn               3842 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->max_tx_rings = max_tx_rings;
nn               3843 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->max_rx_rings = max_rx_rings;
nn               3845 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.num_tx_rings = min_t(unsigned int,
nn               3847 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.num_rx_rings = min_t(unsigned int, max_rx_rings,
nn               3850 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.num_r_vecs = max(nn->dp.num_tx_rings, nn->dp.num_rx_rings);
nn               3851 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.num_r_vecs = min_t(unsigned int,
nn               3852 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 				  nn->dp.num_r_vecs, num_online_cpus());
nn               3854 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.txd_cnt = NFP_NET_TX_DESCS_DEFAULT;
nn               3855 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.rxd_cnt = NFP_NET_RX_DESCS_DEFAULT;
nn               3857 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	sema_init(&nn->bar_lock, 1);
nn               3859 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_lock_init(&nn->reconfig_lock);
nn               3860 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	spin_lock_init(&nn->link_status_lock);
nn               3862 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	timer_setup(&nn->reconfig_timer, nfp_net_reconfig_timer, 0);
nn               3864 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_tlv_caps_parse(&nn->pdev->dev, nn->dp.ctrl_bar,
nn               3865 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 				     &nn->tlv_caps);
nn               3869 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_ccm_mbox_alloc(nn);
nn               3873 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return nn;
nn               3876 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.netdev)
nn               3877 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		free_netdev(nn->dp.netdev);
nn               3879 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		vfree(nn);
nn               3887 drivers/net/ethernet/netronome/nfp/nfp_net_common.c void nfp_net_free(struct nfp_net *nn)
nn               3889 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	WARN_ON(timer_pending(&nn->reconfig_timer) || nn->reconfig_posted);
nn               3890 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_ccm_mbox_free(nn);
nn               3892 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.netdev)
nn               3893 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		free_netdev(nn->dp.netdev);
nn               3895 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		vfree(nn);
nn               3904 drivers/net/ethernet/netronome/nfp/nfp_net_common.c unsigned int nfp_net_rss_key_sz(struct nfp_net *nn)
nn               3906 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	switch (nn->rss_hfunc) {
nn               3915 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_warn(nn, "Unknown hash function: %u\n", nn->rss_hfunc);
nn               3923 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_rss_init(struct nfp_net *nn)
nn               3929 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	reg = nn_readl(nn, NFP_NET_CFG_RSS_CAP);
nn               3937 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		dev_warn(nn->dp.dev,
nn               3941 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->rss_hfunc = 1 << func_bit;
nn               3943 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	netdev_rss_key_fill(nn->rss_key, nfp_net_rss_key_sz(nn));
nn               3945 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_rss_init_itbl(nn);
nn               3948 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->rss_cfg = NFP_NET_CFG_RSS_IPV4_TCP |
nn               3950 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		      FIELD_PREP(NFP_NET_CFG_RSS_HFUNC, nn->rss_hfunc) |
nn               3958 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_irqmod_init(struct nfp_net *nn)
nn               3960 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->rx_coalesce_usecs      = 50;
nn               3961 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->rx_coalesce_max_frames = 64;
nn               3962 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->tx_coalesce_usecs      = 50;
nn               3963 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->tx_coalesce_max_frames = 64;
nn               3966 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static void nfp_net_netdev_init(struct nfp_net *nn)
nn               3968 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	struct net_device *netdev = nn->dp.netdev;
nn               3970 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_write_mac_addr(nn, nn->dp.netdev->dev_addr);
nn               3972 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	netdev->mtu = nn->dp.mtu;
nn               3980 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_LIVE_ADDR)
nn               3984 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_RXCSUM_ANY) {
nn               3986 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= nn->cap & NFP_NET_CFG_CTRL_RXCSUM_ANY;
nn               3988 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_TXCSUM) {
nn               3990 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= NFP_NET_CFG_CTRL_TXCSUM;
nn               3992 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_GATHER) {
nn               3994 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= NFP_NET_CFG_CTRL_GATHER;
nn               3996 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if ((nn->cap & NFP_NET_CFG_CTRL_LSO && nn->fw_ver.major > 2) ||
nn               3997 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	    nn->cap & NFP_NET_CFG_CTRL_LSO2) {
nn               3999 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= nn->cap & NFP_NET_CFG_CTRL_LSO2 ?:
nn               4002 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_RSS_ANY)
nn               4004 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_VXLAN) {
nn               4005 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (nn->cap & NFP_NET_CFG_CTRL_LSO)
nn               4007 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= NFP_NET_CFG_CTRL_VXLAN;
nn               4009 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_NVGRE) {
nn               4010 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (nn->cap & NFP_NET_CFG_CTRL_LSO)
nn               4012 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= NFP_NET_CFG_CTRL_NVGRE;
nn               4014 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & (NFP_NET_CFG_CTRL_VXLAN | NFP_NET_CFG_CTRL_NVGRE))
nn               4019 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_RXVLAN) {
nn               4021 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= NFP_NET_CFG_CTRL_RXVLAN;
nn               4023 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_TXVLAN) {
nn               4024 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		if (nn->cap & NFP_NET_CFG_CTRL_LSO2) {
nn               4025 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			nn_warn(nn, "Device advertises both TSO2 and TXVLAN. Refusing to enable TXVLAN.\n");
nn               4028 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			nn->dp.ctrl |= NFP_NET_CFG_CTRL_TXVLAN;
nn               4031 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_CTAG_FILTER) {
nn               4033 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= NFP_NET_CFG_CTRL_CTAG_FILTER;
nn               4038 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nfp_app_has_tc(nn->app) && nn->port)
nn               4043 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.ctrl &= ~NFP_NET_CFG_CTRL_LSO_ANY;
nn               4051 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	netdev->max_mtu = nn->max_mtu;
nn               4060 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_read_caps(struct nfp_net *nn)
nn               4063 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->cap = nn_readl(nn, NFP_NET_CFG_CAP);
nn               4064 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->max_mtu = nn_readl(nn, NFP_NET_CFG_MAX_MTU);
nn               4070 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.chained_metadata_format = nn->fw_ver.major == 4 ||
nn               4071 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 					 !nn->dp.netdev ||
nn               4072 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 					 !(nn->cap & NFP_NET_CFG_CTRL_RSS) ||
nn               4073 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 					 nn->cap & NFP_NET_CFG_CTRL_CHAIN_META;
nn               4077 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.chained_metadata_format && nn->fw_ver.major != 4)
nn               4078 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap &= ~NFP_NET_CFG_CTRL_RSS;
nn               4081 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->fw_ver.major >= 2) {
nn               4084 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		reg = nn_readl(nn, NFP_NET_CFG_RX_OFFSET);
nn               4086 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 			nn_err(nn, "Invalid rx offset: %d\n", reg);
nn               4089 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.rx_offset = reg;
nn               4091 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.rx_offset = NFP_NET_RX_OFFSET;
nn               4095 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!nn->dp.netdev)
nn               4096 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->cap &= nn->app->type->ctrl_cap_mask;
nn               4107 drivers/net/ethernet/netronome/nfp/nfp_net_common.c int nfp_net_init(struct nfp_net *nn)
nn               4111 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.rx_dma_dir = DMA_FROM_DEVICE;
nn               4113 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_read_caps(nn);
nn               4118 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!nfp_net_is_data_vnic(nn) && nn->app->ctrl_mtu) {
nn               4119 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.mtu = min(nn->app->ctrl_mtu, nn->max_mtu);
nn               4120 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	} else if (nn->max_mtu < NFP_NET_DEFAULT_MTU) {
nn               4121 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.mtu = nn->max_mtu;
nn               4123 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.mtu = NFP_NET_DEFAULT_MTU;
nn               4125 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->dp.fl_bufsz = nfp_net_calc_fl_bufsz(&nn->dp);
nn               4127 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nfp_app_ctrl_uses_data_vnics(nn->app))
nn               4128 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= nn->cap & NFP_NET_CFG_CTRL_CMSG_DATA;
nn               4130 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_RSS_ANY) {
nn               4131 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_rss_init(nn);
nn               4132 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= nn->cap & NFP_NET_CFG_CTRL_RSS2 ?:
nn               4137 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_L2BC)
nn               4138 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= NFP_NET_CFG_CTRL_L2BC;
nn               4141 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->cap & NFP_NET_CFG_CTRL_IRQMOD) {
nn               4142 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_irqmod_init(nn);
nn               4143 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nn->dp.ctrl |= NFP_NET_CFG_CTRL_IRQMOD;
nn               4147 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn->qcp_cfg = nn->tx_bar + NFP_QCP_QUEUE_ADDR_SZ;
nn               4150 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writel(nn, NFP_NET_CFG_CTRL, 0);
nn               4151 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_TXRS_ENABLE, 0);
nn               4152 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nn_writeq(nn, NFP_NET_CFG_RXRS_ENABLE, 0);
nn               4153 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	err = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_RING |
nn               4158 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (nn->dp.netdev) {
nn               4159 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		nfp_net_netdev_init(nn);
nn               4161 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		err = nfp_ccm_mbox_init(nn);
nn               4165 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 		err = nfp_net_tls_init(nn);
nn               4170 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_vecs_init(nn);
nn               4172 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!nn->dp.netdev)
nn               4174 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	return register_netdev(nn->dp.netdev);
nn               4177 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_ccm_mbox_clean(nn);
nn               4185 drivers/net/ethernet/netronome/nfp/nfp_net_common.c void nfp_net_clean(struct nfp_net *nn)
nn               4187 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	if (!nn->dp.netdev)
nn               4190 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	unregister_netdev(nn->dp.netdev);
nn               4191 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_ccm_mbox_clean(nn);
nn               4192 drivers/net/ethernet/netronome/nfp/nfp_net_common.c 	nfp_net_reconfig_wait_posted(nn);
nn                 17 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	struct nfp_net *nn;
nn                 25 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	nn = r_vec->nfp_net;
nn                 27 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	if (!nfp_net_running(nn))
nn                 79 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	struct nfp_net *nn;
nn                 90 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	nn = r_vec->nfp_net;
nn                 91 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	if (!nfp_net_running(nn))
nn                148 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c void nfp_net_debugfs_vnic_add(struct nfp_net *nn, struct dentry *ddir)
nn                157 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	if (nfp_net_is_data_vnic(nn))
nn                158 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 		sprintf(name, "vnic%d", nn->id);
nn                161 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	nn->debugfs_dir = debugfs_create_dir(name, ddir);
nn                164 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	queues = debugfs_create_dir("queue", nn->debugfs_dir);
nn                170 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	for (i = 0; i < min(nn->max_rx_rings, nn->max_r_vecs); i++) {
nn                173 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 				    &nn->r_vecs[i], &nfp_rx_q_fops);
nn                175 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 				    &nn->r_vecs[i], &nfp_xdp_q_fops);
nn                178 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 	for (i = 0; i < min(nn->max_tx_rings, nn->max_r_vecs); i++) {
nn                181 drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c 				    &nn->r_vecs[i], &nfp_tx_q_fops);
nn                196 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                199 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		 nn->fw_ver.resv, nn->fw_ver.class,
nn                200 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		 nn->fw_ver.major, nn->fw_ver.minor);
nn                201 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	strlcpy(drvinfo->bus_info, pci_name(nn->pdev),
nn                204 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nfp_get_drvinfo(nn->app, nn->pdev, vnic_version, drvinfo);
nn                264 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn;
nn                294 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nn = netdev_priv(netdev);
nn                296 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	sts = nn_readl(nn, NFP_NET_CFG_STS);
nn                363 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                367 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	ring->rx_pending = nn->dp.rxd_cnt;
nn                368 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	ring->tx_pending = nn->dp.txd_cnt;
nn                371 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c static int nfp_net_set_ring_size(struct nfp_net *nn, u32 rxd_cnt, u32 txd_cnt)
nn                375 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	dp = nfp_net_clone_dp(nn);
nn                382 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return nfp_net_ring_reconfig(nn, dp, NULL);
nn                388 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                403 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (nn->dp.rxd_cnt == rxd_cnt && nn->dp.txd_cnt == txd_cnt)
nn                406 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nn_dbg(nn, "Change ring size: RxQ %u->%u, TxQ %u->%u\n",
nn                407 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	       nn->dp.rxd_cnt, rxd_cnt, nn->dp.txd_cnt, txd_cnt);
nn                409 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return nfp_net_set_ring_size(nn, rxd_cnt, txd_cnt);
nn                425 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                427 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return NN_RVEC_GATHER_STATS + nn->max_r_vecs * NN_RVEC_PER_Q_STATS +
nn                433 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                436 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	for (i = 0; i < nn->max_r_vecs; i++) {
nn                464 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                468 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	for (i = 0; i < nn->max_r_vecs; i++) {
nn                472 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			start = u64_stats_fetch_begin(&nn->r_vecs[i].rx_sync);
nn                473 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			data[0] = nn->r_vecs[i].rx_pkts;
nn                474 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[0] = nn->r_vecs[i].hw_csum_rx_ok;
nn                475 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[1] = nn->r_vecs[i].hw_csum_rx_inner_ok;
nn                476 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[2] = nn->r_vecs[i].hw_csum_rx_complete;
nn                477 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[3] = nn->r_vecs[i].hw_csum_rx_error;
nn                478 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[4] = nn->r_vecs[i].rx_replace_buf_alloc_fail;
nn                479 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[5] = nn->r_vecs[i].hw_tls_rx;
nn                480 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		} while (u64_stats_fetch_retry(&nn->r_vecs[i].rx_sync, start));
nn                483 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			start = u64_stats_fetch_begin(&nn->r_vecs[i].tx_sync);
nn                484 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			data[1] = nn->r_vecs[i].tx_pkts;
nn                485 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			data[2] = nn->r_vecs[i].tx_busy;
nn                486 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[6] = nn->r_vecs[i].hw_csum_tx;
nn                487 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[7] = nn->r_vecs[i].hw_csum_tx_inner;
nn                488 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[8] = nn->r_vecs[i].tx_gather;
nn                489 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[9] = nn->r_vecs[i].tx_lso;
nn                490 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[10] = nn->r_vecs[i].hw_tls_tx;
nn                491 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[11] = nn->r_vecs[i].tls_tx_fallback;
nn                492 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			tmp[12] = nn->r_vecs[i].tls_tx_no_fallback;
nn                493 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		} while (u64_stats_fetch_retry(&nn->r_vecs[i].tx_sync, start));
nn                504 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	*data++ = atomic_read(&nn->ktls_no_space);
nn                607 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                612 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		data = nfp_vnic_get_hw_stats_strings(data, nn->max_r_vecs,
nn                615 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		data = nfp_app_port_get_stats_strings(nn->port, data);
nn                624 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                627 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	data = nfp_vnic_get_hw_stats(data, nn->dp.ctrl_bar, nn->max_r_vecs);
nn                629 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	data = nfp_app_port_get_stats(nn->port, data);
nn                634 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                639 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		       nfp_vnic_get_hw_stats_count(nn->max_r_vecs) +
nn                641 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		       nfp_app_port_get_stats_count(nn->port);
nn                798 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c static int nfp_net_get_rss_hash_opts(struct nfp_net *nn,
nn                805 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY))
nn                813 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (nn->rss_cfg & nfp_rss_flag)
nn                822 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                826 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		cmd->data = nn->dp.num_rx_rings;
nn                829 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		return nfp_net_get_rss_hash_opts(nn, cmd);
nn                835 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c static int nfp_net_set_rss_hash_opt(struct nfp_net *nn,
nn                838 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	u32 new_rss_cfg = nn->rss_cfg;
nn                842 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY))
nn                870 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	new_rss_cfg |= FIELD_PREP(NFP_NET_CFG_RSS_HFUNC, nn->rss_hfunc);
nn                873 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (new_rss_cfg == nn->rss_cfg)
nn                876 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	writel(new_rss_cfg, nn->dp.ctrl_bar + NFP_NET_CFG_RSS_CTRL);
nn                877 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	err = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_RSS);
nn                881 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nn->rss_cfg = new_rss_cfg;
nn                883 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nn_dbg(nn, "Changed RSS config to 0x%x\n", nn->rss_cfg);
nn                890 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                894 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		return nfp_net_set_rss_hash_opt(nn, cmd);
nn                902 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                904 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY))
nn                907 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return ARRAY_SIZE(nn->rss_itbl);
nn                912 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                914 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY))
nn                917 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return nfp_net_rss_key_sz(nn);
nn                923 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                926 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY))
nn                930 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		for (i = 0; i < ARRAY_SIZE(nn->rss_itbl); i++)
nn                931 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			indir[i] = nn->rss_itbl[i];
nn                933 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		memcpy(key, nn->rss_key, nfp_net_rss_key_sz(nn));
nn                935 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		*hfunc = nn->rss_hfunc;
nn                947 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                950 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY) ||
nn                951 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	    !(hfunc == ETH_RSS_HASH_NO_CHANGE || hfunc == nn->rss_hfunc))
nn                958 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		memcpy(nn->rss_key, key, nfp_net_rss_key_sz(nn));
nn                959 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		nfp_net_rss_write_key(nn);
nn                962 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		for (i = 0; i < ARRAY_SIZE(nn->rss_itbl); i++)
nn                963 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 			nn->rss_itbl[i] = indir[i];
nn                965 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		nfp_net_rss_write_itbl(nn);
nn                968 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_RSS);
nn                981 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                985 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	regs->version = nn_readl(nn, NFP_NET_CFG_VERSION);
nn                988 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		regs_buf[i] = readl(nn->dp.ctrl_bar + (i * sizeof(u32)));
nn                994 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn                996 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (!(nn->cap & NFP_NET_CFG_CTRL_IRQMOD))
nn                999 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	ec->rx_coalesce_usecs       = nn->rx_coalesce_usecs;
nn               1000 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	ec->rx_max_coalesced_frames = nn->rx_coalesce_max_frames;
nn               1001 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	ec->tx_coalesce_usecs       = nn->tx_coalesce_usecs;
nn               1002 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	ec->tx_max_coalesced_frames = nn->tx_coalesce_max_frames;
nn               1243 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               1270 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	factor = nn->me_freq_mhz / 16;
nn               1285 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (!(nn->cap & NFP_NET_CFG_CTRL_IRQMOD))
nn               1308 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nn->rx_coalesce_usecs      = ec->rx_coalesce_usecs;
nn               1309 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nn->rx_coalesce_max_frames = ec->rx_max_coalesced_frames;
nn               1310 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nn->tx_coalesce_usecs      = ec->tx_coalesce_usecs;
nn               1311 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nn->tx_coalesce_max_frames = ec->tx_max_coalesced_frames;
nn               1314 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	nfp_net_coalesce_write_cfg(nn);
nn               1315 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_IRQMOD);
nn               1321 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               1324 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	num_tx_rings = nn->dp.num_tx_rings;
nn               1325 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (nn->dp.xdp_prog)
nn               1326 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 		num_tx_rings -= nn->dp.num_rx_rings;
nn               1328 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	channel->max_rx = min(nn->max_rx_rings, nn->max_r_vecs);
nn               1329 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	channel->max_tx = min(nn->max_tx_rings, nn->max_r_vecs);
nn               1332 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	channel->combined_count = min(nn->dp.num_rx_rings, num_tx_rings);
nn               1333 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	channel->rx_count = nn->dp.num_rx_rings - channel->combined_count;
nn               1338 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c static int nfp_net_set_num_rings(struct nfp_net *nn, unsigned int total_rx,
nn               1343 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	dp = nfp_net_clone_dp(nn);
nn               1353 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return nfp_net_ring_reconfig(nn, dp, NULL);
nn               1359 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	struct nfp_net *nn = netdev_priv(netdev);
nn               1371 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	if (total_rx > min(nn->max_rx_rings, nn->max_r_vecs) ||
nn               1372 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	    total_tx > min(nn->max_tx_rings, nn->max_r_vecs))
nn               1375 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c 	return nfp_net_set_num_rings(nn, total_rx, total_tx);
nn                 85 drivers/net/ethernet/netronome/nfp/nfp_net_main.c static void nfp_net_pf_free_vnic(struct nfp_pf *pf, struct nfp_net *nn)
nn                 87 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nfp_net_is_data_vnic(nn))
nn                 88 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_app_vnic_free(pf->app, nn);
nn                 89 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_port_free(nn->port);
nn                 90 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_del(&nn->vnic_list);
nn                 92 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_net_free(nn);
nn                 97 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	struct nfp_net *nn, *next;
nn                 99 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_for_each_entry_safe(nn, next, &pf->vnics, vnic_list)
nn                100 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		if (nfp_net_is_data_vnic(nn))
nn                101 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 			nfp_net_pf_free_vnic(pf, nn);
nn                110 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	struct nfp_net *nn;
nn                119 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nn = nfp_net_alloc(pf->pdev, ctrl_bar, needs_netdev,
nn                121 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (IS_ERR(nn))
nn                122 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		return nn;
nn                124 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nn->app = pf->app;
nn                125 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_net_get_fw_version(&nn->fw_ver, ctrl_bar);
nn                126 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nn->tx_bar = qc_bar + tx_base * NFP_QCP_QUEUE_ADDR_SZ;
nn                127 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nn->rx_bar = qc_bar + rx_base * NFP_QCP_QUEUE_ADDR_SZ;
nn                128 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nn->dp.is_vf = 0;
nn                129 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nn->stride_rx = stride;
nn                130 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nn->stride_tx = stride;
nn                133 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		err = nfp_app_vnic_alloc(pf->app, nn, id);
nn                135 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 			nfp_net_free(nn);
nn                141 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_add_tail(&nn->vnic_list, &pf->vnics);
nn                143 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	return nn;
nn                147 drivers/net/ethernet/netronome/nfp/nfp_net_main.c nfp_net_pf_init_vnic(struct nfp_pf *pf, struct nfp_net *nn, unsigned int id)
nn                151 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nn->id = id;
nn                153 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nn->port) {
nn                154 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		err = nfp_devlink_port_register(pf->app, nn->port);
nn                159 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	err = nfp_net_init(nn);
nn                163 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_net_debugfs_vnic_add(nn, pf->ddir);
nn                165 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nn->port)
nn                166 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_devlink_port_type_eth_set(nn->port);
nn                168 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_net_info(nn);
nn                170 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nfp_net_is_data_vnic(nn)) {
nn                171 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		err = nfp_app_vnic_init(pf->app, nn);
nn                179 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nn->port)
nn                180 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_devlink_port_type_clear(nn->port);
nn                181 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
nn                182 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_net_clean(nn);
nn                184 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nn->port)
nn                185 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_devlink_port_unregister(nn->port);
nn                193 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	struct nfp_net *nn;
nn                198 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nn = nfp_net_pf_alloc_vnic(pf, true, ctrl_bar, qc_bar,
nn                200 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		if (IS_ERR(nn)) {
nn                201 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 			err = PTR_ERR(nn);
nn                208 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		if (nn->port && nn->port->type == NFP_PORT_INVALID)
nn                209 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 			nfp_net_pf_free_vnic(pf, nn);
nn                222 drivers/net/ethernet/netronome/nfp/nfp_net_main.c static void nfp_net_pf_clean_vnic(struct nfp_pf *pf, struct nfp_net *nn)
nn                224 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nfp_net_is_data_vnic(nn))
nn                225 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_app_vnic_clean(pf->app, nn);
nn                226 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nn->port)
nn                227 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_devlink_port_type_clear(nn->port);
nn                228 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
nn                229 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	nfp_net_clean(nn);
nn                230 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	if (nn->port)
nn                231 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_devlink_port_unregister(nn->port);
nn                237 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	struct nfp_net *nn;
nn                241 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_for_each_entry(nn, &pf->vnics, vnic_list)
nn                242 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		wanted_irqs += NFP_NET_NON_Q_VECTORS + nn->dp.num_r_vecs;
nn                260 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_for_each_entry(nn, &pf->vnics, vnic_list) {
nn                263 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		n = min(NFP_NET_NON_Q_VECTORS + nn->dp.num_r_vecs,
nn                265 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_net_irqs_assign(nn, &pf->irq_entries[num_irqs - irqs_left],
nn                282 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	struct nfp_net *nn;
nn                288 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_for_each_entry(nn, &pf->vnics, vnic_list) {
nn                289 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		if (!nfp_net_is_data_vnic(nn))
nn                291 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		err = nfp_net_pf_init_vnic(pf, nn, id);
nn                301 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_for_each_entry_continue_reverse(nn, &pf->vnics, vnic_list)
nn                302 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		if (nfp_net_is_data_vnic(nn))
nn                303 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 			nfp_net_pf_clean_vnic(pf, nn);
nn                550 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	struct nfp_net *nn, *next;
nn                588 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_for_each_entry_safe(nn, next, &pf->vnics, vnic_list) {
nn                589 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		if (!nn->port || nn->port->type != NFP_PORT_INVALID)
nn                592 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_net_pf_clean_vnic(pf, nn);
nn                593 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_net_pf_free_vnic(pf, nn);
nn                764 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	struct nfp_net *nn, *next;
nn                767 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 	list_for_each_entry_safe(nn, next, &pf->vnics, vnic_list) {
nn                768 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		if (!nfp_net_is_data_vnic(nn))
nn                770 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_net_pf_clean_vnic(pf, nn);
nn                771 drivers/net/ethernet/netronome/nfp/nfp_net_main.c 		nfp_net_pf_free_vnic(pf, nn);
nn                307 drivers/net/ethernet/netronome/nfp/nfp_net_repr.c 	struct nfp_net *nn = netdev_priv(pf_netdev);
nn                308 drivers/net/ethernet/netronome/nfp/nfp_net_repr.c 	u32 repr_cap = nn->tlv_caps.repr_cap;
nn                334 drivers/net/ethernet/netronome/nfp/nfp_net_repr.c 	if ((repr_cap & NFP_NET_CFG_CTRL_LSO && nn->fw_ver.major > 2) ||
nn                 42 drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c 	struct nfp_net *nn;
nn                 49 drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c 	nn = list_first_entry(&app->pf->vnics, struct nfp_net, vnic_list);
nn                 51 drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c 	ret = nfp_net_reconfig(nn, NFP_NET_CFG_UPDATE_VF);
nn                 28 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	struct nfp_net *nn;
nn                 49 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c static void nfp_netvf_get_mac_addr(struct nfp_net *nn)
nn                 53 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	put_unaligned_be32(nn_readl(nn, NFP_NET_CFG_MACADDR + 0), &mac_addr[0]);
nn                 54 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	put_unaligned_be16(nn_readw(nn, NFP_NET_CFG_MACADDR + 6), &mac_addr[4]);
nn                 57 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		eth_hw_addr_random(nn->dp.netdev);
nn                 61 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	ether_addr_copy(nn->dp.netdev->dev_addr, mac_addr);
nn                 62 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	ether_addr_copy(nn->dp.netdev->perm_addr, mac_addr);
nn                 76 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	struct nfp_net *nn;
nn                175 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nn = nfp_net_alloc(pdev, ctrl_bar, true, max_tx_rings, max_rx_rings);
nn                176 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	if (IS_ERR(nn)) {
nn                177 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		err = PTR_ERR(nn);
nn                180 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	vf->nn = nn;
nn                182 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nn->fw_ver = fw_ver;
nn                183 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nn->dp.is_vf = 1;
nn                184 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nn->stride_tx = stride;
nn                185 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nn->stride_rx = stride;
nn                205 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 			nn_err(nn, "Failed to map resource %d\n", tx_bar_no);
nn                211 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		nn->tx_bar = vf->q_bar + (tx_bar_off - bar_off);
nn                213 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		nn->rx_bar = vf->q_bar + (rx_bar_off - bar_off);
nn                219 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		nn->tx_bar = ioremap_nocache(map_addr, tx_bar_sz);
nn                220 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		if (!nn->tx_bar) {
nn                221 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 			nn_err(nn, "Failed to map resource %d\n", tx_bar_no);
nn                228 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		nn->rx_bar = ioremap_nocache(map_addr, rx_bar_sz);
nn                229 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		if (!nn->rx_bar) {
nn                230 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 			nn_err(nn, "Failed to map resource %d\n", rx_bar_no);
nn                236 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nfp_netvf_get_mac_addr(nn);
nn                241 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 				      nn->dp.num_r_vecs);
nn                243 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		nn_warn(nn, "Unable to allocate MSI-X Vectors. Exiting\n");
nn                247 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nfp_net_irqs_assign(nn, vf->irq_entries, num_irqs);
nn                249 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	err = nfp_net_init(nn);
nn                253 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nfp_net_info(nn);
nn                255 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nfp_net_debugfs_vnic_add(nn, vf->ddir);
nn                263 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		iounmap(nn->rx_bar);
nn                266 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		iounmap(nn->tx_bar);
nn                270 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nfp_net_free(nn);
nn                286 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	struct nfp_net *nn;
nn                292 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nn = vf->nn;
nn                297 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nfp_net_debugfs_dir_clean(&nn->debugfs_dir);
nn                300 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nfp_net_clean(nn);
nn                305 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		iounmap(nn->rx_bar);
nn                306 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 		iounmap(nn->tx_bar);
nn                310 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	iounmap(nn->dp.ctrl_bar);
nn                312 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c 	nfp_net_free(nn);
nn                 17 drivers/net/ethernet/netronome/nfp/nfp_port.c 		struct nfp_net *nn = netdev_priv(netdev);
nn                 19 drivers/net/ethernet/netronome/nfp/nfp_port.c 		return nn->port;
nn               1133 drivers/net/ethernet/xircom/xirc2ps_cs.c 	unsigned n, nn;
nn               1136 drivers/net/ethernet/xircom/xirc2ps_cs.c 	nn = GetByte(XIRCREG0_PTR);
nn               1137 drivers/net/ethernet/xircom/xirc2ps_cs.c 	lp->last_ptr_value = nn;
nn               1138 drivers/net/ethernet/xircom/xirc2ps_cs.c 	if (nn < n) /* rollover */
nn               1140 drivers/net/ethernet/xircom/xirc2ps_cs.c 	else if (n == nn) { /* happens sometimes - don't know why */
nn               1562 drivers/net/fddi/skfp/pmf.c 	int	nn ;
nn               1618 drivers/net/fddi/skfp/pmf.c 				nn = (n > 16) ? 16 : n ;
nn               1626 drivers/net/fddi/skfp/pmf.c 					dump_hex(c,nn) ;
nn               1629 drivers/net/fddi/skfp/pmf.c 				n -= nn ;
nn               3646 drivers/nvme/host/core.c static int nvme_scan_ns_list(struct nvme_ctrl *ctrl, unsigned nn)
nn               3651 drivers/nvme/host/core.c 	unsigned num_lists = DIV_ROUND_UP_ULL((u64)nn, 1024);
nn               3663 drivers/nvme/host/core.c 		for (j = 0; j < min(nn, 1024U); j++) {
nn               3678 drivers/nvme/host/core.c 		nn -= j;
nn               3687 drivers/nvme/host/core.c static void nvme_scan_ns_sequential(struct nvme_ctrl *ctrl, unsigned nn)
nn               3691 drivers/nvme/host/core.c 	for (i = 1; i <= nn; i++)
nn               3694 drivers/nvme/host/core.c 	nvme_remove_invalid_namespaces(ctrl, nn);
nn               3727 drivers/nvme/host/core.c 	unsigned nn;
nn               3742 drivers/nvme/host/core.c 	nn = le32_to_cpu(id->nn);
nn               3745 drivers/nvme/host/core.c 		if (!nvme_scan_ns_list(ctrl, nn))
nn               3748 drivers/nvme/host/core.c 	nvme_scan_ns_sequential(ctrl, nn);
nn               3236 drivers/nvme/host/fc.c 	u64	nn;
nn               3286 drivers/nvme/host/fc.c 	if (__nvme_fc_parse_u64(&wwn, &traddr->nn))
nn               3312 drivers/nvme/host/fc.c 	if (ret || !raddr.nn || !raddr.pn)
nn               3316 drivers/nvme/host/fc.c 	if (ret || !laddr.nn || !laddr.pn)
nn               3322 drivers/nvme/host/fc.c 		if (lport->localport.node_name != laddr.nn ||
nn               3327 drivers/nvme/host/fc.c 			if (rport->remoteport.node_name != raddr.nn ||
nn                355 drivers/nvme/target/admin-cmd.c 	id->nn = cpu_to_le32(ctrl->subsys->max_nsid);
nn               2431 drivers/nvme/target/fc.c 	u64	nn;
nn               2481 drivers/nvme/target/fc.c 	if (__nvme_fc_parse_u64(&wwn, &traddr->nn))
nn               2523 drivers/nvme/target/fc.c 		if ((tgtport->fc_target_port.node_name == traddr.nn) &&
nn                 55 drivers/scsi/lpfc/lpfc_nportdisc.c 		 struct lpfc_name *nn, struct lpfc_name *pn)
nn                 64 drivers/scsi/lpfc/lpfc_nportdisc.c 	if (memcmp(nn, &ndlp->nlp_nodename, sizeof (struct lpfc_name)))
nn                250 drivers/video/fbdev/pm2fb.c static void pm2_mnp(u32 clk, unsigned char *mm, unsigned char *nn,
nn                260 drivers/video/fbdev/pm2fb.c 	*mm = *nn = *pp = 0;
nn                270 drivers/video/fbdev/pm2fb.c 						*nn = n;
nn                279 drivers/video/fbdev/pm2fb.c static void pm2v_mnp(u32 clk, unsigned char *mm, unsigned char *nn,
nn                288 drivers/video/fbdev/pm2fb.c 	*mm = *nn = *pp = 0;
nn                296 drivers/video/fbdev/pm2fb.c 					*nn = n;
nn                 21 fs/gfs2/trace_gfs2.h #define dlm_state_name(nn) { DLM_LOCK_##nn, #nn }
nn                 57 fs/nfs/blocklayout/rpc_pipefs.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                 58 fs/nfs/blocklayout/rpc_pipefs.c 	struct bl_dev_msg *reply = &nn->bl_mount_reply;
nn                 68 fs/nfs/blocklayout/rpc_pipefs.c 	mutex_lock(&nn->bl_mutex);
nn                 69 fs/nfs/blocklayout/rpc_pipefs.c 	bl_pipe_msg.bl_wq = &nn->bl_wq;
nn                 87 fs/nfs/blocklayout/rpc_pipefs.c 	add_wait_queue(&nn->bl_wq, &wq);
nn                 88 fs/nfs/blocklayout/rpc_pipefs.c 	rc = rpc_queue_upcall(nn->bl_device_pipe, msg);
nn                 90 fs/nfs/blocklayout/rpc_pipefs.c 		remove_wait_queue(&nn->bl_wq, &wq);
nn                 96 fs/nfs/blocklayout/rpc_pipefs.c 	remove_wait_queue(&nn->bl_wq, &wq);
nn                108 fs/nfs/blocklayout/rpc_pipefs.c 	mutex_unlock(&nn->bl_mutex);
nn                115 fs/nfs/blocklayout/rpc_pipefs.c 	struct nfs_net *nn = net_generic(file_inode(filp)->i_sb->s_fs_info,
nn                121 fs/nfs/blocklayout/rpc_pipefs.c 	if (copy_from_user(&nn->bl_mount_reply, src, mlen) != 0)
nn                124 fs/nfs/blocklayout/rpc_pipefs.c 	wake_up(&nn->bl_wq);
nn                170 fs/nfs/blocklayout/rpc_pipefs.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                177 fs/nfs/blocklayout/rpc_pipefs.c 	if (nn->bl_device_pipe == NULL) {
nn                184 fs/nfs/blocklayout/rpc_pipefs.c 		dentry = nfs4blocklayout_register_sb(sb, nn->bl_device_pipe);
nn                189 fs/nfs/blocklayout/rpc_pipefs.c 		nn->bl_device_pipe->dentry = dentry;
nn                192 fs/nfs/blocklayout/rpc_pipefs.c 		if (nn->bl_device_pipe->dentry)
nn                193 fs/nfs/blocklayout/rpc_pipefs.c 			nfs4blocklayout_unregister_sb(sb, nn->bl_device_pipe);
nn                235 fs/nfs/blocklayout/rpc_pipefs.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                238 fs/nfs/blocklayout/rpc_pipefs.c 	mutex_init(&nn->bl_mutex);
nn                239 fs/nfs/blocklayout/rpc_pipefs.c 	init_waitqueue_head(&nn->bl_wq);
nn                240 fs/nfs/blocklayout/rpc_pipefs.c 	nn->bl_device_pipe = rpc_mkpipe_data(&bl_upcall_ops, 0);
nn                241 fs/nfs/blocklayout/rpc_pipefs.c 	if (IS_ERR(nn->bl_device_pipe))
nn                242 fs/nfs/blocklayout/rpc_pipefs.c 		return PTR_ERR(nn->bl_device_pipe);
nn                243 fs/nfs/blocklayout/rpc_pipefs.c 	dentry = nfs4blocklayout_register_net(net, nn->bl_device_pipe);
nn                245 fs/nfs/blocklayout/rpc_pipefs.c 		rpc_destroy_pipe_data(nn->bl_device_pipe);
nn                248 fs/nfs/blocklayout/rpc_pipefs.c 	nn->bl_device_pipe->dentry = dentry;
nn                254 fs/nfs/blocklayout/rpc_pipefs.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                256 fs/nfs/blocklayout/rpc_pipefs.c 	nfs4blocklayout_unregister_net(net, nn->bl_device_pipe);
nn                257 fs/nfs/blocklayout/rpc_pipefs.c 	rpc_destroy_pipe_data(nn->bl_device_pipe);
nn                258 fs/nfs/blocklayout/rpc_pipefs.c 	nn->bl_device_pipe = NULL;
nn                 46 fs/nfs/callback.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                 53 fs/nfs/callback.c 	nn->nfs_callback_tcpport = ret;
nn                 55 fs/nfs/callback.c 		nn->nfs_callback_tcpport, PF_INET, net->ns.inum);
nn                 61 fs/nfs/callback.c 		nn->nfs_callback_tcpport6 = ret;
nn                 63 fs/nfs/callback.c 			nn->nfs_callback_tcpport6, PF_INET6, net->ns.inum);
nn                186 fs/nfs/callback.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                188 fs/nfs/callback.c 	if (--nn->cb_users[minorversion])
nn                198 fs/nfs/callback.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                201 fs/nfs/callback.c 	if (nn->cb_users[minorversion]++)
nn                229 fs/nfs/callback.c 	nn->cb_users[minorversion]--;
nn                200 fs/nfs/client.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                202 fs/nfs/client.c 	idr_destroy(&nn->cb_ident_idr);
nn                208 fs/nfs/client.c 	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
nn                211 fs/nfs/client.c 		idr_remove(&nn->cb_ident_idr, clp->cl_cb_ident);
nn                258 fs/nfs/client.c 	struct nfs_net *nn;
nn                263 fs/nfs/client.c 	nn = net_generic(clp->cl_net, nfs_net_id);
nn                265 fs/nfs/client.c 	if (refcount_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) {
nn                268 fs/nfs/client.c 		spin_unlock(&nn->nfs_client_lock);
nn                285 fs/nfs/client.c 	struct nfs_net *nn = net_generic(data->net, nfs_net_id);
nn                289 fs/nfs/client.c 	list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) {
nn                298 fs/nfs/client.c 			spin_unlock(&nn->nfs_client_lock);
nn                301 fs/nfs/client.c 			spin_lock(&nn->nfs_client_lock);
nn                397 fs/nfs/client.c 	struct nfs_net *nn = net_generic(cl_init->net, nfs_net_id);
nn                407 fs/nfs/client.c 		spin_lock(&nn->nfs_client_lock);
nn                411 fs/nfs/client.c 			spin_unlock(&nn->nfs_client_lock);
nn                420 fs/nfs/client.c 					&nn->nfs_client_list);
nn                421 fs/nfs/client.c 			spin_unlock(&nn->nfs_client_lock);
nn                426 fs/nfs/client.c 		spin_unlock(&nn->nfs_client_lock);
nn                846 fs/nfs/client.c 	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
nn                848 fs/nfs/client.c 	spin_lock(&nn->nfs_client_lock);
nn                850 fs/nfs/client.c 	list_add_tail(&server->master_link, &nn->nfs_volume_list);
nn                852 fs/nfs/client.c 	spin_unlock(&nn->nfs_client_lock);
nn                860 fs/nfs/client.c 	struct nfs_net *nn;
nn                864 fs/nfs/client.c 	nn = net_generic(clp->cl_net, nfs_net_id);
nn                865 fs/nfs/client.c 	spin_lock(&nn->nfs_client_lock);
nn                870 fs/nfs/client.c 	spin_unlock(&nn->nfs_client_lock);
nn               1071 fs/nfs/client.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn               1073 fs/nfs/client.c 	INIT_LIST_HEAD(&nn->nfs_client_list);
nn               1074 fs/nfs/client.c 	INIT_LIST_HEAD(&nn->nfs_volume_list);
nn               1076 fs/nfs/client.c 	idr_init(&nn->cb_ident_idr);
nn               1078 fs/nfs/client.c 	spin_lock_init(&nn->nfs_client_lock);
nn               1079 fs/nfs/client.c 	nn->boot_time = ktime_get_real();
nn               1081 fs/nfs/client.c 	nfs_netns_sysfs_setup(nn, net);
nn               1086 fs/nfs/client.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn               1088 fs/nfs/client.c 	nfs_netns_sysfs_destroy(nn);
nn               1090 fs/nfs/client.c 	WARN_ON_ONCE(!list_empty(&nn->nfs_client_list));
nn               1091 fs/nfs/client.c 	WARN_ON_ONCE(!list_empty(&nn->nfs_volume_list));
nn               1123 fs/nfs/client.c 				__acquires(&nn->nfs_client_lock)
nn               1125 fs/nfs/client.c 	struct nfs_net *nn = net_generic(seq_file_net(m), nfs_net_id);
nn               1128 fs/nfs/client.c 	spin_lock(&nn->nfs_client_lock);
nn               1129 fs/nfs/client.c 	return seq_list_start_head(&nn->nfs_client_list, *_pos);
nn               1137 fs/nfs/client.c 	struct nfs_net *nn = net_generic(seq_file_net(p), nfs_net_id);
nn               1139 fs/nfs/client.c 	return seq_list_next(v, &nn->nfs_client_list, pos);
nn               1146 fs/nfs/client.c 				__releases(&nn->nfs_client_lock)
nn               1148 fs/nfs/client.c 	struct nfs_net *nn = net_generic(seq_file_net(p), nfs_net_id);
nn               1150 fs/nfs/client.c 	spin_unlock(&nn->nfs_client_lock);
nn               1159 fs/nfs/client.c 	struct nfs_net *nn = net_generic(seq_file_net(m), nfs_net_id);
nn               1162 fs/nfs/client.c 	if (v == &nn->nfs_client_list) {
nn               1190 fs/nfs/client.c 				__acquires(&nn->nfs_client_lock)
nn               1192 fs/nfs/client.c 	struct nfs_net *nn = net_generic(seq_file_net(m), nfs_net_id);
nn               1195 fs/nfs/client.c 	spin_lock(&nn->nfs_client_lock);
nn               1196 fs/nfs/client.c 	return seq_list_start_head(&nn->nfs_volume_list, *_pos);
nn               1204 fs/nfs/client.c 	struct nfs_net *nn = net_generic(seq_file_net(p), nfs_net_id);
nn               1206 fs/nfs/client.c 	return seq_list_next(v, &nn->nfs_volume_list, pos);
nn               1213 fs/nfs/client.c 				__releases(&nn->nfs_client_lock)
nn               1215 fs/nfs/client.c 	struct nfs_net *nn = net_generic(seq_file_net(p), nfs_net_id);
nn               1217 fs/nfs/client.c 	spin_unlock(&nn->nfs_client_lock);
nn               1229 fs/nfs/client.c 	struct nfs_net *nn = net_generic(seq_file_net(m), nfs_net_id);
nn               1232 fs/nfs/client.c 	if (v == &nn->nfs_volume_list) {
nn               1263 fs/nfs/client.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn               1266 fs/nfs/client.c 	nn->proc_nfsfs = proc_net_mkdir(net, "nfsfs", net->proc_net);
nn               1267 fs/nfs/client.c 	if (!nn->proc_nfsfs)
nn               1271 fs/nfs/client.c 	p = proc_create_net("servers", S_IFREG|S_IRUGO, nn->proc_nfsfs,
nn               1277 fs/nfs/client.c 	p = proc_create_net("volumes", S_IFREG|S_IRUGO, nn->proc_nfsfs,
nn                352 fs/nfs/dns_resolve.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                354 fs/nfs/dns_resolve.c 	ret = do_cache_lookup_wait(nn->nfs_dns_resolve, &key, &item);
nn                361 fs/nfs/dns_resolve.c 		cache_put(&item->h, nn->nfs_dns_resolve);
nn                386 fs/nfs/dns_resolve.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                388 fs/nfs/dns_resolve.c 	nn->nfs_dns_resolve = cache_create_net(&nfs_dns_resolve_template, net);
nn                389 fs/nfs/dns_resolve.c 	if (IS_ERR(nn->nfs_dns_resolve))
nn                390 fs/nfs/dns_resolve.c 		return PTR_ERR(nn->nfs_dns_resolve);
nn                392 fs/nfs/dns_resolve.c 	err = nfs_cache_register_net(net, nn->nfs_dns_resolve);
nn                398 fs/nfs/dns_resolve.c 	cache_destroy_net(nn->nfs_dns_resolve, net);
nn                404 fs/nfs/dns_resolve.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                406 fs/nfs/dns_resolve.c 	nfs_cache_unregister_net(net, nn->nfs_dns_resolve);
nn                407 fs/nfs/dns_resolve.c 	cache_destroy_net(nn->nfs_dns_resolve, net);
nn                430 fs/nfs/dns_resolve.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                431 fs/nfs/dns_resolve.c 	struct cache_detail *cd = nn->nfs_dns_resolve;
nn                 31 fs/nfs/nfs4client.c 	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
nn                 36 fs/nfs/nfs4client.c 	spin_lock(&nn->nfs_client_lock);
nn                 37 fs/nfs/nfs4client.c 	ret = idr_alloc(&nn->cb_ident_idr, clp, 1, 0, GFP_NOWAIT);
nn                 40 fs/nfs/nfs4client.c 	spin_unlock(&nn->nfs_client_lock);
nn                459 fs/nfs/nfs4client.c 	struct nfs_net *nn = net_generic(keep->cl_net, nfs_net_id);
nn                468 fs/nfs/nfs4client.c 	spin_lock(&nn->nfs_client_lock);
nn                470 fs/nfs/nfs4client.c 	idr_replace(&nn->cb_ident_idr, keep, drop->cl_cb_ident);
nn                473 fs/nfs/nfs4client.c 	idr_replace(&nn->cb_ident_idr, drop, save);
nn                476 fs/nfs/nfs4client.c 	spin_unlock(&nn->nfs_client_lock);
nn                493 fs/nfs/nfs4client.c 			     struct nfs_client **prev, struct nfs_net *nn)
nn                509 fs/nfs/nfs4client.c 		spin_unlock(&nn->nfs_client_lock);
nn                515 fs/nfs/nfs4client.c 		spin_lock(&nn->nfs_client_lock);
nn                553 fs/nfs/nfs4client.c 	struct nfs_net *nn = net_generic(new->cl_net, nfs_net_id);
nn                561 fs/nfs/nfs4client.c 	spin_lock(&nn->nfs_client_lock);
nn                562 fs/nfs/nfs4client.c 	list_for_each_entry(pos, &nn->nfs_client_list, cl_share_link) {
nn                567 fs/nfs/nfs4client.c 		status = nfs4_match_client(pos, new, &prev, nn);
nn                589 fs/nfs/nfs4client.c 		spin_unlock(&nn->nfs_client_lock);
nn                616 fs/nfs/nfs4client.c 		spin_lock(&nn->nfs_client_lock);
nn                619 fs/nfs/nfs4client.c 	spin_unlock(&nn->nfs_client_lock);
nn                719 fs/nfs/nfs4client.c 	struct nfs_net *nn = net_generic(new->cl_net, nfs_net_id);
nn                723 fs/nfs/nfs4client.c 	spin_lock(&nn->nfs_client_lock);
nn                724 fs/nfs/nfs4client.c 	list_for_each_entry(pos, &nn->nfs_client_list, cl_share_link) {
nn                729 fs/nfs/nfs4client.c 		status = nfs4_match_client(pos, new, &prev, nn);
nn                752 fs/nfs/nfs4client.c 	spin_unlock(&nn->nfs_client_lock);
nn                777 fs/nfs/nfs4client.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                779 fs/nfs/nfs4client.c 	spin_lock(&nn->nfs_client_lock);
nn                780 fs/nfs/nfs4client.c 	clp = idr_find(&nn->cb_ident_idr, cb_ident);
nn                783 fs/nfs/nfs4client.c 	spin_unlock(&nn->nfs_client_lock);
nn                822 fs/nfs/nfs4client.c 	struct nfs_net *nn = net_generic(net, nfs_net_id);
nn                824 fs/nfs/nfs4client.c 	spin_lock(&nn->nfs_client_lock);
nn                825 fs/nfs/nfs4client.c 	list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) {
nn                838 fs/nfs/nfs4client.c 		spin_unlock(&nn->nfs_client_lock);
nn                841 fs/nfs/nfs4client.c 	spin_unlock(&nn->nfs_client_lock);
nn               5923 fs/nfs/nfs4proc.c 		struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
nn               5924 fs/nfs/nfs4proc.c 		u64 ns = ktime_to_ns(nn->boot_time);
nn                117 fs/nfs/nfs4state.c 	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
nn                121 fs/nfs/nfs4state.c 	port = nn->nfs_callback_tcpport;
nn                123 fs/nfs/nfs4state.c 		port = nn->nfs_callback_tcpport6;
nn                162 fs/nfs/nfs4state.c 	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
nn                166 fs/nfs/nfs4state.c 	port = nn->nfs_callback_tcpport;
nn                168 fs/nfs/nfs4state.c 		port = nn->nfs_callback_tcpport6;
nn               1840 fs/nfs/nfs4xdr.c 	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
nn               1879 fs/nfs/nfs4xdr.c 	*p++ = cpu_to_be32(ktime_to_ns(nn->boot_time));	/* stamp */
nn                899 fs/nfsd/export.c 	struct nfsd_net		*nn = net_generic(net, nfsd_net_id);
nn                900 fs/nfsd/export.c 	struct cache_detail	*cd = nn->svc_export_cache;
nn                940 fs/nfsd/export.c 	struct nfsd_net *nn = net_generic(cd->net, nfsd_net_id);
nn                941 fs/nfsd/export.c 	struct svc_expkey *ek = exp_find_key(nn->svc_expkey_cache, clp, fsid_type, fsidv, reqp);
nn                946 fs/nfsd/export.c 	cache_put(&ek->h, nn->svc_expkey_cache);
nn                998 fs/nfsd/export.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn                999 fs/nfsd/export.c 	struct cache_detail *cd = nn->svc_export_cache;
nn               1029 fs/nfsd/export.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               1030 fs/nfsd/export.c 	struct cache_detail *cd = nn->svc_export_cache;
nn               1247 fs/nfsd/export.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1251 fs/nfsd/export.c 	nn->svc_export_cache = cache_create_net(&svc_export_cache_template, net);
nn               1252 fs/nfsd/export.c 	if (IS_ERR(nn->svc_export_cache))
nn               1253 fs/nfsd/export.c 		return PTR_ERR(nn->svc_export_cache);
nn               1254 fs/nfsd/export.c 	rv = cache_register_net(nn->svc_export_cache, net);
nn               1258 fs/nfsd/export.c 	nn->svc_expkey_cache = cache_create_net(&svc_expkey_cache_template, net);
nn               1259 fs/nfsd/export.c 	if (IS_ERR(nn->svc_expkey_cache)) {
nn               1260 fs/nfsd/export.c 		rv = PTR_ERR(nn->svc_expkey_cache);
nn               1263 fs/nfsd/export.c 	rv = cache_register_net(nn->svc_expkey_cache, net);
nn               1269 fs/nfsd/export.c 	cache_destroy_net(nn->svc_expkey_cache, net);
nn               1271 fs/nfsd/export.c 	cache_unregister_net(nn->svc_export_cache, net);
nn               1273 fs/nfsd/export.c 	cache_destroy_net(nn->svc_export_cache, net);
nn               1283 fs/nfsd/export.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1285 fs/nfsd/export.c 	cache_purge(nn->svc_expkey_cache);
nn               1286 fs/nfsd/export.c 	cache_purge(nn->svc_export_cache);
nn               1295 fs/nfsd/export.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1299 fs/nfsd/export.c 	cache_unregister_net(nn->svc_expkey_cache, net);
nn               1300 fs/nfsd/export.c 	cache_unregister_net(nn->svc_export_cache, net);
nn               1301 fs/nfsd/export.c 	cache_destroy_net(nn->svc_expkey_cache, net);
nn               1302 fs/nfsd/export.c 	cache_destroy_net(nn->svc_export_cache, net);
nn                178 fs/nfsd/netns.h #define nfsd_netns_ready(nn) ((nn)->sessionid_hashtbl)
nn                180 fs/nfsd/netns.h extern void nfsd_netns_free_versions(struct nfsd_net *nn);
nn                184 fs/nfsd/netns.h void nfsd_copy_boot_verifier(__be32 verf[2], struct nfsd_net *nn);
nn                185 fs/nfsd/netns.h void nfsd_reset_boot_verifier(struct nfsd_net *nn);
nn                754 fs/nfsd/nfs3xdr.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn                762 fs/nfsd/nfs3xdr.c 		nfsd_copy_boot_verifier(verf, nn);
nn               1130 fs/nfsd/nfs3xdr.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               1137 fs/nfsd/nfs3xdr.c 		nfsd_copy_boot_verifier(verf, nn);
nn                825 fs/nfsd/nfs4callback.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                826 fs/nfsd/nfs4callback.c 	return max(nn->nfsd4_lease/10, (time_t)1) * HZ;
nn                453 fs/nfsd/nfs4idmap.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                455 fs/nfsd/nfs4idmap.c 	nn->idtoname_cache = cache_create_net(&idtoname_cache_template, net);
nn                456 fs/nfsd/nfs4idmap.c 	if (IS_ERR(nn->idtoname_cache))
nn                457 fs/nfsd/nfs4idmap.c 		return PTR_ERR(nn->idtoname_cache);
nn                458 fs/nfsd/nfs4idmap.c 	rv = cache_register_net(nn->idtoname_cache, net);
nn                461 fs/nfsd/nfs4idmap.c 	nn->nametoid_cache = cache_create_net(&nametoid_cache_template, net);
nn                462 fs/nfsd/nfs4idmap.c 	if (IS_ERR(nn->nametoid_cache)) {
nn                463 fs/nfsd/nfs4idmap.c 		rv = PTR_ERR(nn->nametoid_cache);
nn                466 fs/nfsd/nfs4idmap.c 	rv = cache_register_net(nn->nametoid_cache, net);
nn                472 fs/nfsd/nfs4idmap.c 	cache_destroy_net(nn->nametoid_cache, net);
nn                474 fs/nfsd/nfs4idmap.c 	cache_unregister_net(nn->idtoname_cache, net);
nn                476 fs/nfsd/nfs4idmap.c 	cache_destroy_net(nn->idtoname_cache, net);
nn                483 fs/nfsd/nfs4idmap.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                485 fs/nfsd/nfs4idmap.c 	cache_unregister_net(nn->idtoname_cache, net);
nn                486 fs/nfsd/nfs4idmap.c 	cache_unregister_net(nn->nametoid_cache, net);
nn                487 fs/nfsd/nfs4idmap.c 	cache_destroy_net(nn->idtoname_cache, net);
nn                488 fs/nfsd/nfs4idmap.c 	cache_destroy_net(nn->nametoid_cache, net);
nn                531 fs/nfsd/nfs4idmap.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn                538 fs/nfsd/nfs4idmap.c 	ret = idmap_lookup(rqstp, nametoid_lookup, &key, nn->nametoid_cache, &item);
nn                544 fs/nfsd/nfs4idmap.c 	cache_put(&item->h, nn->nametoid_cache);
nn                571 fs/nfsd/nfs4idmap.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn                574 fs/nfsd/nfs4idmap.c 	ret = idmap_lookup(rqstp, idtoname_lookup, &key, nn->idtoname_cache, &item);
nn                585 fs/nfsd/nfs4idmap.c 	cache_put(&item->h, nn->idtoname_cache);
nn                656 fs/nfsd/nfs4layouts.c 	struct nfsd_net *nn;
nn                674 fs/nfsd/nfs4layouts.c 		nn = net_generic(ls->ls_stid.sc_client->net, nfsd_net_id);
nn                678 fs/nfsd/nfs4layouts.c 					 (u64)nn->nfsd4_lease * NSEC_PER_SEC * 2);
nn                357 fs/nfsd/nfs4proc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                383 fs/nfsd/nfs4proc.c 	status = nfsd4_process_open1(cstate, open, nn);
nn                425 fs/nfsd/nfs4proc.c 							 cstate, nn);
nn                460 fs/nfsd/nfs4proc.c 		nn->somebody_reclaimed = true;
nn               1272 fs/nfsd/nfs4proc.c 		struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               1278 fs/nfsd/nfs4proc.c 		if (!nfs4_init_cp_state(nn, copy)) {
nn               1927 fs/nfsd/nfs4proc.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               1950 fs/nfsd/nfs4proc.c 	if (nfsd_minorversion(nn, args->minorversion, NFSD_TEST) <= 0)
nn                178 fs/nfsd/nfs4recover.c 		const char *dname, int len, struct nfsd_net *nn)
nn                191 fs/nfsd/nfs4recover.c 	crp = nfs4_client_to_reclaim(name, princhash, nn);
nn                206 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                210 fs/nfsd/nfs4recover.c 	if (!nn->rec_file)
nn                221 fs/nfsd/nfs4recover.c 	status = mnt_want_write_file(nn->rec_file);
nn                225 fs/nfsd/nfs4recover.c 	dir = nn->rec_file->f_path.dentry;
nn                250 fs/nfsd/nfs4recover.c 		if (nn->in_grace)
nn                252 fs/nfsd/nfs4recover.c 					HEXDIR_LEN, nn);
nn                253 fs/nfsd/nfs4recover.c 		vfs_fsync(nn->rec_file, 0);
nn                260 fs/nfsd/nfs4recover.c 	mnt_drop_write_file(nn->rec_file);
nn                297 fs/nfsd/nfs4recover.c nfsd4_list_rec_dir(recdir_func *f, struct nfsd_net *nn)
nn                300 fs/nfsd/nfs4recover.c 	struct dentry *dir = nn->rec_file->f_path.dentry;
nn                312 fs/nfsd/nfs4recover.c 	status = vfs_llseek(nn->rec_file, 0, SEEK_SET);
nn                318 fs/nfsd/nfs4recover.c 	status = iterate_dir(nn->rec_file, &ctx.ctx);
nn                329 fs/nfsd/nfs4recover.c 			status = f(dir, dentry, nn);
nn                347 fs/nfsd/nfs4recover.c nfsd4_unlink_clid_dir(char *name, int namlen, struct nfsd_net *nn)
nn                354 fs/nfsd/nfs4recover.c 	dir = nn->rec_file->f_path.dentry;
nn                374 fs/nfsd/nfs4recover.c 		struct nfsd_net *nn)
nn                386 fs/nfsd/nfs4recover.c 	crp = nfsd4_find_reclaim_client(name, nn);
nn                389 fs/nfsd/nfs4recover.c 		nfs4_remove_reclaim_record(crp, nn);
nn                398 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                400 fs/nfsd/nfs4recover.c 	if (!nn->rec_file || !test_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags))
nn                407 fs/nfsd/nfs4recover.c 	status = mnt_want_write_file(nn->rec_file);
nn                416 fs/nfsd/nfs4recover.c 	status = nfsd4_unlink_clid_dir(dname, HEXDIR_LEN-1, nn);
nn                419 fs/nfsd/nfs4recover.c 		vfs_fsync(nn->rec_file, 0);
nn                420 fs/nfsd/nfs4recover.c 		if (nn->in_grace)
nn                422 fs/nfsd/nfs4recover.c 					HEXDIR_LEN, nn);
nn                425 fs/nfsd/nfs4recover.c 	mnt_drop_write_file(nn->rec_file);
nn                433 fs/nfsd/nfs4recover.c purge_old(struct dentry *parent, struct dentry *child, struct nfsd_net *nn)
nn                451 fs/nfsd/nfs4recover.c 	if (nfs4_has_reclaimed_state(name, nn))
nn                466 fs/nfsd/nfs4recover.c nfsd4_recdir_purge_old(struct nfsd_net *nn)
nn                470 fs/nfsd/nfs4recover.c 	nn->in_grace = false;
nn                471 fs/nfsd/nfs4recover.c 	if (!nn->rec_file)
nn                473 fs/nfsd/nfs4recover.c 	status = mnt_want_write_file(nn->rec_file);
nn                476 fs/nfsd/nfs4recover.c 	status = nfsd4_list_rec_dir(purge_old, nn);
nn                478 fs/nfsd/nfs4recover.c 		vfs_fsync(nn->rec_file, 0);
nn                479 fs/nfsd/nfs4recover.c 	mnt_drop_write_file(nn->rec_file);
nn                481 fs/nfsd/nfs4recover.c 	nfs4_release_reclaim(nn);
nn                484 fs/nfsd/nfs4recover.c 			" directory %pD\n", nn->rec_file);
nn                488 fs/nfsd/nfs4recover.c load_recdir(struct dentry *parent, struct dentry *child, struct nfsd_net *nn)
nn                506 fs/nfsd/nfs4recover.c 	if (!nfs4_client_to_reclaim(name, princhash, nn))
nn                515 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn =  net_generic(net, nfsd_net_id);
nn                517 fs/nfsd/nfs4recover.c 	if (!nn->rec_file)
nn                520 fs/nfsd/nfs4recover.c 	status = nfsd4_list_rec_dir(load_recdir, nn);
nn                523 fs/nfsd/nfs4recover.c 			" directory %pD\n", nn->rec_file);
nn                534 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                541 fs/nfsd/nfs4recover.c 	BUG_ON(nn->rec_file);
nn                551 fs/nfsd/nfs4recover.c 	nn->rec_file = filp_open(user_recovery_dirname, O_RDONLY | O_DIRECTORY, 0);
nn                552 fs/nfsd/nfs4recover.c 	if (IS_ERR(nn->rec_file)) {
nn                555 fs/nfsd/nfs4recover.c 		status = PTR_ERR(nn->rec_file);
nn                556 fs/nfsd/nfs4recover.c 		nn->rec_file = NULL;
nn                561 fs/nfsd/nfs4recover.c 		nn->in_grace = true;
nn                568 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                570 fs/nfsd/nfs4recover.c 	if (!nn->rec_file)
nn                572 fs/nfsd/nfs4recover.c 	fput(nn->rec_file);
nn                573 fs/nfsd/nfs4recover.c 	nn->rec_file = NULL;
nn                579 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                582 fs/nfsd/nfs4recover.c 	nn->reclaim_str_hashtbl = kmalloc_array(CLIENT_HASH_SIZE,
nn                585 fs/nfsd/nfs4recover.c 	if (!nn->reclaim_str_hashtbl)
nn                589 fs/nfsd/nfs4recover.c 		INIT_LIST_HEAD(&nn->reclaim_str_hashtbl[i]);
nn                590 fs/nfsd/nfs4recover.c 	nn->reclaim_str_hashtbl_size = 0;
nn                598 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                600 fs/nfsd/nfs4recover.c 	kfree(nn->reclaim_str_hashtbl);
nn                648 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                650 fs/nfsd/nfs4recover.c 	nfs4_release_reclaim(nn);
nn                688 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                709 fs/nfsd/nfs4recover.c 	crp = nfsd4_find_reclaim_client(name, nn);
nn                763 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(pipe->dentry->d_sb->s_fs_info,
nn                768 fs/nfsd/nfs4recover.c 	msg.len = nn->client_tracking_ops->msglen;
nn                801 fs/nfsd/nfs4recover.c 		struct nfsd_net *nn)
nn                806 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn                813 fs/nfsd/nfs4recover.c 		if (nn->client_tracking_ops->version >= 2) {
nn                849 fs/nfsd/nfs4recover.c 		if (!nfs4_client_to_reclaim(name, princhash, nn)) {
nn                854 fs/nfsd/nfs4recover.c 		return nn->client_tracking_ops->msglen;
nn                866 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(file_inode(filp)->i_sb->s_fs_info,
nn                868 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn                871 fs/nfsd/nfs4recover.c 	if (mlen != nn->client_tracking_ops->msglen) {
nn                873 fs/nfsd/nfs4recover.c 			nn->client_tracking_ops->msglen);
nn                913 fs/nfsd/nfs4recover.c 		return __cld_pipe_inprogress_downcall(cmsg, nn);
nn                994 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                997 fs/nfsd/nfs4recover.c 	if (nn->cld_net)
nn               1022 fs/nfsd/nfs4recover.c 	nn->cld_net = cn;
nn               1048 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1049 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1055 fs/nfsd/nfs4recover.c 	kfree(nn->cld_net);
nn               1056 fs/nfsd/nfs4recover.c 	nn->cld_net = NULL;
nn               1060 fs/nfsd/nfs4recover.c alloc_cld_upcall(struct nfsd_net *nn)
nn               1063 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1080 fs/nfsd/nfs4recover.c 	new->cu_u.cu_msg.cm_vers = nn->client_tracking_ops->version;
nn               1108 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1109 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1115 fs/nfsd/nfs4recover.c 	cup = alloc_cld_upcall(nn);
nn               1145 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1146 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1157 fs/nfsd/nfs4recover.c 	cup = alloc_cld_upcall(nn);
nn               1214 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1215 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1221 fs/nfsd/nfs4recover.c 	cup = alloc_cld_upcall(nn);
nn               1256 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1257 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1263 fs/nfsd/nfs4recover.c 	cup = alloc_cld_upcall(nn);
nn               1295 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1296 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1306 fs/nfsd/nfs4recover.c 	crp = nfsd4_find_reclaim_client(clp->cl_name, nn);
nn               1322 fs/nfsd/nfs4recover.c 		crp = nfsd4_find_reclaim_client(name, nn);
nn               1338 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1339 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1353 fs/nfsd/nfs4recover.c 	crp = nfsd4_find_reclaim_client(clp->cl_name, nn);
nn               1369 fs/nfsd/nfs4recover.c 		crp = nfsd4_find_reclaim_client(name, nn);
nn               1408 fs/nfsd/nfs4recover.c nfsd4_cld_grace_start(struct nfsd_net *nn)
nn               1412 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1414 fs/nfsd/nfs4recover.c 	cup = alloc_cld_upcall(nn);
nn               1435 fs/nfsd/nfs4recover.c nfsd4_cld_grace_done_v0(struct nfsd_net *nn)
nn               1439 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1441 fs/nfsd/nfs4recover.c 	cup = alloc_cld_upcall(nn);
nn               1448 fs/nfsd/nfs4recover.c 	cup->cu_u.cu_msg.cm_u.cm_gracetime = (int64_t)nn->boot_time;
nn               1464 fs/nfsd/nfs4recover.c nfsd4_cld_grace_done(struct nfsd_net *nn)
nn               1468 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1470 fs/nfsd/nfs4recover.c 	cup = alloc_cld_upcall(nn);
nn               1483 fs/nfsd/nfs4recover.c 	nfs4_release_reclaim(nn);
nn               1491 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1494 fs/nfsd/nfs4recover.c 	nn->reclaim_str_hashtbl = kmalloc_array(CLIENT_HASH_SIZE,
nn               1497 fs/nfsd/nfs4recover.c 	if (!nn->reclaim_str_hashtbl)
nn               1501 fs/nfsd/nfs4recover.c 		INIT_LIST_HEAD(&nn->reclaim_str_hashtbl[i]);
nn               1502 fs/nfsd/nfs4recover.c 	nn->reclaim_str_hashtbl_size = 0;
nn               1503 fs/nfsd/nfs4recover.c 	nn->track_reclaim_completes = true;
nn               1504 fs/nfsd/nfs4recover.c 	atomic_set(&nn->nr_reclaim_complete, 0);
nn               1512 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1514 fs/nfsd/nfs4recover.c 	nn->track_reclaim_completes = false;
nn               1515 fs/nfsd/nfs4recover.c 	kfree(nn->reclaim_str_hashtbl);
nn               1519 fs/nfsd/nfs4recover.c cld_running(struct nfsd_net *nn)
nn               1521 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1528 fs/nfsd/nfs4recover.c nfsd4_cld_get_version(struct nfsd_net *nn)
nn               1532 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn               1535 fs/nfsd/nfs4recover.c 	cup = alloc_cld_upcall(nn);
nn               1556 fs/nfsd/nfs4recover.c 			nn->client_tracking_ops = &nfsd4_cld_tracking_ops;
nn               1559 fs/nfsd/nfs4recover.c 			nn->client_tracking_ops = &nfsd4_cld_tracking_ops_v2;
nn               1578 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1599 fs/nfsd/nfs4recover.c 	while (!(running = cld_running(nn)) && retries--)
nn               1611 fs/nfsd/nfs4recover.c 	nn->cld_net->cn_tfm = tfm;
nn               1613 fs/nfsd/nfs4recover.c 	status = nfsd4_cld_get_version(nn);
nn               1617 fs/nfsd/nfs4recover.c 	status = nfsd4_cld_grace_start(nn);
nn               1621 fs/nfsd/nfs4recover.c 		nfs4_release_reclaim(nn);
nn               1637 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1639 fs/nfsd/nfs4recover.c 	nfs4_release_reclaim(nn);
nn               1875 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1876 fs/nfsd/nfs4recover.c 	char *grace_start = nfsd4_cltrack_grace_start(nn->boot_time);
nn               1912 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1937 fs/nfsd/nfs4recover.c 	grace_start = nfsd4_cltrack_grace_start(nn->boot_time);
nn               2007 fs/nfsd/nfs4recover.c nfsd4_umh_cltrack_grace_done(struct nfsd_net *nn)
nn               2012 fs/nfsd/nfs4recover.c 	sprintf(timestr, "%ld", nn->boot_time);
nn               2034 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               2037 fs/nfsd/nfs4recover.c 	if (nn->client_tracking_ops)
nn               2041 fs/nfsd/nfs4recover.c 	nn->client_tracking_ops = &nfsd4_cld_tracking_ops;
nn               2042 fs/nfsd/nfs4recover.c 	status = nn->client_tracking_ops->init(net);
nn               2046 fs/nfsd/nfs4recover.c 		nn->client_tracking_ops = &nfsd4_cld_tracking_ops_v0;
nn               2047 fs/nfsd/nfs4recover.c 		status = nn->client_tracking_ops->init(net);
nn               2055 fs/nfsd/nfs4recover.c 	nn->client_tracking_ops = &nfsd4_umh_tracking_ops;
nn               2056 fs/nfsd/nfs4recover.c 	status = nn->client_tracking_ops->init(net);
nn               2064 fs/nfsd/nfs4recover.c 	nn->client_tracking_ops = &nfsd4_legacy_tracking_ops;
nn               2076 fs/nfsd/nfs4recover.c 	status = nn->client_tracking_ops->init(net);
nn               2081 fs/nfsd/nfs4recover.c 		nn->client_tracking_ops = NULL;
nn               2089 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               2091 fs/nfsd/nfs4recover.c 	if (nn->client_tracking_ops) {
nn               2092 fs/nfsd/nfs4recover.c 		if (nn->client_tracking_ops->exit)
nn               2093 fs/nfsd/nfs4recover.c 			nn->client_tracking_ops->exit(net);
nn               2094 fs/nfsd/nfs4recover.c 		nn->client_tracking_ops = NULL;
nn               2101 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               2103 fs/nfsd/nfs4recover.c 	if (nn->client_tracking_ops)
nn               2104 fs/nfsd/nfs4recover.c 		nn->client_tracking_ops->create(clp);
nn               2110 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               2112 fs/nfsd/nfs4recover.c 	if (nn->client_tracking_ops)
nn               2113 fs/nfsd/nfs4recover.c 		nn->client_tracking_ops->remove(clp);
nn               2119 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               2121 fs/nfsd/nfs4recover.c 	if (nn->client_tracking_ops)
nn               2122 fs/nfsd/nfs4recover.c 		return nn->client_tracking_ops->check(clp);
nn               2128 fs/nfsd/nfs4recover.c nfsd4_record_grace_done(struct nfsd_net *nn)
nn               2130 fs/nfsd/nfs4recover.c 	if (nn->client_tracking_ops)
nn               2131 fs/nfsd/nfs4recover.c 		nn->client_tracking_ops->grace_done(nn);
nn               2139 fs/nfsd/nfs4recover.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               2140 fs/nfsd/nfs4recover.c 	struct cld_net *cn = nn->cld_net;
nn                 82 fs/nfsd/nfs4state.c void nfsd4_end_grace(struct nfsd_net *nn);
nn                144 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                146 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn                158 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                172 fs/nfsd/nfs4state.c 	list_move_tail(&clp->cl_lru, &nn->client_lru);
nn                178 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                180 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn                192 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                194 fs/nfsd/nfs4state.c 	if (!atomic_dec_and_lock(&clp->cl_rpc_users, &nn->client_lock))
nn                200 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn                219 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                221 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn                231 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                233 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn                235 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn                240 fs/nfsd/nfs4state.c 			struct nfsd_net *nn)
nn                244 fs/nfsd/nfs4state.c 	spin_lock(&nn->blocked_locks_lock);
nn                253 fs/nfsd/nfs4state.c 	spin_unlock(&nn->blocked_locks_lock);
nn                261 fs/nfsd/nfs4state.c 			struct nfsd_net *nn)
nn                265 fs/nfsd/nfs4state.c 	nbl = find_blocked_lock(lo, fh, nn);
nn                293 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn                298 fs/nfsd/nfs4state.c 	spin_lock(&nn->blocked_locks_lock);
nn                306 fs/nfsd/nfs4state.c 	spin_unlock(&nn->blocked_locks_lock);
nn                746 fs/nfsd/nfs4state.c int nfs4_init_cp_state(struct nfsd_net *nn, struct nfsd4_copy *copy)
nn                751 fs/nfsd/nfs4state.c 	spin_lock(&nn->s2s_cp_lock);
nn                752 fs/nfsd/nfs4state.c 	new_id = idr_alloc_cyclic(&nn->s2s_cp_stateids, copy, 0, 0, GFP_NOWAIT);
nn                753 fs/nfsd/nfs4state.c 	spin_unlock(&nn->s2s_cp_lock);
nn                758 fs/nfsd/nfs4state.c 	copy->cp_stateid.si_opaque.so_clid.cl_boot = nn->boot_time;
nn                759 fs/nfsd/nfs4state.c 	copy->cp_stateid.si_opaque.so_clid.cl_id = nn->s2s_cp_cl_id;
nn                765 fs/nfsd/nfs4state.c 	struct nfsd_net *nn;
nn                767 fs/nfsd/nfs4state.c 	nn = net_generic(copy->cp_clp->net, nfsd_net_id);
nn                768 fs/nfsd/nfs4state.c 	spin_lock(&nn->s2s_cp_lock);
nn                769 fs/nfsd/nfs4state.c 	idr_remove(&nn->s2s_cp_stateids, copy->cp_stateid.si_opaque.so_id);
nn                770 fs/nfsd/nfs4state.c 	spin_unlock(&nn->s2s_cp_lock);
nn               1434 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(oo->oo_owner.so_client->net,
nn               1438 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               1444 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               1573 fs/nfsd/nfs4state.c static u32 nfsd4_get_drc_mem(struct nfsd4_channel_attrs *ca, struct nfsd_net *nn)
nn               1600 fs/nfsd/nfs4state.c 	scale_factor = max_t(unsigned int, 8, nn->nfsd_serv->sv_nrthreads);
nn               1767 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               1780 fs/nfsd/nfs4state.c 	list_add(&new->se_hash, &nn->sessionid_hashtbl[idx]);
nn               1805 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1807 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               1812 fs/nfsd/nfs4state.c 	list_for_each_entry(elem, &nn->sessionid_hashtbl[idx], se_hash) {
nn               1846 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1848 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               1858 fs/nfsd/nfs4state.c STALE_CLIENTID(clientid_t *clid, struct nfsd_net *nn)
nn               1865 fs/nfsd/nfs4state.c 	if (clid->cl_boot == (u32)nn->boot_time)
nn               1868 fs/nfsd/nfs4state.c 		clid->cl_boot, clid->cl_id, nn->boot_time);
nn               1962 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1965 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               1973 fs/nfsd/nfs4state.c 			rb_erase(&clp->cl_namenode, &nn->conf_name_tree);
nn               1975 fs/nfsd/nfs4state.c 			rb_erase(&clp->cl_namenode, &nn->unconf_name_tree);
nn               1987 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               1989 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               1991 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               2061 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               2063 fs/nfsd/nfs4state.c 	if (!nn->track_reclaim_completes)
nn               2065 fs/nfsd/nfs4state.c 	if (!nfsd4_find_reclaim_client(clp->cl_name, nn))
nn               2067 fs/nfsd/nfs4state.c 	if (atomic_inc_return(&nn->nr_reclaim_complete) ==
nn               2068 fs/nfsd/nfs4state.c 			nn->reclaim_str_hashtbl_size) {
nn               2071 fs/nfsd/nfs4state.c 		nfsd4_end_grace(nn);
nn               2212 fs/nfsd/nfs4state.c static void gen_confirm(struct nfs4_client *clp, struct nfsd_net *nn)
nn               2221 fs/nfsd/nfs4state.c 	verf[1] = (__force __be32)nn->clverifier_counter++;
nn               2225 fs/nfsd/nfs4state.c static void gen_clid(struct nfs4_client *clp, struct nfsd_net *nn)
nn               2227 fs/nfsd/nfs4state.c 	clp->cl_clientid.cl_boot = nn->boot_time;
nn               2228 fs/nfsd/nfs4state.c 	clp->cl_clientid.cl_id = nn->clientid_counter++;
nn               2229 fs/nfsd/nfs4state.c 	gen_confirm(clp, nn);
nn               2545 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               2553 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               2557 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               2603 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               2614 fs/nfsd/nfs4state.c 	gen_clid(clp, nn);
nn               2623 fs/nfsd/nfs4state.c 	clp->cl_nfsd_dentry = nfsd_client_mkdir(nn, &clp->cl_nfsdfs,
nn               2624 fs/nfsd/nfs4state.c 			clp->cl_clientid.cl_id - nn->clientid_base,
nn               2677 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               2679 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               2682 fs/nfsd/nfs4state.c 	add_clp_to_name_tree(clp, &nn->unconf_name_tree);
nn               2684 fs/nfsd/nfs4state.c 	list_add(&clp->cl_idhash, &nn->unconf_id_hashtbl[idhashval]);
nn               2692 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
nn               2694 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               2697 fs/nfsd/nfs4state.c 	list_move(&clp->cl_idhash, &nn->conf_id_hashtbl[idhashval]);
nn               2698 fs/nfsd/nfs4state.c 	rb_erase(&clp->cl_namenode, &nn->unconf_name_tree);
nn               2699 fs/nfsd/nfs4state.c 	add_clp_to_name_tree(clp, &nn->conf_name_tree);
nn               2722 fs/nfsd/nfs4state.c find_confirmed_client(clientid_t *clid, bool sessions, struct nfsd_net *nn)
nn               2724 fs/nfsd/nfs4state.c 	struct list_head *tbl = nn->conf_id_hashtbl;
nn               2726 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               2731 fs/nfsd/nfs4state.c find_unconfirmed_client(clientid_t *clid, bool sessions, struct nfsd_net *nn)
nn               2733 fs/nfsd/nfs4state.c 	struct list_head *tbl = nn->unconf_id_hashtbl;
nn               2735 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               2745 fs/nfsd/nfs4state.c find_confirmed_client_by_name(struct xdr_netobj *name, struct nfsd_net *nn)
nn               2747 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               2748 fs/nfsd/nfs4state.c 	return find_clp_in_name_tree(name, &nn->conf_name_tree);
nn               2752 fs/nfsd/nfs4state.c find_unconfirmed_client_by_name(struct xdr_netobj *name, struct nfsd_net *nn)
nn               2754 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               2755 fs/nfsd/nfs4state.c 	return find_clp_in_name_tree(name, &nn->unconf_name_tree);
nn               2968 fs/nfsd/nfs4state.c 	struct nfsd_net		*nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               3030 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3031 fs/nfsd/nfs4state.c 	conf = find_confirmed_client_by_name(&exid->clname, nn);
nn               3078 fs/nfsd/nfs4state.c 	unconf  = find_unconfirmed_client_by_name(&exid->clname, nn);
nn               3107 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3175 fs/nfsd/nfs4state.c static __be32 check_forechannel_attrs(struct nfsd4_channel_attrs *ca, struct nfsd_net *nn)
nn               3177 fs/nfsd/nfs4state.c 	u32 maxrpc = nn->nfsd_serv->sv_max_mesg;
nn               3200 fs/nfsd/nfs4state.c 	ca->maxreqs = nfsd4_get_drc_mem(ca, nn);
nn               3266 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               3273 fs/nfsd/nfs4state.c 	status = check_forechannel_attrs(&cr_ses->fore_channel, nn);
nn               3287 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3288 fs/nfsd/nfs4state.c 	unconf = find_unconfirmed_client(&cr_ses->clientid, true, nn);
nn               3289 fs/nfsd/nfs4state.c 	conf = find_confirmed_client(&cr_ses->clientid, true, nn);
nn               3319 fs/nfsd/nfs4state.c 		old = find_confirmed_client_by_name(&unconf->cl_name, nn);
nn               3349 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3357 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3388 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               3394 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3397 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3413 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               3417 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3419 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3456 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               3465 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3476 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3480 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3485 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3591 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               3604 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3694 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3726 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               3728 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3729 fs/nfsd/nfs4state.c 	unconf = find_unconfirmed_client(&dc->clientid, true, nn);
nn               3730 fs/nfsd/nfs4state.c 	conf = find_confirmed_client(&dc->clientid, true, nn);
nn               3755 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3811 fs/nfsd/nfs4state.c 	struct nfsd_net		*nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               3817 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3818 fs/nfsd/nfs4state.c 	conf = find_confirmed_client_by_name(&clname, nn);
nn               3833 fs/nfsd/nfs4state.c 	unconf = find_unconfirmed_client_by_name(&clname, nn);
nn               3839 fs/nfsd/nfs4state.c 		gen_confirm(new, nn);
nn               3851 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3872 fs/nfsd/nfs4state.c 	struct nfsd_net	*nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               3874 fs/nfsd/nfs4state.c 	if (STALE_CLIENTID(clid, nn))
nn               3877 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3878 fs/nfsd/nfs4state.c 	conf = find_confirmed_client(clid, false, nn);
nn               3879 fs/nfsd/nfs4state.c 	unconf = find_unconfirmed_client(clid, false, nn);
nn               3907 fs/nfsd/nfs4state.c 		old = find_confirmed_client_by_name(&unconf->cl_name, nn);
nn               3924 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               3926 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               3929 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               4262 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(s->st_stid.sc_client->net,
nn               4284 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               4287 fs/nfsd/nfs4state.c 	list_move_tail(&oo->oo_close_lru, &nn->close_lru);
nn               4289 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               4369 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(dp->dl_stid.sc_client->net,
nn               4384 fs/nfsd/nfs4state.c 		list_add_tail(&dp->dl_recall_lru, &nn->del_recall_lru);
nn               4495 fs/nfsd/nfs4state.c 		struct nfsd_net *nn)
nn               4506 fs/nfsd/nfs4state.c 	if (STALE_CLIENTID(clid, nn))
nn               4515 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               4516 fs/nfsd/nfs4state.c 	found = find_confirmed_client(clid, false, nn);
nn               4518 fs/nfsd/nfs4state.c 		spin_unlock(&nn->client_lock);
nn               4522 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               4531 fs/nfsd/nfs4state.c 		    struct nfsd4_open *open, struct nfsd_net *nn)
nn               4539 fs/nfsd/nfs4state.c 	if (STALE_CLIENTID(&open->op_clientid, nn))
nn               4549 fs/nfsd/nfs4state.c 	status = lookup_clientid(clientid, cstate, nn);
nn               5134 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               5138 fs/nfsd/nfs4state.c 	status = lookup_clientid(clid, cstate, nn);
nn               5152 fs/nfsd/nfs4state.c nfsd4_end_grace(struct nfsd_net *nn)
nn               5155 fs/nfsd/nfs4state.c 	if (nn->grace_ended)
nn               5158 fs/nfsd/nfs4state.c 	nn->grace_ended = true;
nn               5165 fs/nfsd/nfs4state.c 	nfsd4_record_grace_done(nn);
nn               5175 fs/nfsd/nfs4state.c 	locks_end_grace(&nn->nfsd4_manager);
nn               5187 fs/nfsd/nfs4state.c static bool clients_still_reclaiming(struct nfsd_net *nn)
nn               5190 fs/nfsd/nfs4state.c 	unsigned long double_grace_period_end = nn->boot_time +
nn               5191 fs/nfsd/nfs4state.c 						2 * nn->nfsd4_lease;
nn               5193 fs/nfsd/nfs4state.c 	if (nn->track_reclaim_completes &&
nn               5194 fs/nfsd/nfs4state.c 			atomic_read(&nn->nr_reclaim_complete) ==
nn               5195 fs/nfsd/nfs4state.c 			nn->reclaim_str_hashtbl_size)
nn               5197 fs/nfsd/nfs4state.c 	if (!nn->somebody_reclaimed)
nn               5199 fs/nfsd/nfs4state.c 	nn->somebody_reclaimed = false;
nn               5210 fs/nfsd/nfs4state.c nfs4_laundromat(struct nfsd_net *nn)
nn               5218 fs/nfsd/nfs4state.c 	time_t cutoff = get_seconds() - nn->nfsd4_lease;
nn               5219 fs/nfsd/nfs4state.c 	time_t t, new_timeo = nn->nfsd4_lease;
nn               5223 fs/nfsd/nfs4state.c 	if (clients_still_reclaiming(nn)) {
nn               5228 fs/nfsd/nfs4state.c 	nfsd4_end_grace(nn);
nn               5230 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               5231 fs/nfsd/nfs4state.c 	list_for_each_safe(pos, next, &nn->client_lru) {
nn               5245 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               5254 fs/nfsd/nfs4state.c 	list_for_each_safe(pos, next, &nn->del_recall_lru) {
nn               5272 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               5273 fs/nfsd/nfs4state.c 	while (!list_empty(&nn->close_lru)) {
nn               5274 fs/nfsd/nfs4state.c 		oo = list_first_entry(&nn->close_lru, struct nfs4_openowner,
nn               5285 fs/nfsd/nfs4state.c 		spin_unlock(&nn->client_lock);
nn               5287 fs/nfsd/nfs4state.c 		spin_lock(&nn->client_lock);
nn               5289 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               5303 fs/nfsd/nfs4state.c 	spin_lock(&nn->blocked_locks_lock);
nn               5304 fs/nfsd/nfs4state.c 	while (!list_empty(&nn->blocked_locks_lru)) {
nn               5305 fs/nfsd/nfs4state.c 		nbl = list_first_entry(&nn->blocked_locks_lru,
nn               5316 fs/nfsd/nfs4state.c 	spin_unlock(&nn->blocked_locks_lock);
nn               5337 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = container_of(dwork, struct nfsd_net,
nn               5340 fs/nfsd/nfs4state.c 	t = nfs4_laundromat(nn);
nn               5342 fs/nfsd/nfs4state.c 	queue_delayed_work(laundry_wq, &nn->laundromat_work, t*HZ);
nn               5509 fs/nfsd/nfs4state.c 		     struct nfs4_stid **s, struct nfsd_net *nn)
nn               5526 fs/nfsd/nfs4state.c 	status = lookup_clientid(&stateid->si_opaque.so_clid, cstate, nn);
nn               5616 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               5633 fs/nfsd/nfs4state.c 				&s, nn);
nn               5796 fs/nfsd/nfs4state.c 			 struct nfsd_net *nn)
nn               5806 fs/nfsd/nfs4state.c 	status = nfsd4_lookup_stateid(cstate, stateid, typemask, &s, nn);
nn               5821 fs/nfsd/nfs4state.c 						 stateid_t *stateid, struct nfs4_ol_stateid **stpp, struct nfsd_net *nn)
nn               5828 fs/nfsd/nfs4state.c 						NFS4_OPEN_STID, &stp, nn);
nn               5849 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               5860 fs/nfsd/nfs4state.c 					NFS4_OPEN_STID, &stp, nn);
nn               5917 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               5928 fs/nfsd/nfs4state.c 					&od->od_stateid, &stp, nn);
nn               5987 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               5995 fs/nfsd/nfs4state.c 					&stp, nn);
nn               6037 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               6042 fs/nfsd/nfs4state.c 	status = nfsd4_lookup_stateid(cstate, stateid, NFS4_DELEG_STID, &s, nn);
nn               6117 fs/nfsd/nfs4state.c 	struct nfsd_net			*nn = net_generic(net, nfsd_net_id);
nn               6123 fs/nfsd/nfs4state.c 	spin_lock(&nn->blocked_locks_lock);
nn               6129 fs/nfsd/nfs4state.c 	spin_unlock(&nn->blocked_locks_lock);
nn               6430 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               6453 fs/nfsd/nfs4state.c 		if (STALE_CLIENTID(&lock->lk_new_clientid, nn))
nn               6460 fs/nfsd/nfs4state.c 					&open_stp, nn);
nn               6475 fs/nfsd/nfs4state.c 				       NFS4_LOCK_STID, &lock_stp, nn);
nn               6529 fs/nfsd/nfs4state.c 	nbl = find_or_allocate_block(lock_sop, &fp->fi_fhandle, nn);
nn               6556 fs/nfsd/nfs4state.c 		spin_lock(&nn->blocked_locks_lock);
nn               6558 fs/nfsd/nfs4state.c 		list_add_tail(&nbl->nbl_lru, &nn->blocked_locks_lru);
nn               6559 fs/nfsd/nfs4state.c 		spin_unlock(&nn->blocked_locks_lock);
nn               6568 fs/nfsd/nfs4state.c 			nn->somebody_reclaimed = true;
nn               6590 fs/nfsd/nfs4state.c 			spin_lock(&nn->blocked_locks_lock);
nn               6593 fs/nfsd/nfs4state.c 			spin_unlock(&nn->blocked_locks_lock);
nn               6653 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               6662 fs/nfsd/nfs4state.c 		status = lookup_clientid(&lockt->lt_clientid, cstate, nn);
nn               6729 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               6740 fs/nfsd/nfs4state.c 					&stp, nn);
nn               6839 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               6846 fs/nfsd/nfs4state.c 	status = lookup_clientid(clid, cstate, nn);
nn               6900 fs/nfsd/nfs4state.c nfs4_has_reclaimed_state(struct xdr_netobj name, struct nfsd_net *nn)
nn               6904 fs/nfsd/nfs4state.c 	crp = nfsd4_find_reclaim_client(name, nn);
nn               6916 fs/nfsd/nfs4state.c 		struct nfsd_net *nn)
nn               6926 fs/nfsd/nfs4state.c 		list_add(&crp->cr_strhash, &nn->reclaim_str_hashtbl[strhashval]);
nn               6932 fs/nfsd/nfs4state.c 		nn->reclaim_str_hashtbl_size++;
nn               6938 fs/nfsd/nfs4state.c nfs4_remove_reclaim_record(struct nfs4_client_reclaim *crp, struct nfsd_net *nn)
nn               6944 fs/nfsd/nfs4state.c 	nn->reclaim_str_hashtbl_size--;
nn               6948 fs/nfsd/nfs4state.c nfs4_release_reclaim(struct nfsd_net *nn)
nn               6954 fs/nfsd/nfs4state.c 		while (!list_empty(&nn->reclaim_str_hashtbl[i])) {
nn               6955 fs/nfsd/nfs4state.c 			crp = list_entry(nn->reclaim_str_hashtbl[i].next,
nn               6957 fs/nfsd/nfs4state.c 			nfs4_remove_reclaim_record(crp, nn);
nn               6960 fs/nfsd/nfs4state.c 	WARN_ON_ONCE(nn->reclaim_str_hashtbl_size);
nn               6966 fs/nfsd/nfs4state.c nfsd4_find_reclaim_client(struct xdr_netobj name, struct nfsd_net *nn)
nn               6974 fs/nfsd/nfs4state.c 	list_for_each_entry(crp, &nn->reclaim_str_hashtbl[strhashval], cr_strhash) {
nn               6988 fs/nfsd/nfs4state.c 		struct nfsd_net *nn)
nn               6993 fs/nfsd/nfs4state.c 	status = lookup_clientid(clid, cstate, nn);
nn               7017 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7020 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7023 fs/nfsd/nfs4state.c 	list_for_each_entry(clp, &nn->client_lru, cl_lru) {
nn               7035 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7039 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7042 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7043 fs/nfsd/nfs4state.c 	list_for_each_entry(clp, &nn->client_lru, cl_lru) {
nn               7048 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7058 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7061 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7064 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7072 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7085 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7089 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7092 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7093 fs/nfsd/nfs4state.c 	list_for_each_entry_safe(clp, next, &nn->client_lru, cl_lru) {
nn               7100 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7121 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7127 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               7192 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7195 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7198 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7199 fs/nfsd/nfs4state.c 	list_for_each_entry(clp, &nn->client_lru, cl_lru)
nn               7201 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7225 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7229 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7232 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7236 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7246 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7250 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7253 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7254 fs/nfsd/nfs4state.c 	list_for_each_entry(clp, &nn->client_lru, cl_lru) {
nn               7259 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7270 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7274 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               7323 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7326 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7329 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7330 fs/nfsd/nfs4state.c 	list_for_each_entry(clp, &nn->client_lru, cl_lru)
nn               7332 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7357 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7361 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7364 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7368 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7378 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7382 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7385 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7386 fs/nfsd/nfs4state.c 	list_for_each_entry(clp, &nn->client_lru, cl_lru) {
nn               7392 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7401 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7405 fs/nfsd/nfs4state.c 	lockdep_assert_held(&nn->client_lock);
nn               7452 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7455 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7458 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7459 fs/nfsd/nfs4state.c 	list_for_each_entry(clp, &nn->client_lru, cl_lru)
nn               7461 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7486 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7490 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7493 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7497 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7508 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7512 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7515 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7516 fs/nfsd/nfs4state.c 	list_for_each_entry(clp, &nn->client_lru, cl_lru) {
nn               7521 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7555 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7559 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7562 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7566 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7577 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               7581 fs/nfsd/nfs4state.c 	if (!nfsd_netns_ready(nn))
nn               7584 fs/nfsd/nfs4state.c 	spin_lock(&nn->client_lock);
nn               7585 fs/nfsd/nfs4state.c 	list_for_each_entry_safe(clp, next, &nn->client_lru, cl_lru) {
nn               7590 fs/nfsd/nfs4state.c 	spin_unlock(&nn->client_lock);
nn               7619 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               7622 fs/nfsd/nfs4state.c 	nn->conf_id_hashtbl = kmalloc_array(CLIENT_HASH_SIZE,
nn               7625 fs/nfsd/nfs4state.c 	if (!nn->conf_id_hashtbl)
nn               7627 fs/nfsd/nfs4state.c 	nn->unconf_id_hashtbl = kmalloc_array(CLIENT_HASH_SIZE,
nn               7630 fs/nfsd/nfs4state.c 	if (!nn->unconf_id_hashtbl)
nn               7632 fs/nfsd/nfs4state.c 	nn->sessionid_hashtbl = kmalloc_array(SESSION_HASH_SIZE,
nn               7635 fs/nfsd/nfs4state.c 	if (!nn->sessionid_hashtbl)
nn               7639 fs/nfsd/nfs4state.c 		INIT_LIST_HEAD(&nn->conf_id_hashtbl[i]);
nn               7640 fs/nfsd/nfs4state.c 		INIT_LIST_HEAD(&nn->unconf_id_hashtbl[i]);
nn               7643 fs/nfsd/nfs4state.c 		INIT_LIST_HEAD(&nn->sessionid_hashtbl[i]);
nn               7644 fs/nfsd/nfs4state.c 	nn->conf_name_tree = RB_ROOT;
nn               7645 fs/nfsd/nfs4state.c 	nn->unconf_name_tree = RB_ROOT;
nn               7646 fs/nfsd/nfs4state.c 	nn->boot_time = get_seconds();
nn               7647 fs/nfsd/nfs4state.c 	nn->grace_ended = false;
nn               7648 fs/nfsd/nfs4state.c 	nn->nfsd4_manager.block_opens = true;
nn               7649 fs/nfsd/nfs4state.c 	INIT_LIST_HEAD(&nn->nfsd4_manager.list);
nn               7650 fs/nfsd/nfs4state.c 	INIT_LIST_HEAD(&nn->client_lru);
nn               7651 fs/nfsd/nfs4state.c 	INIT_LIST_HEAD(&nn->close_lru);
nn               7652 fs/nfsd/nfs4state.c 	INIT_LIST_HEAD(&nn->del_recall_lru);
nn               7653 fs/nfsd/nfs4state.c 	spin_lock_init(&nn->client_lock);
nn               7654 fs/nfsd/nfs4state.c 	spin_lock_init(&nn->s2s_cp_lock);
nn               7655 fs/nfsd/nfs4state.c 	idr_init(&nn->s2s_cp_stateids);
nn               7657 fs/nfsd/nfs4state.c 	spin_lock_init(&nn->blocked_locks_lock);
nn               7658 fs/nfsd/nfs4state.c 	INIT_LIST_HEAD(&nn->blocked_locks_lru);
nn               7660 fs/nfsd/nfs4state.c 	INIT_DELAYED_WORK(&nn->laundromat_work, laundromat_main);
nn               7666 fs/nfsd/nfs4state.c 	kfree(nn->unconf_id_hashtbl);
nn               7668 fs/nfsd/nfs4state.c 	kfree(nn->conf_id_hashtbl);
nn               7678 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               7681 fs/nfsd/nfs4state.c 		while (!list_empty(&nn->conf_id_hashtbl[i])) {
nn               7682 fs/nfsd/nfs4state.c 			clp = list_entry(nn->conf_id_hashtbl[i].next, struct nfs4_client, cl_idhash);
nn               7687 fs/nfsd/nfs4state.c 	WARN_ON(!list_empty(&nn->blocked_locks_lru));
nn               7690 fs/nfsd/nfs4state.c 		while (!list_empty(&nn->unconf_id_hashtbl[i])) {
nn               7691 fs/nfsd/nfs4state.c 			clp = list_entry(nn->unconf_id_hashtbl[i].next, struct nfs4_client, cl_idhash);
nn               7696 fs/nfsd/nfs4state.c 	kfree(nn->sessionid_hashtbl);
nn               7697 fs/nfsd/nfs4state.c 	kfree(nn->unconf_id_hashtbl);
nn               7698 fs/nfsd/nfs4state.c 	kfree(nn->conf_id_hashtbl);
nn               7705 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               7711 fs/nfsd/nfs4state.c 	locks_start_grace(net, &nn->nfsd4_manager);
nn               7713 fs/nfsd/nfs4state.c 	if (nn->track_reclaim_completes && nn->reclaim_str_hashtbl_size == 0)
nn               7716 fs/nfsd/nfs4state.c 	       nn->nfsd4_grace, net->ns.inum);
nn               7717 fs/nfsd/nfs4state.c 	queue_delayed_work(laundry_wq, &nn->laundromat_work, nn->nfsd4_grace * HZ);
nn               7723 fs/nfsd/nfs4state.c 	queue_delayed_work(laundry_wq, &nn->laundromat_work, nn->nfsd4_lease * HZ);
nn               7724 fs/nfsd/nfs4state.c 	nfsd4_end_grace(nn);
nn               7758 fs/nfsd/nfs4state.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               7760 fs/nfsd/nfs4state.c 	cancel_delayed_work_sync(&nn->laundromat_work);
nn               7761 fs/nfsd/nfs4state.c 	locks_end_grace(&nn->nfsd4_manager);
nn               7765 fs/nfsd/nfs4state.c 	list_for_each_safe(pos, next, &nn->del_recall_lru) {
nn               2434 fs/nfsd/nfs4xdr.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn               2617 fs/nfsd/nfs4xdr.c 		*p++ = cpu_to_be32(nn->nfsd4_lease);
nn                 87 fs/nfsd/nfscache.c nfsd_cache_hash(__be32 xid, struct nfsd_net *nn)
nn                 89 fs/nfsd/nfscache.c 	return hash_32(be32_to_cpu(xid), nn->maskbits);
nn                 94 fs/nfsd/nfscache.c 			struct nfsd_net *nn)
nn                 98 fs/nfsd/nfscache.c 	rp = kmem_cache_alloc(nn->drc_slab, GFP_KERNEL);
nn                120 fs/nfsd/nfscache.c 				struct nfsd_net *nn)
nn                123 fs/nfsd/nfscache.c 		nn->drc_mem_usage -= rp->c_replvec.iov_len;
nn                129 fs/nfsd/nfscache.c 		atomic_dec(&nn->num_drc_entries);
nn                130 fs/nfsd/nfscache.c 		nn->drc_mem_usage -= sizeof(*rp);
nn                132 fs/nfsd/nfscache.c 	kmem_cache_free(nn->drc_slab, rp);
nn                137 fs/nfsd/nfscache.c 			struct nfsd_net *nn)
nn                140 fs/nfsd/nfscache.c 	nfsd_reply_cache_free_locked(b, rp, nn);
nn                144 fs/nfsd/nfscache.c int nfsd_reply_cache_init(struct nfsd_net *nn)
nn                150 fs/nfsd/nfscache.c 	nn->max_drc_entries = nfsd_cache_size_limit();
nn                151 fs/nfsd/nfscache.c 	atomic_set(&nn->num_drc_entries, 0);
nn                152 fs/nfsd/nfscache.c 	hashsize = nfsd_hashsize(nn->max_drc_entries);
nn                153 fs/nfsd/nfscache.c 	nn->maskbits = ilog2(hashsize);
nn                155 fs/nfsd/nfscache.c 	nn->nfsd_reply_cache_shrinker.scan_objects = nfsd_reply_cache_scan;
nn                156 fs/nfsd/nfscache.c 	nn->nfsd_reply_cache_shrinker.count_objects = nfsd_reply_cache_count;
nn                157 fs/nfsd/nfscache.c 	nn->nfsd_reply_cache_shrinker.seeks = 1;
nn                158 fs/nfsd/nfscache.c 	status = register_shrinker(&nn->nfsd_reply_cache_shrinker);
nn                162 fs/nfsd/nfscache.c 	nn->drc_slab = kmem_cache_create("nfsd_drc",
nn                164 fs/nfsd/nfscache.c 	if (!nn->drc_slab)
nn                167 fs/nfsd/nfscache.c 	nn->drc_hashtbl = kcalloc(hashsize,
nn                168 fs/nfsd/nfscache.c 				sizeof(*nn->drc_hashtbl), GFP_KERNEL);
nn                169 fs/nfsd/nfscache.c 	if (!nn->drc_hashtbl) {
nn                170 fs/nfsd/nfscache.c 		nn->drc_hashtbl = vzalloc(array_size(hashsize,
nn                171 fs/nfsd/nfscache.c 						 sizeof(*nn->drc_hashtbl)));
nn                172 fs/nfsd/nfscache.c 		if (!nn->drc_hashtbl)
nn                177 fs/nfsd/nfscache.c 		INIT_LIST_HEAD(&nn->drc_hashtbl[i].lru_head);
nn                178 fs/nfsd/nfscache.c 		spin_lock_init(&nn->drc_hashtbl[i].cache_lock);
nn                180 fs/nfsd/nfscache.c 	nn->drc_hashsize = hashsize;
nn                184 fs/nfsd/nfscache.c 	kmem_cache_destroy(nn->drc_slab);
nn                186 fs/nfsd/nfscache.c 	unregister_shrinker(&nn->nfsd_reply_cache_shrinker);
nn                192 fs/nfsd/nfscache.c void nfsd_reply_cache_shutdown(struct nfsd_net *nn)
nn                197 fs/nfsd/nfscache.c 	unregister_shrinker(&nn->nfsd_reply_cache_shrinker);
nn                199 fs/nfsd/nfscache.c 	for (i = 0; i < nn->drc_hashsize; i++) {
nn                200 fs/nfsd/nfscache.c 		struct list_head *head = &nn->drc_hashtbl[i].lru_head;
nn                203 fs/nfsd/nfscache.c 			nfsd_reply_cache_free_locked(&nn->drc_hashtbl[i],
nn                204 fs/nfsd/nfscache.c 									rp, nn);
nn                208 fs/nfsd/nfscache.c 	kvfree(nn->drc_hashtbl);
nn                209 fs/nfsd/nfscache.c 	nn->drc_hashtbl = NULL;
nn                210 fs/nfsd/nfscache.c 	nn->drc_hashsize = 0;
nn                212 fs/nfsd/nfscache.c 	kmem_cache_destroy(nn->drc_slab);
nn                213 fs/nfsd/nfscache.c 	nn->drc_slab = NULL;
nn                228 fs/nfsd/nfscache.c prune_bucket(struct nfsd_drc_bucket *b, struct nfsd_net *nn)
nn                240 fs/nfsd/nfscache.c 		if (atomic_read(&nn->num_drc_entries) <= nn->max_drc_entries &&
nn                243 fs/nfsd/nfscache.c 		nfsd_reply_cache_free_locked(b, rp, nn);
nn                254 fs/nfsd/nfscache.c prune_cache_entries(struct nfsd_net *nn)
nn                259 fs/nfsd/nfscache.c 	for (i = 0; i < nn->drc_hashsize; i++) {
nn                260 fs/nfsd/nfscache.c 		struct nfsd_drc_bucket *b = &nn->drc_hashtbl[i];
nn                265 fs/nfsd/nfscache.c 		freed += prune_bucket(b, nn);
nn                274 fs/nfsd/nfscache.c 	struct nfsd_net *nn = container_of(shrink,
nn                277 fs/nfsd/nfscache.c 	return atomic_read(&nn->num_drc_entries);
nn                283 fs/nfsd/nfscache.c 	struct nfsd_net *nn = container_of(shrink,
nn                286 fs/nfsd/nfscache.c 	return prune_cache_entries(nn);
nn                323 fs/nfsd/nfscache.c 			const struct svc_cacherep *rp, struct nfsd_net *nn)
nn                327 fs/nfsd/nfscache.c 		++nn->payload_misses;
nn                339 fs/nfsd/nfscache.c 			struct nfsd_net *nn)
nn                352 fs/nfsd/nfscache.c 		cmp = nfsd_cache_key_cmp(key, rp, nn);
nn                366 fs/nfsd/nfscache.c 	if (entries > nn->longest_chain) {
nn                367 fs/nfsd/nfscache.c 		nn->longest_chain = entries;
nn                368 fs/nfsd/nfscache.c 		nn->longest_chain_cachesize = atomic_read(&nn->num_drc_entries);
nn                369 fs/nfsd/nfscache.c 	} else if (entries == nn->longest_chain) {
nn                371 fs/nfsd/nfscache.c 		nn->longest_chain_cachesize = min_t(unsigned int,
nn                372 fs/nfsd/nfscache.c 				nn->longest_chain_cachesize,
nn                373 fs/nfsd/nfscache.c 				atomic_read(&nn->num_drc_entries));
nn                390 fs/nfsd/nfscache.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn                394 fs/nfsd/nfscache.c 	u32 hash = nfsd_cache_hash(xid, nn);
nn                395 fs/nfsd/nfscache.c 	struct nfsd_drc_bucket *b = &nn->drc_hashtbl[hash];
nn                411 fs/nfsd/nfscache.c 	rp = nfsd_reply_cache_alloc(rqstp, csum, nn);
nn                418 fs/nfsd/nfscache.c 	found = nfsd_cache_insert(b, rp, nn);
nn                420 fs/nfsd/nfscache.c 		nfsd_reply_cache_free_locked(NULL, rp, nn);
nn                429 fs/nfsd/nfscache.c 	atomic_inc(&nn->num_drc_entries);
nn                430 fs/nfsd/nfscache.c 	nn->drc_mem_usage += sizeof(*rp);
nn                433 fs/nfsd/nfscache.c 	prune_bucket(b, nn);
nn                468 fs/nfsd/nfscache.c 		nfsd_reply_cache_free_locked(b, rp, nn);
nn                493 fs/nfsd/nfscache.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn                504 fs/nfsd/nfscache.c 	hash = nfsd_cache_hash(rp->c_key.k_xid, nn);
nn                505 fs/nfsd/nfscache.c 	b = &nn->drc_hashtbl[hash];
nn                512 fs/nfsd/nfscache.c 		nfsd_reply_cache_free(b, rp, nn);
nn                527 fs/nfsd/nfscache.c 			nfsd_reply_cache_free(b, rp, nn);
nn                534 fs/nfsd/nfscache.c 		nfsd_reply_cache_free(b, rp, nn);
nn                538 fs/nfsd/nfscache.c 	nn->drc_mem_usage += bufsize;
nn                574 fs/nfsd/nfscache.c 	struct nfsd_net *nn = m->private;
nn                576 fs/nfsd/nfscache.c 	seq_printf(m, "max entries:           %u\n", nn->max_drc_entries);
nn                578 fs/nfsd/nfscache.c 			atomic_read(&nn->num_drc_entries));
nn                579 fs/nfsd/nfscache.c 	seq_printf(m, "hash buckets:          %u\n", 1 << nn->maskbits);
nn                580 fs/nfsd/nfscache.c 	seq_printf(m, "mem usage:             %u\n", nn->drc_mem_usage);
nn                584 fs/nfsd/nfscache.c 	seq_printf(m, "payload misses:        %u\n", nn->payload_misses);
nn                585 fs/nfsd/nfscache.c 	seq_printf(m, "longest chain len:     %u\n", nn->longest_chain);
nn                586 fs/nfsd/nfscache.c 	seq_printf(m, "cachesize at longest:  %u\n", nn->longest_chain_cachesize);
nn                592 fs/nfsd/nfscache.c 	struct nfsd_net *nn = net_generic(file_inode(file)->i_sb->s_fs_info,
nn                595 fs/nfsd/nfscache.c 	return single_open(file, nfsd_reply_cache_stats_show, nn);
nn                144 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                151 fs/nfsd/nfsctl.c 	seq->private = nn->svc_export_cache;
nn                544 fs/nfsd/nfsctl.c nfsd_print_version_support(struct nfsd_net *nn, char *buf, int remaining,
nn                548 fs/nfsd/nfsctl.c 	bool supported = !!nfsd_vers(nn, vers, NFSD_TEST);
nn                551 fs/nfsd/nfsctl.c 	    !nfsd_minorversion(nn, minor, NFSD_TEST))
nn                571 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(netns(file), nfsd_net_id);
nn                574 fs/nfsd/nfsctl.c 		if (nn->nfsd_serv)
nn                606 fs/nfsd/nfsctl.c 				nfsd_vers(nn, num, cmd);
nn                610 fs/nfsd/nfsctl.c 					if (nfsd_minorversion(nn, minor, cmd) < 0)
nn                612 fs/nfsd/nfsctl.c 				} else if ((cmd == NFSD_SET) != nfsd_vers(nn, num, NFSD_TEST)) {
nn                619 fs/nfsd/nfsctl.c 					while (nfsd_minorversion(nn, minor, cmd) >= 0)
nn                631 fs/nfsd/nfsctl.c 		nfsd_reset_versions(nn);
nn                640 fs/nfsd/nfsctl.c 		if (!nfsd_vers(nn, num, NFSD_AVAIL))
nn                645 fs/nfsd/nfsctl.c 			len = nfsd_print_version_support(nn, buf, remaining,
nn                712 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                714 fs/nfsd/nfsctl.c 	if (nn->nfsd_serv == NULL)
nn                716 fs/nfsd/nfsctl.c 	return svc_xprt_names(nn->nfsd_serv, buf, SIMPLE_TRANSACTION_LIMIT);
nn                728 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                743 fs/nfsd/nfsctl.c 	err = svc_addsock(nn->nfsd_serv, fd, buf, SIMPLE_TRANSACTION_LIMIT, cred);
nn                750 fs/nfsd/nfsctl.c 	nn->nfsd_serv->sv_nrthreads--;
nn                763 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                775 fs/nfsd/nfsctl.c 	err = svc_create_xprt(nn->nfsd_serv, transport, net,
nn                780 fs/nfsd/nfsctl.c 	err = svc_create_xprt(nn->nfsd_serv, transport, net,
nn                786 fs/nfsd/nfsctl.c 	nn->nfsd_serv->sv_nrthreads--;
nn                789 fs/nfsd/nfsctl.c 	xprt = svc_find_xprt(nn->nfsd_serv, transport, net, PF_INET, port);
nn                894 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(netns(file), nfsd_net_id);
nn                908 fs/nfsd/nfsctl.c 		if (nn->nfsd_serv) {
nn                943 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(netns(file), nfsd_net_id);
nn                944 fs/nfsd/nfsctl.c 	unsigned int maxconn = nn->max_connections;
nn                951 fs/nfsd/nfsctl.c 		nn->max_connections = maxconn;
nn                959 fs/nfsd/nfsctl.c 				  time_t *time, struct nfsd_net *nn)
nn                965 fs/nfsd/nfsctl.c 		if (nn->nfsd_serv)
nn                991 fs/nfsd/nfsctl.c 				time_t *time, struct nfsd_net *nn)
nn                996 fs/nfsd/nfsctl.c 	rv = __nfsd4_write_time(file, buf, size, time, nn);
nn               1024 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(netns(file), nfsd_net_id);
nn               1025 fs/nfsd/nfsctl.c 	return nfsd4_write_time(file, buf, size, &nn->nfsd4_lease, nn);
nn               1040 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(netns(file), nfsd_net_id);
nn               1041 fs/nfsd/nfsctl.c 	return nfsd4_write_time(file, buf, size, &nn->nfsd4_grace, nn);
nn               1045 fs/nfsd/nfsctl.c 				   struct nfsd_net *nn)
nn               1052 fs/nfsd/nfsctl.c 		if (nn->nfsd_serv)
nn               1096 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(netns(file), nfsd_net_id);
nn               1099 fs/nfsd/nfsctl.c 	rv = __write_recoverydir(file, buf, size, nn);
nn               1126 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(netns(file), nfsd_net_id);
nn               1133 fs/nfsd/nfsctl.c 			if (!nn->nfsd_serv)
nn               1135 fs/nfsd/nfsctl.c 			nfsd4_end_grace(nn);
nn               1143 fs/nfsd/nfsctl.c 			 nn->grace_ended ? 'Y' : 'N');
nn               1302 fs/nfsd/nfsctl.c struct dentry *nfsd_client_mkdir(struct nfsd_net *nn,
nn               1312 fs/nfsd/nfsctl.c 	dentry = nfsd_mkdir(nn->nfsd_client_dir, ncl, name);
nn               1343 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
nn               1383 fs/nfsd/nfsctl.c 	nn->nfsd_client_dir = dentry;
nn               1456 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1464 fs/nfsd/nfsctl.c 	nn->nfsd_versions = NULL;
nn               1465 fs/nfsd/nfsctl.c 	nn->nfsd4_minorversions = NULL;
nn               1466 fs/nfsd/nfsctl.c 	retval = nfsd_reply_cache_init(nn);
nn               1469 fs/nfsd/nfsctl.c 	nn->nfsd4_lease = 90;	/* default lease time */
nn               1470 fs/nfsd/nfsctl.c 	nn->nfsd4_grace = 90;
nn               1471 fs/nfsd/nfsctl.c 	nn->somebody_reclaimed = false;
nn               1472 fs/nfsd/nfsctl.c 	nn->track_reclaim_completes = false;
nn               1473 fs/nfsd/nfsctl.c 	nn->clverifier_counter = prandom_u32();
nn               1474 fs/nfsd/nfsctl.c 	nn->clientid_base = prandom_u32();
nn               1475 fs/nfsd/nfsctl.c 	nn->clientid_counter = nn->clientid_base + 1;
nn               1476 fs/nfsd/nfsctl.c 	nn->s2s_cp_cl_id = nn->clientid_counter++;
nn               1478 fs/nfsd/nfsctl.c 	atomic_set(&nn->ntf_refcnt, 0);
nn               1479 fs/nfsd/nfsctl.c 	init_waitqueue_head(&nn->ntf_wq);
nn               1480 fs/nfsd/nfsctl.c 	seqlock_init(&nn->boot_lock);
nn               1487 fs/nfsd/nfsctl.c 	nn->nfsd_mnt = mnt;
nn               1491 fs/nfsd/nfsctl.c 	nfsd_reply_cache_shutdown(nn);
nn               1502 fs/nfsd/nfsctl.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn               1504 fs/nfsd/nfsctl.c 	mntput(nn->nfsd_mnt);
nn               1505 fs/nfsd/nfsctl.c 	nfsd_reply_cache_shutdown(nn);
nn                 96 fs/nfsd/nfsd.h struct dentry *nfsd_client_mkdir(struct nfsd_net *nn,
nn                116 fs/nfsd/nfsd.h int nfsd_vers(struct nfsd_net *nn, int vers, enum vers_op change);
nn                117 fs/nfsd/nfsd.h int nfsd_minorversion(struct nfsd_net *nn, u32 minorversion, enum vers_op change);
nn                118 fs/nfsd/nfsd.h void nfsd_reset_versions(struct nfsd_net *nn);
nn                182 fs/nfsd/nfssvc.c nfsd_netns_free_versions(struct nfsd_net *nn)
nn                184 fs/nfsd/nfssvc.c 	kfree(nn->nfsd_versions);
nn                185 fs/nfsd/nfssvc.c 	kfree(nn->nfsd4_minorversions);
nn                186 fs/nfsd/nfssvc.c 	nn->nfsd_versions = NULL;
nn                187 fs/nfsd/nfssvc.c 	nn->nfsd4_minorversions = NULL;
nn                191 fs/nfsd/nfssvc.c nfsd_netns_init_versions(struct nfsd_net *nn)
nn                193 fs/nfsd/nfssvc.c 	if (!nn->nfsd_versions) {
nn                194 fs/nfsd/nfssvc.c 		nn->nfsd_versions = nfsd_alloc_versions();
nn                195 fs/nfsd/nfssvc.c 		nn->nfsd4_minorversions = nfsd_alloc_minorversions();
nn                196 fs/nfsd/nfssvc.c 		if (!nn->nfsd_versions || !nn->nfsd4_minorversions)
nn                197 fs/nfsd/nfssvc.c 			nfsd_netns_free_versions(nn);
nn                201 fs/nfsd/nfssvc.c int nfsd_vers(struct nfsd_net *nn, int vers, enum vers_op change)
nn                207 fs/nfsd/nfssvc.c 		if (nn->nfsd_versions)
nn                208 fs/nfsd/nfssvc.c 			nn->nfsd_versions[vers] = nfsd_support_version(vers);
nn                211 fs/nfsd/nfssvc.c 		nfsd_netns_init_versions(nn);
nn                212 fs/nfsd/nfssvc.c 		if (nn->nfsd_versions)
nn                213 fs/nfsd/nfssvc.c 			nn->nfsd_versions[vers] = false;
nn                216 fs/nfsd/nfssvc.c 		if (nn->nfsd_versions)
nn                217 fs/nfsd/nfssvc.c 			return nn->nfsd_versions[vers];
nn                226 fs/nfsd/nfssvc.c nfsd_adjust_nfsd_versions4(struct nfsd_net *nn)
nn                231 fs/nfsd/nfssvc.c 		if (nn->nfsd4_minorversions[i])
nn                234 fs/nfsd/nfssvc.c 	nfsd_vers(nn, 4, NFSD_CLEAR);
nn                237 fs/nfsd/nfssvc.c int nfsd_minorversion(struct nfsd_net *nn, u32 minorversion, enum vers_op change)
nn                245 fs/nfsd/nfssvc.c 		if (nn->nfsd4_minorversions) {
nn                246 fs/nfsd/nfssvc.c 			nfsd_vers(nn, 4, NFSD_SET);
nn                247 fs/nfsd/nfssvc.c 			nn->nfsd4_minorversions[minorversion] =
nn                248 fs/nfsd/nfssvc.c 				nfsd_vers(nn, 4, NFSD_TEST);
nn                252 fs/nfsd/nfssvc.c 		nfsd_netns_init_versions(nn);
nn                253 fs/nfsd/nfssvc.c 		if (nn->nfsd4_minorversions) {
nn                254 fs/nfsd/nfssvc.c 			nn->nfsd4_minorversions[minorversion] = false;
nn                255 fs/nfsd/nfssvc.c 			nfsd_adjust_nfsd_versions4(nn);
nn                259 fs/nfsd/nfssvc.c 		if (nn->nfsd4_minorversions)
nn                260 fs/nfsd/nfssvc.c 			return nn->nfsd4_minorversions[minorversion];
nn                261 fs/nfsd/nfssvc.c 		return nfsd_vers(nn, 4, NFSD_TEST);
nn                264 fs/nfsd/nfssvc.c 			nfsd_vers(nn, 4, NFSD_AVAIL);
nn                277 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                280 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv)
nn                281 fs/nfsd/nfssvc.c 		rv = nn->nfsd_serv->sv_nrthreads;
nn                289 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                291 fs/nfsd/nfssvc.c 	if (!list_empty(&nn->nfsd_serv->sv_permsocks))
nn                294 fs/nfsd/nfssvc.c 	error = svc_create_xprt(nn->nfsd_serv, "udp", net, PF_INET, NFS_PORT,
nn                299 fs/nfsd/nfssvc.c 	error = svc_create_xprt(nn->nfsd_serv, "tcp", net, PF_INET, NFS_PORT,
nn                341 fs/nfsd/nfssvc.c static bool nfsd_needs_lockd(struct nfsd_net *nn)
nn                343 fs/nfsd/nfssvc.c 	return nfsd_vers(nn, 2, NFSD_TEST) || nfsd_vers(nn, 3, NFSD_TEST);
nn                346 fs/nfsd/nfssvc.c void nfsd_copy_boot_verifier(__be32 verf[2], struct nfsd_net *nn)
nn                351 fs/nfsd/nfssvc.c 		read_seqbegin_or_lock(&nn->boot_lock, &seq);
nn                357 fs/nfsd/nfssvc.c 		verf[0] = (__force __be32)nn->nfssvc_boot.tv_sec;
nn                358 fs/nfsd/nfssvc.c 		verf[1] = (__force __be32)nn->nfssvc_boot.tv_nsec;
nn                359 fs/nfsd/nfssvc.c 	} while (need_seqretry(&nn->boot_lock, seq));
nn                360 fs/nfsd/nfssvc.c 	done_seqretry(&nn->boot_lock, seq);
nn                363 fs/nfsd/nfssvc.c static void nfsd_reset_boot_verifier_locked(struct nfsd_net *nn)
nn                365 fs/nfsd/nfssvc.c 	ktime_get_real_ts64(&nn->nfssvc_boot);
nn                368 fs/nfsd/nfssvc.c void nfsd_reset_boot_verifier(struct nfsd_net *nn)
nn                370 fs/nfsd/nfssvc.c 	write_seqlock(&nn->boot_lock);
nn                371 fs/nfsd/nfssvc.c 	nfsd_reset_boot_verifier_locked(nn);
nn                372 fs/nfsd/nfssvc.c 	write_sequnlock(&nn->boot_lock);
nn                377 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                380 fs/nfsd/nfssvc.c 	if (nn->nfsd_net_up)
nn                390 fs/nfsd/nfssvc.c 	if (nfsd_needs_lockd(nn) && !nn->lockd_up) {
nn                394 fs/nfsd/nfssvc.c 		nn->lockd_up = 1;
nn                401 fs/nfsd/nfssvc.c 	nn->nfsd_net_up = true;
nn                405 fs/nfsd/nfssvc.c 	if (nn->lockd_up) {
nn                407 fs/nfsd/nfssvc.c 		nn->lockd_up = 0;
nn                416 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                420 fs/nfsd/nfssvc.c 	if (nn->lockd_up) {
nn                422 fs/nfsd/nfssvc.c 		nn->lockd_up = 0;
nn                424 fs/nfsd/nfssvc.c 	nn->nfsd_net_up = false;
nn                434 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                438 fs/nfsd/nfssvc.c 	    !atomic_inc_not_zero(&nn->ntf_refcnt))
nn                441 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv) {
nn                445 fs/nfsd/nfssvc.c 		svc_age_temp_xprts_now(nn->nfsd_serv, (struct sockaddr *)&sin);
nn                447 fs/nfsd/nfssvc.c 	atomic_dec(&nn->ntf_refcnt);
nn                448 fs/nfsd/nfssvc.c 	wake_up(&nn->ntf_wq);
nn                465 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                469 fs/nfsd/nfssvc.c 	    !atomic_inc_not_zero(&nn->ntf_refcnt))
nn                472 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv) {
nn                478 fs/nfsd/nfssvc.c 		svc_age_temp_xprts_now(nn->nfsd_serv, (struct sockaddr *)&sin6);
nn                480 fs/nfsd/nfssvc.c 	atomic_dec(&nn->ntf_refcnt);
nn                481 fs/nfsd/nfssvc.c 	wake_up(&nn->ntf_wq);
nn                496 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                498 fs/nfsd/nfssvc.c 	atomic_dec(&nn->ntf_refcnt);
nn                506 fs/nfsd/nfssvc.c 	wait_event(nn->ntf_wq, atomic_read(&nn->ntf_refcnt) == 0);
nn                515 fs/nfsd/nfssvc.c 	if (!nn->nfsd_net_up)
nn                524 fs/nfsd/nfssvc.c void nfsd_reset_versions(struct nfsd_net *nn)
nn                529 fs/nfsd/nfssvc.c 		if (nfsd_vers(nn, i, NFSD_TEST))
nn                534 fs/nfsd/nfssvc.c 			nfsd_vers(nn, i, NFSD_SET);
nn                537 fs/nfsd/nfssvc.c 			while (nfsd_minorversion(nn, minor, NFSD_SET) >= 0)
nn                596 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                599 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv) {
nn                600 fs/nfsd/nfssvc.c 		svc_get(nn->nfsd_serv);
nn                605 fs/nfsd/nfssvc.c 	nfsd_reset_versions(nn);
nn                606 fs/nfsd/nfssvc.c 	nn->nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize,
nn                608 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv == NULL)
nn                611 fs/nfsd/nfssvc.c 	nn->nfsd_serv->sv_maxconn = nn->max_connections;
nn                612 fs/nfsd/nfssvc.c 	error = svc_bind(nn->nfsd_serv, net);
nn                614 fs/nfsd/nfssvc.c 		svc_destroy(nn->nfsd_serv);
nn                626 fs/nfsd/nfssvc.c 	atomic_inc(&nn->ntf_refcnt);
nn                627 fs/nfsd/nfssvc.c 	nfsd_reset_boot_verifier(nn);
nn                633 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                635 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv == NULL)
nn                638 fs/nfsd/nfssvc.c 		return nn->nfsd_serv->sv_nrpools;
nn                644 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                646 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv != NULL) {
nn                647 fs/nfsd/nfssvc.c 		for (i = 0; i < nn->nfsd_serv->sv_nrpools && i < n; i++)
nn                648 fs/nfsd/nfssvc.c 			nthreads[i] = nn->nfsd_serv->sv_pools[i].sp_nrthreads;
nn                656 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                657 fs/nfsd/nfssvc.c 	int destroy = (nn->nfsd_serv->sv_nrthreads == 1);
nn                660 fs/nfsd/nfssvc.c 		svc_shutdown_net(nn->nfsd_serv, net);
nn                661 fs/nfsd/nfssvc.c 	svc_destroy(nn->nfsd_serv);
nn                663 fs/nfsd/nfssvc.c 		nn->nfsd_serv = NULL;
nn                671 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                675 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv == NULL || n <= 0)
nn                678 fs/nfsd/nfssvc.c 	if (n > nn->nfsd_serv->sv_nrpools)
nn                679 fs/nfsd/nfssvc.c 		n = nn->nfsd_serv->sv_nrpools;
nn                708 fs/nfsd/nfssvc.c 	svc_get(nn->nfsd_serv);
nn                710 fs/nfsd/nfssvc.c 		err = nn->nfsd_serv->sv_ops->svo_setup(nn->nfsd_serv,
nn                711 fs/nfsd/nfssvc.c 				&nn->nfsd_serv->sv_pools[i], nthreads[i]);
nn                729 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                738 fs/nfsd/nfssvc.c 	if (nrservs == 0 && nn->nfsd_serv == NULL)
nn                745 fs/nfsd/nfssvc.c 	nfsd_up_before = nn->nfsd_net_up;
nn                750 fs/nfsd/nfssvc.c 	error = nn->nfsd_serv->sv_ops->svo_setup(nn->nfsd_serv,
nn                758 fs/nfsd/nfssvc.c 	error = nn->nfsd_serv->sv_nrthreads - 1;
nn                795 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn                799 fs/nfsd/nfssvc.c 	    nfsd_vers(nn, rqstp->rq_vers, NFSD_TEST)))
nn                805 fs/nfsd/nfssvc.c 		    nfsd_vers(nn, i, NFSD_TEST)) {
nn                815 fs/nfsd/nfssvc.c 		    nfsd_vers(nn, i, NFSD_TEST)) {
nn                840 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
nn                843 fs/nfsd/nfssvc.c 	if (likely(nfsd_vers(nn, rqstp->rq_vers, NFSD_TEST)))
nn                848 fs/nfsd/nfssvc.c 		if (nfsd_vers(nn, i, NFSD_TEST)) {
nn                857 fs/nfsd/nfssvc.c 		if (nfsd_vers(nn, i, NFSD_TEST)) {
nn                874 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(net, nfsd_net_id);
nn                909 fs/nfsd/nfssvc.c 		rqstp->rq_server->sv_maxconn = nn->max_connections;
nn               1063 fs/nfsd/nfssvc.c 	struct nfsd_net *nn = net_generic(inode->i_sb->s_fs_info, nfsd_net_id);
nn               1066 fs/nfsd/nfssvc.c 	if (nn->nfsd_serv == NULL) {
nn               1071 fs/nfsd/nfssvc.c 	svc_get(nn->nfsd_serv);
nn               1072 fs/nfsd/nfssvc.c 	ret = svc_pool_stats_open(nn->nfsd_serv, file);
nn                623 fs/nfsd/state.h 		     struct nfs4_stid **s, struct nfsd_net *nn);
nn                626 fs/nfsd/state.h int nfs4_init_cp_state(struct nfsd_net *nn, struct nfsd4_copy *copy);
nn                634 fs/nfsd/state.h 							struct nfsd_net *nn);
nn                636 fs/nfsd/state.h 		struct nfsd4_compound_state *cstate, struct nfsd_net *nn);
nn                649 fs/nfsd/state.h 				struct xdr_netobj princhash, struct nfsd_net *nn);
nn                650 fs/nfsd/state.h extern bool nfs4_has_reclaimed_state(struct xdr_netobj name, struct nfsd_net *nn);
nn                664 fs/nfsd/state.h void nfsd4_end_grace(struct nfsd_net *nn);
nn                672 fs/nfsd/state.h extern void nfsd4_record_grace_done(struct nfsd_net *nn);
nn                764 fs/nfsd/xdr4.h 		struct nfsd4_open *open, struct nfsd_net *nn);
nn                284 fs/ocfs2/cluster/tcp.c static u8 o2net_num_from_nn(struct o2net_node *nn)
nn                286 fs/ocfs2/cluster/tcp.c 	BUG_ON(nn == NULL);
nn                287 fs/ocfs2/cluster/tcp.c 	return nn - o2net_nodes;
nn                292 fs/ocfs2/cluster/tcp.c static int o2net_prep_nsw(struct o2net_node *nn, struct o2net_status_wait *nsw)
nn                296 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn                297 fs/ocfs2/cluster/tcp.c 	ret = idr_alloc(&nn->nn_status_idr, nsw, 0, 0, GFP_ATOMIC);
nn                300 fs/ocfs2/cluster/tcp.c 		list_add_tail(&nsw->ns_node_item, &nn->nn_status_list);
nn                302 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn                312 fs/ocfs2/cluster/tcp.c static void o2net_complete_nsw_locked(struct o2net_node *nn,
nn                317 fs/ocfs2/cluster/tcp.c 	assert_spin_locked(&nn->nn_lock);
nn                323 fs/ocfs2/cluster/tcp.c 		idr_remove(&nn->nn_status_idr, nsw->ns_id);
nn                328 fs/ocfs2/cluster/tcp.c static void o2net_complete_nsw(struct o2net_node *nn,
nn                333 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn                338 fs/ocfs2/cluster/tcp.c 		nsw = idr_find(&nn->nn_status_idr, id);
nn                343 fs/ocfs2/cluster/tcp.c 	o2net_complete_nsw_locked(nn, nsw, sys_status, status);
nn                346 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn                350 fs/ocfs2/cluster/tcp.c static void o2net_complete_nodes_nsw(struct o2net_node *nn)
nn                355 fs/ocfs2/cluster/tcp.c 	assert_spin_locked(&nn->nn_lock);
nn                357 fs/ocfs2/cluster/tcp.c 	list_for_each_entry_safe(nsw, tmp, &nn->nn_status_list, ns_node_item) {
nn                358 fs/ocfs2/cluster/tcp.c 		o2net_complete_nsw_locked(nn, nsw, O2NET_ERR_DIED, 0);
nn                363 fs/ocfs2/cluster/tcp.c 	     o2net_num_from_nn(nn));
nn                366 fs/ocfs2/cluster/tcp.c static int o2net_nsw_completed(struct o2net_node *nn,
nn                370 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn                372 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn                488 fs/ocfs2/cluster/tcp.c static void o2net_set_nn_state(struct o2net_node *nn,
nn                492 fs/ocfs2/cluster/tcp.c 	int was_valid = nn->nn_sc_valid;
nn                493 fs/ocfs2/cluster/tcp.c 	int was_err = nn->nn_persistent_error;
nn                494 fs/ocfs2/cluster/tcp.c 	struct o2net_sock_container *old_sc = nn->nn_sc;
nn                496 fs/ocfs2/cluster/tcp.c 	assert_spin_locked(&nn->nn_lock);
nn                505 fs/ocfs2/cluster/tcp.c 	BUG_ON(sc && nn->nn_sc && nn->nn_sc != sc);
nn                513 fs/ocfs2/cluster/tcp.c 	     o2net_num_from_nn(nn), nn->nn_sc, sc, nn->nn_sc_valid, valid,
nn                514 fs/ocfs2/cluster/tcp.c 	     nn->nn_persistent_error, err);
nn                516 fs/ocfs2/cluster/tcp.c 	nn->nn_sc = sc;
nn                517 fs/ocfs2/cluster/tcp.c 	nn->nn_sc_valid = valid ? 1 : 0;
nn                518 fs/ocfs2/cluster/tcp.c 	nn->nn_persistent_error = err;
nn                521 fs/ocfs2/cluster/tcp.c 	if (nn->nn_persistent_error || nn->nn_sc_valid)
nn                522 fs/ocfs2/cluster/tcp.c 		wake_up(&nn->nn_sc_wq);
nn                524 fs/ocfs2/cluster/tcp.c 	if (was_valid && !was_err && nn->nn_persistent_error) {
nn                525 fs/ocfs2/cluster/tcp.c 		o2quo_conn_err(o2net_num_from_nn(nn));
nn                526 fs/ocfs2/cluster/tcp.c 		queue_delayed_work(o2net_wq, &nn->nn_still_up,
nn                534 fs/ocfs2/cluster/tcp.c 		o2net_complete_nodes_nsw(nn);
nn                538 fs/ocfs2/cluster/tcp.c 		o2quo_conn_up(o2net_num_from_nn(nn));
nn                539 fs/ocfs2/cluster/tcp.c 		cancel_delayed_work(&nn->nn_connect_expired);
nn                554 fs/ocfs2/cluster/tcp.c 		delay = (nn->nn_last_connect_attempt +
nn                560 fs/ocfs2/cluster/tcp.c 		queue_delayed_work(o2net_wq, &nn->nn_connect_work, delay);
nn                572 fs/ocfs2/cluster/tcp.c 		queue_delayed_work(o2net_wq, &nn->nn_connect_expired, delay);
nn                695 fs/ocfs2/cluster/tcp.c static void o2net_ensure_shutdown(struct o2net_node *nn,
nn                699 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn                700 fs/ocfs2/cluster/tcp.c 	if (nn->nn_sc == sc)
nn                701 fs/ocfs2/cluster/tcp.c 		o2net_set_nn_state(nn, NULL, 0, err);
nn                702 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn                718 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
nn                734 fs/ocfs2/cluster/tcp.c 	o2net_ensure_shutdown(nn, sc, 0);
nn                935 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
nn                955 fs/ocfs2/cluster/tcp.c 		o2net_ensure_shutdown(nn, sc, 0);
nn                971 fs/ocfs2/cluster/tcp.c static int o2net_tx_can_proceed(struct o2net_node *nn,
nn                977 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn                978 fs/ocfs2/cluster/tcp.c 	if (nn->nn_persistent_error) {
nn                981 fs/ocfs2/cluster/tcp.c 		*error = nn->nn_persistent_error;
nn                982 fs/ocfs2/cluster/tcp.c 	} else if (nn->nn_sc_valid) {
nn                983 fs/ocfs2/cluster/tcp.c 		kref_get(&nn->nn_sc->sc_kref);
nn                986 fs/ocfs2/cluster/tcp.c 		*sc_ret = nn->nn_sc;
nn                989 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn               1022 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(target_node);
nn               1058 fs/ocfs2/cluster/tcp.c 	wait_event(nn->nn_sc_wq, o2net_tx_can_proceed(nn, &sc, &ret));
nn               1085 fs/ocfs2/cluster/tcp.c 	ret = o2net_prep_nsw(nn, &nsw);
nn               1108 fs/ocfs2/cluster/tcp.c 	wait_event(nsw.ns_wq, o2net_nsw_completed(nn, &nsw));
nn               1127 fs/ocfs2/cluster/tcp.c 	o2net_complete_nsw(nn, &nsw, 0, 0, 0);
nn               1171 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
nn               1184 fs/ocfs2/cluster/tcp.c 			o2net_complete_nsw(nn, NULL,
nn               1259 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
nn               1269 fs/ocfs2/cluster/tcp.c 		o2net_ensure_shutdown(nn, sc, -ENOTCONN);
nn               1285 fs/ocfs2/cluster/tcp.c 		o2net_ensure_shutdown(nn, sc, -ENOTCONN);
nn               1296 fs/ocfs2/cluster/tcp.c 		o2net_ensure_shutdown(nn, sc, -ENOTCONN);
nn               1307 fs/ocfs2/cluster/tcp.c 		o2net_ensure_shutdown(nn, sc, -ENOTCONN);
nn               1313 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn               1316 fs/ocfs2/cluster/tcp.c 	if (nn->nn_sc == sc) {
nn               1318 fs/ocfs2/cluster/tcp.c 		atomic_set(&nn->nn_timeout, 0);
nn               1319 fs/ocfs2/cluster/tcp.c 		o2net_set_nn_state(nn, sc, 1, 0);
nn               1321 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn               1435 fs/ocfs2/cluster/tcp.c 		struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
nn               1438 fs/ocfs2/cluster/tcp.c 		o2net_ensure_shutdown(nn, sc, 0);
nn               1507 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
nn               1523 fs/ocfs2/cluster/tcp.c 	atomic_set(&nn->nn_timeout, 1);
nn               1524 fs/ocfs2/cluster/tcp.c 	o2quo_conn_err(o2net_num_from_nn(nn));
nn               1525 fs/ocfs2/cluster/tcp.c 	queue_delayed_work(o2net_wq, &nn->nn_still_up,
nn               1544 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
nn               1547 fs/ocfs2/cluster/tcp.c 	if (atomic_read(&nn->nn_timeout)) {
nn               1548 fs/ocfs2/cluster/tcp.c 		o2quo_conn_up(o2net_num_from_nn(nn));
nn               1549 fs/ocfs2/cluster/tcp.c 		cancel_delayed_work(&nn->nn_still_up);
nn               1550 fs/ocfs2/cluster/tcp.c 		atomic_set(&nn->nn_timeout, 0);
nn               1565 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn =
nn               1583 fs/ocfs2/cluster/tcp.c 	if (o2nm_this_node() <= o2net_num_from_nn(nn))
nn               1587 fs/ocfs2/cluster/tcp.c 	node = o2nm_get_node_by_num(o2net_num_from_nn(nn));
nn               1595 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn               1603 fs/ocfs2/cluster/tcp.c 	timeout = atomic_read(&nn->nn_timeout);
nn               1604 fs/ocfs2/cluster/tcp.c 	stop = (nn->nn_sc ||
nn               1605 fs/ocfs2/cluster/tcp.c 		(nn->nn_persistent_error &&
nn               1606 fs/ocfs2/cluster/tcp.c 		(nn->nn_persistent_error != -ENOTCONN || timeout == 0)));
nn               1607 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn               1611 fs/ocfs2/cluster/tcp.c 	nn->nn_last_connect_attempt = jiffies;
nn               1655 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn               1657 fs/ocfs2/cluster/tcp.c 	o2net_set_nn_state(nn, sc, 0, 0);
nn               1658 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn               1677 fs/ocfs2/cluster/tcp.c 		o2net_ensure_shutdown(nn, sc, 0);
nn               1692 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn =
nn               1695 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn               1696 fs/ocfs2/cluster/tcp.c 	if (!nn->nn_sc_valid) {
nn               1700 fs/ocfs2/cluster/tcp.c 		     o2net_num_from_nn(nn),
nn               1704 fs/ocfs2/cluster/tcp.c 		o2net_set_nn_state(nn, NULL, 0, 0);
nn               1706 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn               1711 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn =
nn               1714 fs/ocfs2/cluster/tcp.c 	o2quo_hb_still_up(o2net_num_from_nn(nn));
nn               1721 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(node->nd_num);
nn               1724 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn               1725 fs/ocfs2/cluster/tcp.c 	atomic_set(&nn->nn_timeout, 0);
nn               1726 fs/ocfs2/cluster/tcp.c 	o2net_set_nn_state(nn, NULL, 0, -ENOTCONN);
nn               1727 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn               1730 fs/ocfs2/cluster/tcp.c 		cancel_delayed_work(&nn->nn_connect_expired);
nn               1731 fs/ocfs2/cluster/tcp.c 		cancel_delayed_work(&nn->nn_connect_work);
nn               1732 fs/ocfs2/cluster/tcp.c 		cancel_delayed_work(&nn->nn_still_up);
nn               1754 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn = o2net_nn_from_num(node_num);
nn               1761 fs/ocfs2/cluster/tcp.c 	nn->nn_last_connect_attempt = jiffies -
nn               1769 fs/ocfs2/cluster/tcp.c 		spin_lock(&nn->nn_lock);
nn               1770 fs/ocfs2/cluster/tcp.c 		atomic_set(&nn->nn_timeout, 0);
nn               1771 fs/ocfs2/cluster/tcp.c 		if (nn->nn_persistent_error)
nn               1772 fs/ocfs2/cluster/tcp.c 			o2net_set_nn_state(nn, NULL, 0, 0);
nn               1773 fs/ocfs2/cluster/tcp.c 		spin_unlock(&nn->nn_lock);
nn               1812 fs/ocfs2/cluster/tcp.c 	struct o2net_node *nn;
nn               1891 fs/ocfs2/cluster/tcp.c 	nn = o2net_nn_from_num(node->nd_num);
nn               1893 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn               1894 fs/ocfs2/cluster/tcp.c 	if (nn->nn_sc)
nn               1898 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn               1916 fs/ocfs2/cluster/tcp.c 	spin_lock(&nn->nn_lock);
nn               1917 fs/ocfs2/cluster/tcp.c 	atomic_set(&nn->nn_timeout, 0);
nn               1918 fs/ocfs2/cluster/tcp.c 	o2net_set_nn_state(nn, sc, 0, 0);
nn               1919 fs/ocfs2/cluster/tcp.c 	spin_unlock(&nn->nn_lock);
nn               2147 fs/ocfs2/cluster/tcp.c 		struct o2net_node *nn = o2net_nn_from_num(i);
nn               2149 fs/ocfs2/cluster/tcp.c 		atomic_set(&nn->nn_timeout, 0);
nn               2150 fs/ocfs2/cluster/tcp.c 		spin_lock_init(&nn->nn_lock);
nn               2151 fs/ocfs2/cluster/tcp.c 		INIT_DELAYED_WORK(&nn->nn_connect_work, o2net_start_connect);
nn               2152 fs/ocfs2/cluster/tcp.c 		INIT_DELAYED_WORK(&nn->nn_connect_expired,
nn               2154 fs/ocfs2/cluster/tcp.c 		INIT_DELAYED_WORK(&nn->nn_still_up, o2net_still_up);
nn               2156 fs/ocfs2/cluster/tcp.c 		nn->nn_persistent_error = -ENOTCONN;
nn               2157 fs/ocfs2/cluster/tcp.c 		init_waitqueue_head(&nn->nn_sc_wq);
nn               2158 fs/ocfs2/cluster/tcp.c 		idr_init(&nn->nn_status_idr);
nn               2159 fs/ocfs2/cluster/tcp.c 		INIT_LIST_HEAD(&nn->nn_status_list);
nn                 54 fs/ocfs2/dlm/dlmdomain.c 	unsigned int nn;
nn                 60 fs/ocfs2/dlm/dlmdomain.c 	for (nn = 0 ; nn < sz; nn++)
nn                 61 fs/ocfs2/dlm/dlmdomain.c 		if (test_bit(nn, smap))
nn                 62 fs/ocfs2/dlm/dlmdomain.c 			byte_set_bit(nn, dmap);
nn               1906 fs/ocfs2/dlm/dlmmaster.c 		int nn = -1;
nn               1916 fs/ocfs2/dlm/dlmmaster.c 			while ((nn = find_next_bit (mle->response_map, O2NM_MAX_NODES,
nn               1917 fs/ocfs2/dlm/dlmmaster.c 						    nn+1)) < O2NM_MAX_NODES) {
nn               1918 fs/ocfs2/dlm/dlmmaster.c 				if (nn != dlm->node_num && nn != assert->node_idx) {
nn                609 fs/ubifs/file.c 	int i = 0, nn = *n, offs = bu->zbranch[0].offs, hole = 0, read = 0;
nn                632 fs/ubifs/file.c 		if (nn >= bu->cnt) {
nn                635 fs/ubifs/file.c 		} else if (key_block(c, &bu->zbranch[nn].key) == page_block) {
nn                638 fs/ubifs/file.c 			dn = bu->buf + (bu->zbranch[nn].offs - offs);
nn                664 fs/ubifs/file.c 			nn += 1;
nn                666 fs/ubifs/file.c 		} else if (key_block(c, &bu->zbranch[nn].key) < page_block) {
nn                667 fs/ubifs/file.c 			nn += 1;
nn                696 fs/ubifs/file.c 	*n = nn;
nn               1655 fs/ubifs/lpt.c 	struct ubifs_nnode *nnode, *nn;
nn               1686 fs/ubifs/lpt.c 		nn = (struct ubifs_nnode *)cnode;
nn               1689 fs/ubifs/lpt.c 				if (nn->nbranch[iip].lnum == 0) {
nn               1695 fs/ubifs/lpt.c 				nnode = ubifs_get_nnode(c, nn, iip);
nn               1712 fs/ubifs/lpt.c 				if (nn->nbranch[i].lnum == 0)
nn               1714 fs/ubifs/lpt.c 				pnode = ubifs_get_pnode(c, nn, i);
nn               2383 fs/ubifs/lpt.c 	struct ubifs_nnode *nnode, *nn;
nn               2402 fs/ubifs/lpt.c 			nn = (struct ubifs_nnode *)cnode;
nn               2404 fs/ubifs/lpt.c 				cn = nn->nbranch[iip].cnode;
nn                606 fs/ubifs/tnc.c 	int nn = *n;
nn                608 fs/ubifs/tnc.c 	nn += 1;
nn                609 fs/ubifs/tnc.c 	if (nn < znode->child_cnt) {
nn                610 fs/ubifs/tnc.c 		*n = nn;
nn                619 fs/ubifs/tnc.c 		nn = znode->iip + 1;
nn                621 fs/ubifs/tnc.c 		if (nn < znode->child_cnt) {
nn                622 fs/ubifs/tnc.c 			znode = get_znode(c, znode, nn);
nn                630 fs/ubifs/tnc.c 			nn = 0;
nn                635 fs/ubifs/tnc.c 	*n = nn;
nn                651 fs/ubifs/tnc.c 	int nn = *n;
nn                653 fs/ubifs/tnc.c 	if (nn > 0) {
nn                654 fs/ubifs/tnc.c 		*n = nn - 1;
nn                663 fs/ubifs/tnc.c 		nn = znode->iip - 1;
nn                665 fs/ubifs/tnc.c 		if (nn >= 0) {
nn                666 fs/ubifs/tnc.c 			znode = get_znode(c, znode, nn);
nn                670 fs/ubifs/tnc.c 				nn = znode->child_cnt - 1;
nn                671 fs/ubifs/tnc.c 				znode = get_znode(c, znode, nn);
nn                675 fs/ubifs/tnc.c 			nn = znode->child_cnt - 1;
nn                680 fs/ubifs/tnc.c 	*n = nn;
nn                777 fs/ubifs/tnc.c 		int nn = *n;
nn                782 fs/ubifs/tnc.c 			err = tnc_next(c, &znode, &nn);
nn                787 fs/ubifs/tnc.c 			if (keys_cmp(c, &znode->zbranch[nn].key, key))
nn                789 fs/ubifs/tnc.c 			err = matches_name(c, &znode->zbranch[nn], nm);
nn                795 fs/ubifs/tnc.c 			*n = nn;
nn                895 fs/ubifs/tnc.c 	int uninitialized_var(o_n), err, cmp, unsure = 0, nn = *n;
nn                897 fs/ubifs/tnc.c 	cmp = fallible_matches_name(c, &znode->zbranch[nn], nm);
nn                904 fs/ubifs/tnc.c 		o_n = nn;
nn                963 fs/ubifs/tnc.c 		*n = nn;
nn                965 fs/ubifs/tnc.c 			err = tnc_next(c, &znode, &nn);
nn                970 fs/ubifs/tnc.c 			if (keys_cmp(c, &znode->zbranch[nn].key, key))
nn                972 fs/ubifs/tnc.c 			err = fallible_matches_name(c, &znode->zbranch[nn], nm);
nn                978 fs/ubifs/tnc.c 			*n = nn;
nn                983 fs/ubifs/tnc.c 				o_n = nn;
nn               1039 fs/ubifs/tnc.c 	int nn, err;
nn               1042 fs/ubifs/tnc.c 	nn = *n;
nn               1043 fs/ubifs/tnc.c 	if (matches_position(&znode->zbranch[nn], lnum, offs))
nn               1048 fs/ubifs/tnc.c 		err = tnc_prev(c, &znode, &nn);
nn               1053 fs/ubifs/tnc.c 		if (keys_cmp(c, &znode->zbranch[nn].key, key))
nn               1055 fs/ubifs/tnc.c 		if (matches_position(&znode->zbranch[nn], lnum, offs)) {
nn               1057 fs/ubifs/tnc.c 			*n = nn;
nn               1064 fs/ubifs/tnc.c 	nn = *n;
nn               1066 fs/ubifs/tnc.c 		err = tnc_next(c, &znode, &nn);
nn               1071 fs/ubifs/tnc.c 		if (keys_cmp(c, &znode->zbranch[nn].key, key))
nn               1074 fs/ubifs/tnc.c 		*n = nn;
nn               1075 fs/ubifs/tnc.c 		if (matches_position(&znode->zbranch[nn], lnum, offs))
nn               3180 fs/ubifs/tnc.c 	int n, nn;
nn               3240 fs/ubifs/tnc.c 	nn = n;
nn               3264 fs/ubifs/tnc.c 	n = nn;
nn               3336 fs/ubifs/tnc.c 	int n, found, err, nn;
nn               3354 fs/ubifs/tnc.c 	nn = n;
nn               3370 fs/ubifs/tnc.c 	n = nn;
nn                261 include/linux/nvme.h 	__le32			nn;
nn                 36 include/linux/rslib.h 	int		nn;
nn                124 include/linux/rslib.h 	while (x >= rs->nn) {
nn                125 include/linux/rslib.h 		x -= rs->nn;
nn                126 include/linux/rslib.h 		x = (x >> rs->mm) + (x & rs->nn);
nn                 16 lib/reed_solomon/decode_rs.c 	int nn = rs->nn;
nn                 26 lib/reed_solomon/decode_rs.c 	uint16_t msk = (uint16_t) rs->nn;
nn                 42 lib/reed_solomon/decode_rs.c 	pad = nn - nroots - len;
nn                 43 lib/reed_solomon/decode_rs.c 	BUG_ON(pad < 0 || pad >= nn - nroots);
nn                 51 lib/reed_solomon/decode_rs.c 			if (s[i] != nn)
nn                112 lib/reed_solomon/decode_rs.c 					prim * (nn - 1 - (eras_pos[0] + pad)))];
nn                114 lib/reed_solomon/decode_rs.c 			u = rs_modnn(rs, prim * (nn - 1 - (eras_pos[i] + pad)));
nn                117 lib/reed_solomon/decode_rs.c 				if (tmp != nn) {
nn                138 lib/reed_solomon/decode_rs.c 			if ((lambda[i] != 0) && (s[r - i - 1] != nn)) {
nn                146 lib/reed_solomon/decode_rs.c 		if (discr_r == nn) {
nn                149 lib/reed_solomon/decode_rs.c 			b[0] = nn;
nn                154 lib/reed_solomon/decode_rs.c 				if (b[i] != nn) {
nn                168 lib/reed_solomon/decode_rs.c 					b[i] = (lambda[i] == 0) ? nn :
nn                170 lib/reed_solomon/decode_rs.c 							 - discr_r + nn);
nn                175 lib/reed_solomon/decode_rs.c 				b[0] = nn;
nn                185 lib/reed_solomon/decode_rs.c 		if (lambda[i] != nn)
nn                200 lib/reed_solomon/decode_rs.c 	for (i = 1, k = iprim - 1; i <= nn; i++, k = rs_modnn(rs, k + iprim)) {
nn                203 lib/reed_solomon/decode_rs.c 			if (reg[j] != nn) {
nn                240 lib/reed_solomon/decode_rs.c 			if ((s[i - j] != nn) && (lambda[j] != nn))
nn                256 lib/reed_solomon/decode_rs.c 			if (omega[i] != nn)
nn                267 lib/reed_solomon/decode_rs.c 		num2 = alpha_to[rs_modnn(rs, root[j] * (fcr - 1) + nn)];
nn                273 lib/reed_solomon/decode_rs.c 			if (lambda[i + 1] != nn) {
nn                281 lib/reed_solomon/decode_rs.c 					       nn - index_of[den])];
nn                295 lib/reed_solomon/decode_rs.c 			k = (fcr + i) * prim * (nn-loc[j]-1);
nn                318 lib/reed_solomon/decode_rs.c 			if (loc[i] < (nn - nroots))
nn                 15 lib/reed_solomon/encode_rs.c 	int nn = rs->nn;
nn                 21 lib/reed_solomon/encode_rs.c 	uint16_t msk = (uint16_t) rs->nn;
nn                 24 lib/reed_solomon/encode_rs.c 	pad = nn - nroots - len;
nn                 25 lib/reed_solomon/encode_rs.c 	if (pad < 0 || pad >= nn)
nn                 31 lib/reed_solomon/encode_rs.c 		if (fb != nn) {
nn                 39 lib/reed_solomon/encode_rs.c 		if (fb != nn) {
nn                 83 lib/reed_solomon/reed_solomon.c 	rs->nn = (1 << symsize) - 1;
nn                 91 lib/reed_solomon/reed_solomon.c 	rs->alpha_to = kmalloc_array(rs->nn + 1, sizeof(uint16_t), gfp);
nn                 95 lib/reed_solomon/reed_solomon.c 	rs->index_of = kmalloc_array(rs->nn + 1, sizeof(uint16_t), gfp);
nn                104 lib/reed_solomon/reed_solomon.c 	rs->index_of[0] = rs->nn;	/* log(zero) = -inf */
nn                105 lib/reed_solomon/reed_solomon.c 	rs->alpha_to[rs->nn] = 0;	/* alpha**-inf = 0 */
nn                108 lib/reed_solomon/reed_solomon.c 		for (i = 0; i < rs->nn; i++) {
nn                114 lib/reed_solomon/reed_solomon.c 			sr &= rs->nn;
nn                118 lib/reed_solomon/reed_solomon.c 		for (i = 0; i < rs->nn; i++) {
nn                129 lib/reed_solomon/reed_solomon.c 	for(iprim = 1; (iprim % prim) != 0; iprim += rs->nn);
nn                112 lib/reed_solomon/test_rslib.c 	int nn = rs->nn;
nn                118 lib/reed_solomon/test_rslib.c 	ws->c = kmalloc_array(2 * (nn + nroots),
nn                123 lib/reed_solomon/test_rslib.c 	ws->r = ws->c + nn;
nn                124 lib/reed_solomon/test_rslib.c 	ws->s = ws->r + nn;
nn                127 lib/reed_solomon/test_rslib.c 	ws->errlocs = kmalloc_array(nn + nroots, sizeof(int), GFP_KERNEL);
nn                131 lib/reed_solomon/test_rslib.c 	ws->derrlocs = ws->errlocs + nn;
nn                158 lib/reed_solomon/test_rslib.c 	int nn = rs->codec->nn;
nn                167 lib/reed_solomon/test_rslib.c 		c[i] = prandom_u32() & nn;
nn                181 lib/reed_solomon/test_rslib.c 			errval = prandom_u32() & nn;
nn                209 lib/reed_solomon/test_rslib.c 				errval = prandom_u32() & nn;
nn                444 lib/reed_solomon/test_rslib.c 	int nn = (1 << e->symsize) - 1;
nn                445 lib/reed_solomon/test_rslib.c 	int kk = nn - e->nroots;
nn                464 lib/reed_solomon/test_rslib.c 		int len = nn - pad;
nn                472 lib/reed_solomon/test_rslib.c 					len, kk - pad, nn + 1);
nn                262 net/dccp/feat.c 		dccp_pr_debug_cat("%llu", (unsigned long long)val->nn);
nn                273 net/dccp/feat.c 		fval.nn = dccp_decode_value_var(list, len);
nn                329 net/dccp/feat.c 		val = fval->nn;
nn                520 net/dccp/feat.c 	new->val.nn	     = 0;		/* zeroes the whole structure */
nn                654 net/dccp/feat.c 				dccp_encode_value_var(pos->val.nn, ptr, len);
nn                698 net/dccp/feat.c 	dccp_feat_val fval = { .nn = nn_val };
nn                779 net/dccp/feat.c 			return entry->val.nn;
nn                804 net/dccp/feat.c 	dccp_feat_val fval = { .nn = nn_val };
nn                820 net/dccp/feat.c 			      (unsigned long long)entry->val.nn,
nn               1115 net/dccp/feat.c 		if (local || len > sizeof(fval.nn))
nn               1119 net/dccp/feat.c 		fval.nn = dccp_decode_value_var(val, len);
nn               1120 net/dccp/feat.c 		if (!dccp_feat_is_valid_nn_val(feat, fval.nn))
nn               1244 net/dccp/feat.c 		if (len > sizeof(entry->val.nn))
nn               1247 net/dccp/feat.c 		if (entry->val.nn == dccp_decode_value_var(val, len))
nn               1331 net/dccp/feat.c 	if (len == 0 || len > sizeof(fval.nn))
nn               1335 net/dccp/feat.c 		fval.nn = dccp_decode_value_var(val, len);
nn               1336 net/dccp/feat.c 		if (!dccp_feat_is_valid_nn_val(feat, fval.nn))
nn               1351 net/dccp/feat.c 		fval.nn = dccp_decode_value_var(val, len);
nn               1358 net/dccp/feat.c 		if (fval.nn != entry->val.nn)
nn                 48 net/dccp/feat.h 	u64 nn;
nn                182 net/netlink/af_netlink.c 	struct netlink_tap_net *nn = net_generic(net, netlink_tap_net_id);
nn                187 net/netlink/af_netlink.c 	mutex_lock(&nn->netlink_tap_lock);
nn                188 net/netlink/af_netlink.c 	list_add_rcu(&nt->list, &nn->netlink_tap_all);
nn                189 net/netlink/af_netlink.c 	mutex_unlock(&nn->netlink_tap_lock);
nn                200 net/netlink/af_netlink.c 	struct netlink_tap_net *nn = net_generic(net, netlink_tap_net_id);
nn                204 net/netlink/af_netlink.c 	mutex_lock(&nn->netlink_tap_lock);
nn                206 net/netlink/af_netlink.c 	list_for_each_entry(tmp, &nn->netlink_tap_all, list) {
nn                216 net/netlink/af_netlink.c 	mutex_unlock(&nn->netlink_tap_lock);
nn                237 net/netlink/af_netlink.c 	struct netlink_tap_net *nn = net_generic(net, netlink_tap_net_id);
nn                239 net/netlink/af_netlink.c 	INIT_LIST_HEAD(&nn->netlink_tap_all);
nn                240 net/netlink/af_netlink.c 	mutex_init(&nn->netlink_tap_lock);
nn                303 net/netlink/af_netlink.c static void __netlink_deliver_tap(struct sk_buff *skb, struct netlink_tap_net *nn)
nn                311 net/netlink/af_netlink.c 	list_for_each_entry_rcu(tmp, &nn->netlink_tap_all, list) {
nn                320 net/netlink/af_netlink.c 	struct netlink_tap_net *nn = net_generic(net, netlink_tap_net_id);
nn                324 net/netlink/af_netlink.c 	if (unlikely(!list_empty(&nn->netlink_tap_all)))
nn                325 net/netlink/af_netlink.c 		__netlink_deliver_tap(skb, nn);