Lines Matching defs:node
92 mde_cookie_t node, uint16_t *pvidp, vsw_vlanid_t **vidspp,
95 mde_cookie_t node, uint64_t *bw);
97 md_t *mdp, mde_cookie_t *node);
99 mde_cookie_t node);
100 static void vsw_mtu_read(vsw_t *vswp, md_t *mdp, mde_cookie_t node,
103 static void vsw_linkprop_read(vsw_t *vswp, md_t *mdp, mde_cookie_t node,
105 static void vsw_bandwidth_read(vsw_t *vswp, md_t *mdp, mde_cookie_t node,
141 extern int vsw_port_add(vsw_t *vswp, md_t *mdp, mde_cookie_t *node);
203 * property is not present in the MD device node. Therefore, this should not be
483 * Specification of an MD node passed to the MDEG to filter any
484 * 'vport' nodes that do not belong to the specified node. This
936 * node. This property is the name of the physical device that
947 vsw_get_md_physname(vsw_t *vswp, md_t *mdp, mde_cookie_t node, char *name)
960 if (md_get_prop_data(mdp, node, physdev_propname,
1015 * Read the 'vsw-switch-mode' property from the specified MD node.
1020 vsw_get_md_smodes(vsw_t *vswp, md_t *mdp, mde_cookie_t node, uint8_t *mode)
1034 if (md_get_prop_data(mdp, node, smode_propname,
1233 * MD node properties.
1408 DERR(vswp, "%s: mdeg_register failed (%d) for vsw node",
1470 * Mdeg callback invoked for the vsw node itself.
1477 mde_cookie_t node;
1492 * We get an initial callback for this node as 'added'
1494 * already gathered information about this vsw node by
1497 * node might have changed when we get this initial 'added'
1500 * the properties of this vsw-node if any.
1503 * updated and that a virtual-network-switch node is
1517 node = resp->added.mdep[0];
1529 node = resp->match_curr.mdep[0];
1536 if (md_get_prop_str(mdp, node, "name", &node_name) != 0) {
1537 DERR(vswp, "%s: unable to get node name\n", __func__);
1543 DERR(vswp, "%s: Invalid node name: %s\n",
1548 if (md_get_prop_val(mdp, node, "cfg-handle", &inst)) {
1561 vsw_update_md_prop(vswp, mdp, node);
1568 * under the vsw node.
1576 mde_cookie_t node;
1593 node = resp->added.mdep[idx];
1595 D2(vswp, "%s: adding node(%d) 0x%lx", __func__, idx, node);
1597 if ((rv = vsw_port_add(vswp, mdp, &node)) != 0) {
1599 "(0x%lx), err=%d", vswp->instance, node, rv);
1606 node = resp->removed.mdep[idx];
1608 if (md_get_prop_val(mdp, node, id_propname, &inst)) {
1614 D2(vswp, "%s: removing node(%d) 0x%lx", __func__, idx, node);
1655 * In each 'virtual-device' node in the MD there is a
1659 * stores it in the 'reg' property of the appropriate node in
1703 * the 'reg' property to find the right node in MD and then
1741 * Read the initial start-of-day values from the specified MD node.
1744 vsw_get_initial_md_properties(vsw_t *vswp, md_t *mdp, mde_cookie_t node)
1750 if (vsw_get_md_physname(vswp, mdp, node, vswp->physname) != 0) {
1755 if (md_get_prop_val(mdp, node, macaddr_propname, &macaddr) != 0) {
1763 if (vsw_get_md_smodes(vswp, mdp, node, &vswp->smode)) {
1775 vsw_linkprop_read(vswp, mdp, node, &vswp->pls_update);
1778 vsw_mtu_read(vswp, mdp, node, &vswp->mtu);
1786 vsw_vlan_read_ids(vswp, VSW_LOCALDEV, mdp, node, &vswp->pvid,
1790 vsw_read_pri_eth_types(vswp, mdp, node);
1793 vsw_bandwidth_read(vswp, mdp, node, &vswp->bandwidth);
1800 * Read vlan id properties of the given MD node.
1805 * node: md node cookie
1808 * pvidp: port-vlan-id of the node
1809 * vidspp: list of vlan-ids of the node
1811 * default_idp: default-vlan-id of the node(if node is vsw device)
1814 vsw_vlan_read_ids(void *arg, int type, md_t *mdp, mde_cookie_t node,
1851 rv = md_get_prop_val(mdp, node, vsw_dvid_propname, &val);
1864 rv = md_get_prop_val(mdp, node, pvid_propname, &val);
1875 rv = md_get_prop_data(mdp, node, vid_propname, (uint8_t **)&data,
1901 vsw_port_read_bandwidth(vsw_port_t *portp, md_t *mdp, mde_cookie_t node,
1910 rv = md_get_prop_val(mdp, node, port_maxbw_propname, &val);
1937 vsw_read_pri_eth_types(vsw_t *vswp, md_t *mdp, mde_cookie_t node)
1946 rv = md_get_prop_data(mdp, node, pri_types_propname,
1986 vsw_mtu_read(vsw_t *vswp, md_t *mdp, mde_cookie_t node, uint32_t *mtu)
1996 rv = md_get_prop_val(mdp, node, mtu_propname, &val);
2056 vsw_linkprop_read(vsw_t *vswp, md_t *mdp, mde_cookie_t node,
2065 rv = md_get_prop_val(mdp, node, linkpropname, &val);
2099 vsw_bandwidth_read(vsw_t *vswp, md_t *mdp, mde_cookie_t node, uint64_t *bw)
2105 rv = md_get_prop_val(mdp, node, vsw_maxbw_propname, &val);
2118 * Check to see if the relevant properties in the specified node have
2127 * properties in the port node within the MD have actually changed.
2130 vsw_update_md_prop(vsw_t *vswp, md_t *mdp, mde_cookie_t node)
2161 if (vsw_get_md_physname(vswp, mdp, node, (char *)&physname) == 0) {
2195 if (md_get_prop_val(mdp, node, macaddr_propname, &macaddr) != 0) {
2224 if (vsw_get_md_smodes(vswp, mdp, node, &new_smode)) {
2238 vsw_vlan_read_ids(vswp, VSW_LOCALDEV, mdp, node, &pvid, &vids,
2250 vsw_mtu_read(vswp, mdp, node, &mtu);
2264 vsw_linkprop_read(vswp, mdp, node, &pls_update);
2270 vsw_bandwidth_read(vswp, mdp, node, &maxbw);
2452 md_t *mdp, mde_cookie_t *node)
2465 if (md_get_prop_val(mdp, *node, id_propname, &inst)) {
2472 * Find the channel endpoint node(s) (which should be under this
2473 * port node) which contain the channel id(s).
2483 /* allocate enough space for node list */
2487 nchan = md_scan_dag(mdp, *node, md_find_name(mdp, chan_propname),
2498 /* use property from first node found */
2512 if (md_get_prop_data(mdp, *node, remaddr_propname,
2547 /* read vlan id properties of this port node */
2548 vsw_vlan_read_ids(portp, VSW_VNETPORT, mdp, *node, &portp->pvid,
2552 if (md_get_prop_val(mdp, *node, hybrid_propname, &val) == 0) {
2565 vsw_port_read_bandwidth(portp, mdp, *node, &portp->p_bandwidth);
2576 vsw_port_add(vsw_t *vswp, md_t *mdp, mde_cookie_t *node)
2583 rv = vsw_port_read_props(portp, vswp, mdp, node);