Lines Matching refs:app_priv
345 kfree(repr->app_priv); in nfp_flower_repr_netdev_clean()
417 nfp_repr->app_priv = repr_priv; in nfp_flower_spawn_vnic_reprs()
535 nfp_repr->app_priv = repr_priv; in nfp_flower_spawn_phy_reprs()
704 struct nfp_flower_priv *app_priv = app->priv; in nfp_flower_sync_feature_bits() local
709 app_priv->flower_ext_feats | in nfp_flower_sync_feature_bits()
720 app_priv->flower_en_feats |= NFP_FL_ENABLE_LAG; in nfp_flower_sync_feature_bits()
721 nfp_flower_lag_init(&app_priv->nfp_lag); in nfp_flower_sync_feature_bits()
728 if (app_priv->flower_ext_feats & NFP_FL_FEATS_FLOW_MOD) { in nfp_flower_sync_feature_bits()
733 app_priv->flower_en_feats |= NFP_FL_ENABLE_FLOW_MERGE; in nfp_flower_sync_feature_bits()
734 nfp_flower_internal_port_init(app_priv); in nfp_flower_sync_feature_bits()
752 struct nfp_flower_priv *app_priv; in nfp_flower_init() local
809 app_priv = vzalloc(sizeof(struct nfp_flower_priv)); in nfp_flower_init()
810 if (!app_priv) in nfp_flower_init()
813 app_priv->total_mem_units = num_mems; in nfp_flower_init()
814 app_priv->active_mem_unit = 0; in nfp_flower_init()
815 app_priv->stats_ring_size = roundup_pow_of_two(ctx_count); in nfp_flower_init()
816 app->priv = app_priv; in nfp_flower_init()
817 app_priv->app = app; in nfp_flower_init()
818 skb_queue_head_init(&app_priv->cmsg_skbs_high); in nfp_flower_init()
819 skb_queue_head_init(&app_priv->cmsg_skbs_low); in nfp_flower_init()
820 INIT_WORK(&app_priv->cmsg_work, nfp_flower_cmsg_process_rx); in nfp_flower_init()
821 init_waitqueue_head(&app_priv->reify_wait_queue); in nfp_flower_init()
823 init_waitqueue_head(&app_priv->mtu_conf.wait_q); in nfp_flower_init()
824 spin_lock_init(&app_priv->mtu_conf.lock); in nfp_flower_init()
834 app_priv->flower_ext_feats = 0; in nfp_flower_init()
836 app_priv->flower_ext_feats = features & NFP_FL_FEATS_HOST; in nfp_flower_init()
842 if (app_priv->flower_ext_feats & NFP_FL_FEATS_VF_RLIM) in nfp_flower_init()
845 INIT_LIST_HEAD(&app_priv->indr_block_cb_priv); in nfp_flower_init()
846 INIT_LIST_HEAD(&app_priv->non_repr_priv); in nfp_flower_init()
847 app_priv->pre_tun_rule_cnt = 0; in nfp_flower_init()
852 if (app_priv->flower_en_feats & NFP_FL_ENABLE_LAG) in nfp_flower_init()
853 nfp_flower_lag_cleanup(&app_priv->nfp_lag); in nfp_flower_init()
862 struct nfp_flower_priv *app_priv = app->priv; in nfp_flower_clean() local
864 skb_queue_purge(&app_priv->cmsg_skbs_high); in nfp_flower_clean()
865 skb_queue_purge(&app_priv->cmsg_skbs_low); in nfp_flower_clean()
866 flush_work(&app_priv->cmsg_work); in nfp_flower_clean()
868 if (app_priv->flower_ext_feats & NFP_FL_FEATS_VF_RLIM) in nfp_flower_clean()
871 if (app_priv->flower_en_feats & NFP_FL_ENABLE_LAG) in nfp_flower_clean()
872 nfp_flower_lag_cleanup(&app_priv->nfp_lag); in nfp_flower_clean()
874 if (app_priv->flower_en_feats & NFP_FL_ENABLE_FLOW_MERGE) in nfp_flower_clean()
875 nfp_flower_internal_port_cleanup(app_priv); in nfp_flower_clean()
882 static bool nfp_flower_check_ack(struct nfp_flower_priv *app_priv) in nfp_flower_check_ack() argument
886 spin_lock_bh(&app_priv->mtu_conf.lock); in nfp_flower_check_ack()
887 ret = app_priv->mtu_conf.ack; in nfp_flower_check_ack()
888 spin_unlock_bh(&app_priv->mtu_conf.lock); in nfp_flower_check_ack()
897 struct nfp_flower_priv *app_priv = app->priv; in nfp_flower_repr_change_mtu() local
905 if (!(app_priv->flower_ext_feats & NFP_FL_NBI_MTU_SETTING)) { in nfp_flower_repr_change_mtu()
910 spin_lock_bh(&app_priv->mtu_conf.lock); in nfp_flower_repr_change_mtu()
911 app_priv->mtu_conf.ack = false; in nfp_flower_repr_change_mtu()
912 app_priv->mtu_conf.requested_val = new_mtu; in nfp_flower_repr_change_mtu()
913 app_priv->mtu_conf.portnum = repr->dst->u.port_info.port_id; in nfp_flower_repr_change_mtu()
914 spin_unlock_bh(&app_priv->mtu_conf.lock); in nfp_flower_repr_change_mtu()
919 spin_lock_bh(&app_priv->mtu_conf.lock); in nfp_flower_repr_change_mtu()
920 app_priv->mtu_conf.requested_val = 0; in nfp_flower_repr_change_mtu()
921 spin_unlock_bh(&app_priv->mtu_conf.lock); in nfp_flower_repr_change_mtu()
926 if (!wait_event_timeout(app_priv->mtu_conf.wait_q, in nfp_flower_repr_change_mtu()
927 nfp_flower_check_ack(app_priv), in nfp_flower_repr_change_mtu()
929 spin_lock_bh(&app_priv->mtu_conf.lock); in nfp_flower_repr_change_mtu()
930 app_priv->mtu_conf.requested_val = 0; in nfp_flower_repr_change_mtu()
931 spin_unlock_bh(&app_priv->mtu_conf.lock); in nfp_flower_repr_change_mtu()
941 struct nfp_flower_priv *app_priv = app->priv; in nfp_flower_start() local
944 if (app_priv->flower_en_feats & NFP_FL_ENABLE_LAG) { in nfp_flower_start()
945 err = nfp_flower_lag_reset(&app_priv->nfp_lag); in nfp_flower_start()
978 struct nfp_flower_priv *app_priv = app->priv; in nfp_flower_netdev_event() local
981 if (app_priv->flower_en_feats & NFP_FL_ENABLE_LAG) { in nfp_flower_netdev_event()
982 ret = nfp_flower_lag_netdev_event(app_priv, netdev, event, ptr); in nfp_flower_netdev_event()