/linux/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ |
H A D | ingress_ofld.c | 10 acl_ingress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport); 14 const struct mlx5_vport *vport) in esw_acl_ingress_prio_tag_enabled() argument 17 mlx5_eswitch_is_vf_vport(esw, vport->vport)); in esw_acl_ingress_prio_tag_enabled() 21 struct mlx5_vport *vport) in esw_acl_ingress_prio_tag_create() argument 46 if (vport->ingress.offloads.modify_metadata_rule) { in esw_acl_ingress_prio_tag_create() 48 flow_act.modify_hdr = vport->ingress.offloads.modify_metadata; in esw_acl_ingress_prio_tag_create() 51 vport->ingress.allow_rule = mlx5_add_flow_rules(vport->ingress.acl, spec, in esw_acl_ingress_prio_tag_create() 53 if (IS_ERR(vport->ingress.allow_rule)) { in esw_acl_ingress_prio_tag_create() 54 err = PTR_ERR(vport->ingress.allow_rule); in esw_acl_ingress_prio_tag_create() 56 "vport[%d] configure ingress untagged allow rule, err(%d)\n", in esw_acl_ingress_prio_tag_create() [all …]
|
H A D | egress_ofld.c | 9 static void esw_acl_egress_ofld_fwd2vport_destroy(struct mlx5_vport *vport) in esw_acl_egress_ofld_fwd2vport_destroy() argument 11 if (!vport->egress.offloads.fwd_rule) in esw_acl_egress_ofld_fwd2vport_destroy() 14 mlx5_del_flow_rules(vport->egress.offloads.fwd_rule); in esw_acl_egress_ofld_fwd2vport_destroy() 15 vport->egress.offloads.fwd_rule = NULL; in esw_acl_egress_ofld_fwd2vport_destroy() 18 void esw_acl_egress_ofld_bounce_rule_destroy(struct mlx5_vport *vport, int rule_index) in esw_acl_egress_ofld_bounce_rule_destroy() argument 21 xa_load(&vport->egress.offloads.bounce_rules, rule_index); in esw_acl_egress_ofld_bounce_rule_destroy() 27 xa_erase(&vport->egress.offloads.bounce_rules, rule_index); in esw_acl_egress_ofld_bounce_rule_destroy() 30 static void esw_acl_egress_ofld_bounce_rules_destroy(struct mlx5_vport *vport) in esw_acl_egress_ofld_bounce_rules_destroy() argument 35 xa_for_each(&vport->egress.offloads.bounce_rules, i, bounce_rule) { in esw_acl_egress_ofld_bounce_rules_destroy() 37 xa_erase(&vport->egress.offloads.bounce_rules, i); in esw_acl_egress_ofld_bounce_rules_destroy() [all …]
|
H A D | helper.c | 9 esw_acl_table_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport, int ns, int size) in esw_acl_table_create() argument 26 vport_num = vport->vport; in esw_acl_table_create() 27 esw_debug(dev, "Create vport[%d] %s ACL table\n", vport_num, in esw_acl_table_create() 30 root_ns = mlx5_get_flow_vport_namespace(dev, ns, vport->index); in esw_acl_table_create() 32 esw_warn(dev, "Failed to get E-Switch root namespace for vport (%d)\n", in esw_acl_table_create() 43 esw_warn(dev, "vport[%d] create %s ACL table, err(%d)\n", vport_num, in esw_acl_table_create() 50 struct mlx5_vport *vport, in esw_egress_acl_vlan_create() argument 58 if (vport->egress.allowed_vlan) in esw_egress_acl_vlan_create() 72 vport->egress.allowed_vlan = in esw_egress_acl_vlan_create() 73 mlx5_add_flow_rules(vport->egress.acl, spec, in esw_egress_acl_vlan_create() [all …]
|
/linux/net/openvswitch/ |
H A D | vport-netdev.c | 22 #include "vport.h" 23 #include "vport-internal_dev.h" 24 #include "vport-netdev.h" 31 struct vport *vport; in netdev_port_receive() local 33 vport = ovs_netdev_get_vport(skb->dev); in netdev_port_receive() 34 if (unlikely(!vport)) in netdev_port_receive() 50 ovs_vport_receive(vport, skb, skb_tunnel_info(skb)); in netdev_port_receive() 70 struct vport *local; in get_dpdev() 76 struct vport *ovs_netdev_link(struct vport *vport, const char *name) in ovs_netdev_link() argument 80 vport->dev = dev_get_by_name(ovs_dp_get_net(vport->dp), name); in ovs_netdev_link() [all …]
|
H A D | vport.c | 21 #include "vport.h" 22 #include "vport-internal_dev.h" 31 * ovs_vport_init - initialize vport subsystem 33 * Called at module load time to initialize the vport subsystem. 46 * ovs_vport_exit - shutdown vport subsystem 48 * Called at module exit time to shutdown the vport subsystem. 95 struct vport *ovs_vport_locate(const struct net *net, const char *name) in ovs_vport_locate() 98 struct vport *vport; in ovs_vport_locate() local 100 hlist_for_each_entry_rcu(vport, bucket, hash_node, in ovs_vport_locate() 102 if (!strcmp(name, ovs_vport_name(vport)) && in ovs_vport_locate() [all …]
|
H A D | vport.h | 20 struct vport; 23 /* The following definitions are for users of the vport subsystem: */ 28 struct vport *ovs_vport_add(const struct vport_parms *); 29 void ovs_vport_del(struct vport *); 31 struct vport *ovs_vport_locate(const struct net *net, const char *name); 33 void ovs_vport_get_stats(struct vport *, struct ovs_vport_stats *); 35 int ovs_vport_get_upcall_stats(struct vport *vport, struct sk_buff *skb); 37 int ovs_vport_set_options(struct vport *, struct nlattr *options); 38 int ovs_vport_get_options(const struct vport *, struct sk_buff *); 40 int ovs_vport_set_upcall_portids(struct vport *, const struct nlattr *pids); [all …]
|
H A D | vport-internal_dev.c | 18 #include "vport-internal_dev.h" 19 #include "vport-netdev.h" 22 struct vport *vport; member 42 err = ovs_vport_receive(internal_dev_priv(netdev)->vport, skb, NULL); in internal_dev_xmit() 78 struct vport *vport = ovs_internal_dev_get_vport(dev); in internal_dev_destructor() local 80 ovs_vport_free(vport); in internal_dev_destructor() 123 static struct vport *internal_dev_create(const struct vport_parms *parms) in internal_dev_create() 125 struct vport *vport; in internal_dev_create() local 130 vport = ovs_vport_alloc(0, &ovs_internal_vport_ops, parms); in internal_dev_create() 131 if (IS_ERR(vport)) { in internal_dev_create() [all …]
|
H A D | vport-geneve.c | 24 #include "vport.h" 25 #include "vport-netdev.h" 36 static inline struct geneve_port *geneve_vport(const struct vport *vport) in geneve_vport() argument 38 return vport_priv(vport); in geneve_vport() 41 static int geneve_get_options(const struct vport *vport, in geneve_get_options() argument 44 struct geneve_port *geneve_port = geneve_vport(vport); in geneve_get_options() 51 static struct vport *geneve_tnl_create(const struct vport_parms *parms) in geneve_tnl_create() 57 struct vport *vport; in geneve_tnl_create() local 76 vport = ovs_vport_alloc(sizeof(struct geneve_port), in geneve_tnl_create() 78 if (IS_ERR(vport)) in geneve_tnl_create() [all …]
|
H A D | vport-vxlan.c | 17 #include "vport.h" 18 #include "vport-netdev.h" 22 static int vxlan_get_options(const struct vport *vport, struct sk_buff *skb) in vxlan_get_options() argument 24 struct vxlan_dev *vxlan = netdev_priv(vport->dev); in vxlan_get_options() 51 static int vxlan_configure_exts(struct vport *vport, struct nlattr *attr, in vxlan_configure_exts() argument 71 static struct vport *vxlan_tnl_create(const struct vport_parms *parms) in vxlan_tnl_create() 76 struct vport *vport; in vxlan_tnl_create() local 100 vport = ovs_vport_alloc(0, &ovs_vxlan_netdev_vport_ops, parms); in vxlan_tnl_create() 101 if (IS_ERR(vport)) in vxlan_tnl_create() 102 return vport; in vxlan_tnl_create() [all …]
|
H A D | dp_notify.c | 11 #include "vport-internal_dev.h" 12 #include "vport-netdev.h" 14 static void dp_detach_port_notify(struct vport *vport) in dp_detach_port_notify() argument 19 dp = vport->dp; in dp_detach_port_notify() 20 notify = ovs_vport_cmd_build_info(vport, ovs_dp_get_net(dp), in dp_detach_port_notify() 22 ovs_dp_detach_port(vport); in dp_detach_port_notify() 44 struct vport *vport; in ovs_dp_notify_wq() local 47 hlist_for_each_entry_safe(vport, n, &dp->ports[i], dp_hash_node) { in ovs_dp_notify_wq() 48 if (vport->ops->type == OVS_VPORT_TYPE_INTERNAL) in ovs_dp_notify_wq() 51 if (!(netif_is_ovs_port(vport->dev))) in ovs_dp_notify_wq() [all …]
|
/linux/drivers/scsi/lpfc/ |
H A D | lpfc_vport.c | 53 inline void lpfc_vport_set_state(struct lpfc_vport *vport, in lpfc_vport_set_state() argument 56 struct fc_vport *fc_vport = vport->fc_vport; in lpfc_vport_set_state() 76 vport->port_state = LPFC_VPORT_FAILED; in lpfc_vport_set_state() 79 vport->port_state = LPFC_VPORT_UNKNOWN; in lpfc_vport_set_state() 118 lpfc_vport_sparm(struct lpfc_hba *phba, struct lpfc_vport *vport) in lpfc_vport_sparm() argument 131 rc = lpfc_read_sparam(phba, pmb, vport->vpi); in lpfc_vport_sparm() 139 * this per vport to start the FDISC. If the mailbox fails, in lpfc_vport_sparm() 146 pmb->vport = vport; in lpfc_vport_sparm() 150 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_vport_sparm() 158 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_vport_sparm() [all …]
|
H A D | lpfc_ct.c | 157 struct lpfc_vport *vport = ndlp->vport; in lpfc_ct_reject_event() local 158 struct lpfc_hba *phba = vport->phba; in lpfc_ct_reject_event() 241 cmdiocbq->vport = vport; in lpfc_ct_reject_event() 267 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, in lpfc_ct_reject_event() 269 rc, vport->fc_flag); in lpfc_ct_reject_event() 286 struct lpfc_vport *vport = ctiocbq->vport; in lpfc_ct_handle_mibreq() local 294 lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS, in lpfc_ct_handle_mibreq() 300 /* Ignore traffic received during vport shutdown */ in lpfc_ct_handle_mibreq() 301 if (test_bit(FC_UNLOADING, &vport->load_flag)) in lpfc_ct_handle_mibreq() 304 ndlp = lpfc_findnode_did(vport, did); in lpfc_ct_handle_mibreq() [all …]
|
H A D | lpfc_els.c | 54 static void lpfc_fabric_abort_vport(struct lpfc_vport *vport); 55 static int lpfc_issue_els_fdisc(struct lpfc_vport *vport, 67 static void lpfc_init_cs_ctl_bitmap(struct lpfc_vport *vport); 68 static void lpfc_vmid_set_cs_ctl_range(struct lpfc_vport *vport, u32 min, u32 max); 69 static void lpfc_vmid_put_cs_ctl(struct lpfc_vport *vport, u32 ctcl_vmid); 72 * lpfc_els_chk_latt - Check host link attention event for a vport 73 * @vport: pointer to a host virtual N_Port data structure. 76 * attention event during the discovery process with the @vport. It is done 78 * link attention events during this @vport's discovery process, the @vport 84 * Note that, if either the host link is in state LPFC_LINK_DOWN or @vport [all …]
|
H A D | lpfc_hbadisc.c | 71 static void lpfc_disc_flush_list(struct lpfc_vport *vport); 123 if (!ndlp->vport) { in lpfc_rport_invalid() 124 pr_err("**** %s: Null vport on ndlp x%px, DID x%x rport x%px " in lpfc_rport_invalid() 137 struct lpfc_vport *vport; in lpfc_terminate_rport_io() local 144 vport = ndlp->vport; in lpfc_terminate_rport_io() 145 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_RPORT, in lpfc_terminate_rport_io() 150 lpfc_sli_abort_iocb(vport, ndlp->nlp_sid, 0, LPFC_CTX_TGT); in lpfc_terminate_rport_io() 160 struct lpfc_vport *vport; in lpfc_dev_loss_tmo_callbk() local 170 vport = ndlp->vport; in lpfc_dev_loss_tmo_callbk() 171 phba = vport->phba; in lpfc_dev_loss_tmo_callbk() [all …]
|
/linux/drivers/net/ethernet/intel/idpf/ |
H A D | idpf_lib.c | 269 /* As IDPF_MIN_Q_VEC per default vport is put aside in the in idpf_req_rel_vector_indexes() 362 * vport in idpf_intr_req() 396 * @vconfig: Vport config structure 420 * @vport_config: Vport config structure 443 * @vport: Main vport structure 451 static int idpf_del_mac_filter(struct idpf_vport *vport, in idpf_del_mac_filter() argument 474 err = idpf_add_del_mac_filters(vport, np, false, async); in idpf_del_mac_filter() 484 * @vport_config: Vport config structure 522 * @vport: Main vport structure 530 static int idpf_add_mac_filter(struct idpf_vport *vport, in idpf_add_mac_filter() argument [all …]
|
H A D | idpf_virtchnl.c | 25 * idpf_vid_to_vport - Translate vport id to vport pointer 27 * @v_id: vport id to translate 29 * Returns vport matching v_id, NULL if not found. 53 struct idpf_vport *vport; in idpf_handle_event_link() local 55 vport = idpf_vid_to_vport(adapter, le32_to_cpu(v2e->vport_id)); in idpf_handle_event_link() 56 if (!vport) { in idpf_handle_event_link() 61 np = netdev_priv(vport->netdev); in idpf_handle_event_link() 65 if (vport->link_up == v2e->link_status) in idpf_handle_event_link() 68 vport->link_up = v2e->link_status; in idpf_handle_event_link() 73 if (vport->link_up) { in idpf_handle_event_link() [all …]
|
H A D | idpf_txrx.c | 168 * @vport: virtual port structure 172 static void idpf_tx_desc_rel_all(struct idpf_vport *vport) in idpf_tx_desc_rel_all() argument 176 if (!vport->txq_grps) in idpf_tx_desc_rel_all() 179 for (i = 0; i < vport->num_txq_grp; i++) { in idpf_tx_desc_rel_all() 180 struct idpf_txq_group *txq_grp = &vport->txq_grps[i]; in idpf_tx_desc_rel_all() 185 if (idpf_is_queue_model_split(vport->txq_model)) in idpf_tx_desc_rel_all() 238 * @vport: vport to allocate resources for 243 static int idpf_tx_desc_alloc(const struct idpf_vport *vport, in idpf_tx_desc_alloc() argument 280 * @vport: vport to allocate resources for 285 static int idpf_compl_desc_alloc(const struct idpf_vport *vport, in idpf_compl_desc_alloc() argument [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | eswitch.c | 37 #include <linux/mlx5/vport.h> 59 /* Vport UC/MC hash node */ 63 u16 vport; member 66 /* A flag indicating that mac was added due to mc promiscuous vport */ 109 struct mlx5_vport *vport; in mlx5_eswitch_get_vport() local 114 vport = xa_load(&esw->vports, vport_num); in mlx5_eswitch_get_vport() 115 if (!vport) { in mlx5_eswitch_get_vport() 116 esw_debug(esw->dev, "vport out of range: num(0x%x)\n", vport_num); in mlx5_eswitch_get_vport() 119 return vport; in mlx5_eswitch_get_vport() 122 static int arm_vport_context_events_cmd(struct mlx5_core_dev *dev, u16 vport, in arm_vport_context_events_cmd() argument [all …]
|
H A D | eswitch_offloads.c | 37 #include <linux/mlx5/vport.h> 96 spec->flow_context.flow_source = (attr->in_rep->vport == MLX5_VPORT_UPLINK) ? in mlx5_eswitch_set_rule_flow_source() 126 u16 vport) in mlx5_eswitch_set_rule_source_port() argument 133 /* Use metadata matching because vport is not represented by single in mlx5_eswitch_set_rule_source_port() 134 * VHCA in dual-port RoCE mode, and matching on source vport may fail. in mlx5_eswitch_set_rule_source_port() 138 vport = mlx5_esw_indir_table_decap_vport(attr); in mlx5_eswitch_set_rule_source_port() 145 mlx5_eswitch_get_vport_metadata_for_match(src_esw, vport); in mlx5_eswitch_set_rule_source_port() 157 MLX5_SET(fte_match_set_misc, misc, source_port, vport); in mlx5_eswitch_set_rule_source_port() 291 else if (mlx5_esw_indir_table_needed(esw, attr, esw_attr->dests[i].vport, in esw_put_dest_tables_loop() 293 mlx5_esw_indir_table_put(esw, esw_attr->dests[i].vport, false); in esw_put_dest_tables_loop() [all …]
|
/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
H A D | hclge_mbx.c | 26 * @vport: pointer to struct hclge_vport 31 static int hclge_gen_resp_to_vf(struct hclge_vport *vport, in hclge_gen_resp_to_vf() argument 36 struct hclge_dev *hdev = vport->back; in hclge_gen_resp_to_vf() 91 static int hclge_send_mbx_msg(struct hclge_vport *vport, u8 *msg, u16 msg_len, in hclge_send_mbx_msg() argument 95 struct hclge_dev *hdev = vport->back; in hclge_send_mbx_msg() 127 int hclge_inform_vf_reset(struct hclge_vport *vport, u16 reset_type) in hclge_inform_vf_reset() argument 132 dest_vfid = (u8)vport->vport_id; in hclge_inform_vf_reset() 136 return hclge_send_mbx_msg(vport, (u8 *)&msg_data, sizeof(msg_data), in hclge_inform_vf_reset() 140 int hclge_inform_reset_assert_to_vf(struct hclge_vport *vport) in hclge_inform_reset_assert_to_vf() argument 142 struct hclge_dev *hdev = vport->back; in hclge_inform_reset_assert_to_vf() [all …]
|
/linux/Documentation/scsi/ |
H A D | scsi_fc_transport.rst | 57 The FC transport is now recognizing a new object - a vport. A vport is 60 be specified for the vport, with FCP_Initiator being the primary role 64 to create vports. The transport will create the vport object within the 67 on the vport, resulting in a unique <H,C,T,L> namespace for the vport. 79 up to an administrative entity controlling the vport. For example, 81 utility would be responsible for creating wwpn/wwnn's for the vport, 86 Device Trees and Vport Objects: 91 transport creates the vport object and places it under the scsi_host 93 a new scsi_host for the vport and link its object under the vport. 96 allow the parent of the vport to be something other than the scsi_host. [all …]
|
/linux/Documentation/netlink/specs/ |
H A D | ovs_vport.yaml | 9 OVS vport configuration over generic netlink. 20 name: vport-type 22 enum-name: ovs-vport-type 23 name-prefix: ovs-vport-type- 26 name: ovs-vport-stats 56 name: vport-options 57 enum-name: ovs-vport-options 68 enum-name: ovs-vport-upcall-attr 69 name-prefix: ovs-vport-upcall-attr- 79 name: vport [all …]
|
/linux/drivers/scsi/elx/libefc/ |
H A D | efc_nport.c | 18 * - a vport populates associated nport 24 * - the vport is removed 226 * If this is a vport, logout of the fabric in efc_nport_shutdown() 227 * controller so that it deletes the vport in efc_nport_shutdown() 236 efc_log_debug(efc, "[%s] nport shutdown vport, send logo\n", in efc_nport_shutdown() 258 struct efc_vport *vport; in efc_vport_link_down() local 260 /* Clear the nport reference in the vport specification */ in efc_vport_link_down() 261 list_for_each_entry(vport, &efc->vport_list, list_entry) { in efc_vport_link_down() 262 if (vport->nport == nport) { in efc_vport_link_down() 264 vport->nport = NULL; in efc_vport_link_down() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/esw/ |
H A D | qos.c | 71 [SCHED_NODE_TYPE_VPORT] = "vport", 91 /* Valid only if this node is associated with a vport. */ 92 struct mlx5_vport *vport; member 119 void mlx5_esw_qos_vport_qos_free(struct mlx5_vport *vport) in mlx5_esw_qos_vport_qos_free() argument 121 kfree(vport->qos.sched_node); in mlx5_esw_qos_vport_qos_free() 122 memset(&vport->qos, 0, sizeof(vport->qos)); in mlx5_esw_qos_vport_qos_free() 125 u32 mlx5_esw_qos_vport_get_sched_elem_ix(const struct mlx5_vport *vport) in mlx5_esw_qos_vport_get_sched_elem_ix() argument 127 if (!vport->qos.sched_node) in mlx5_esw_qos_vport_get_sched_elem_ix() 130 return vport->qos.sched_node->ix; in mlx5_esw_qos_vport_get_sched_elem_ix() 134 mlx5_esw_qos_vport_get_parent(const struct mlx5_vport *vport) in mlx5_esw_qos_vport_get_parent() argument [all …]
|
H A D | devlink_port.c | 58 struct mlx5_vport *vport) in mlx5_esw_offloads_pf_vf_devlink_port_init() argument 61 u16 vport_num = vport->vport; in mlx5_esw_offloads_pf_vf_devlink_port_init() 73 vport->dl_port = dl_port; in mlx5_esw_offloads_pf_vf_devlink_port_init() 74 mlx5_devlink_port_init(dl_port, vport); in mlx5_esw_offloads_pf_vf_devlink_port_init() 79 struct mlx5_vport *vport) in mlx5_esw_offloads_pf_vf_devlink_port_cleanup() argument 81 if (!vport->dl_port) in mlx5_esw_offloads_pf_vf_devlink_port_cleanup() 84 kfree(vport->dl_port); in mlx5_esw_offloads_pf_vf_devlink_port_cleanup() 85 vport->dl_port = NULL; in mlx5_esw_offloads_pf_vf_devlink_port_cleanup() 120 int mlx5_esw_offloads_sf_devlink_port_init(struct mlx5_eswitch *esw, struct mlx5_vport *vport, in mlx5_esw_offloads_sf_devlink_port_init() argument 126 vport->dl_port = dl_port; in mlx5_esw_offloads_sf_devlink_port_init() [all …]
|