Lines Matching full:app

153 /* DCB APP nested attributes. */
503 struct dcb_app app = { in dcbnl_getapp() local
507 up = dcb_getapp(netdev, &app); in dcbnl_getapp()
572 struct dcb_app app; in dcbnl_setapp() local
573 app.selector = idtype; in dcbnl_setapp()
574 app.protocol = id; in dcbnl_setapp()
575 app.priority = up; in dcbnl_setapp()
576 ret = dcb_setapp(netdev, &app); in dcbnl_setapp()
1019 * retrieve the peer app configuration form the driver. If the driver in dcbnl_build_peer_app()
1034 struct nlattr *app; in dcbnl_build_peer_app() local
1042 app = nla_nest_start_noflag(skb, app_nested_type); in dcbnl_build_peer_app()
1043 if (!app) in dcbnl_build_peer_app()
1055 nla_nest_end(skb, app); in dcbnl_build_peer_app()
1103 /* Set or delete APP table or rewrite table entries. The APP struct is validated
1109 struct dcb_app *app)) in dcbnl_app_table_setdel() argument
1142 struct nlattr *ieee, *app, *rewr; in dcbnl_ieee_fill() local
1220 app = nla_nest_start_noflag(skb, DCB_ATTR_IEEE_APP_TABLE); in dcbnl_ieee_fill()
1221 if (!app) in dcbnl_ieee_fill()
1228 dcbnl_app_attr_type_get(itr->app.selector); in dcbnl_ieee_fill()
1229 err = nla_put(skb, type, sizeof(itr->app), &itr->app); in dcbnl_ieee_fill()
1243 nla_nest_end(skb, app); in dcbnl_ieee_fill()
1253 dcbnl_app_attr_type_get(itr->app.selector); in dcbnl_ieee_fill()
1254 err = nla_put(skb, type, sizeof(itr->app), &itr->app); in dcbnl_ieee_fill()
1365 struct nlattr *cee, *app; in dcbnl_cee_fill() local
1406 /* local app */ in dcbnl_cee_fill()
1408 app = nla_nest_start_noflag(skb, DCB_ATTR_CEE_APP_TABLE); in dcbnl_cee_fill()
1409 if (!app) in dcbnl_cee_fill()
1420 itr->app.selector); in dcbnl_cee_fill()
1425 itr->app.protocol); in dcbnl_cee_fill()
1430 itr->app.priority); in dcbnl_cee_fill()
1437 nla_nest_end(skb, app); in dcbnl_cee_fill()
1970 static struct dcb_app_type *dcb_rewr_lookup(const struct dcb_app *app, in dcb_rewr_lookup() argument
1976 if (itr->app.selector == app->selector && in dcb_rewr_lookup()
1977 itr->app.priority == app->priority && in dcb_rewr_lookup()
1979 ((proto == -1) || itr->app.protocol == proto)) in dcb_rewr_lookup()
1986 static struct dcb_app_type *dcb_app_lookup(const struct dcb_app *app, in dcb_app_lookup() argument
1992 if (itr->app.selector == app->selector && in dcb_app_lookup()
1993 itr->app.protocol == app->protocol && in dcb_app_lookup()
1995 ((prio == -1) || itr->app.priority == prio)) in dcb_app_lookup()
2002 static int dcb_app_add(struct list_head *list, const struct dcb_app *app, in dcb_app_add() argument
2011 memcpy(&entry->app, app, sizeof(*app)); in dcb_app_add()
2021 * @app: application to get user priority of
2027 u8 dcb_getapp(struct net_device *dev, struct dcb_app *app) in dcb_getapp() argument
2033 itr = dcb_app_lookup(app, dev->ifindex, -1); in dcb_getapp()
2035 prio = itr->app.priority; in dcb_getapp()
2043 * dcb_setapp - add CEE dcb application data to app list
2048 * removes applications from the app list if the priority is
2058 memcpy(&event.app, new, sizeof(event.app)); in dcb_setapp()
2067 itr->app.priority = new->priority; in dcb_setapp()
2074 /* App type does not exist add new application type */ in dcb_setapp()
2088 * @app: where to store the retrieve application data
2092 * not found in APP list.
2094 u8 dcb_ieee_getapp_mask(struct net_device *dev, struct dcb_app *app) in dcb_ieee_getapp_mask() argument
2100 itr = dcb_app_lookup(app, dev->ifindex, -1); in dcb_ieee_getapp_mask()
2102 prio |= 1 << itr->app.priority; in dcb_ieee_getapp_mask()
2110 u16 dcb_getrewr(struct net_device *dev, struct dcb_app *app) in dcb_getrewr() argument
2116 itr = dcb_rewr_lookup(app, dev->ifindex, -1); in dcb_getrewr()
2118 proto = itr->app.protocol; in dcb_getrewr()
2167 * dcb_ieee_setapp - add IEEE dcb application data to app list
2182 memcpy(&event.app, new, sizeof(event.app)); in dcb_ieee_setapp()
2207 * This removes a matching APP data from the APP list
2216 memcpy(&event.app, del, sizeof(event.app)); in dcb_ieee_delapp()
2250 itr->app.selector == DCB_APP_SEL_PCP && in dcb_getrewr_prio_pcp_mask_map()
2251 itr->app.protocol < 16 && in dcb_getrewr_prio_pcp_mask_map()
2252 itr->app.priority < IEEE_8021QAZ_MAX_TCS) { in dcb_getrewr_prio_pcp_mask_map()
2253 prio = itr->app.priority; in dcb_getrewr_prio_pcp_mask_map()
2254 p_map->map[prio] |= 1 << itr->app.protocol; in dcb_getrewr_prio_pcp_mask_map()
2276 itr->app.selector == IEEE_8021QAZ_APP_SEL_DSCP && in dcb_getrewr_prio_dscp_mask_map()
2277 itr->app.protocol < 64 && in dcb_getrewr_prio_dscp_mask_map()
2278 itr->app.priority < IEEE_8021QAZ_MAX_TCS) { in dcb_getrewr_prio_dscp_mask_map()
2279 prio = itr->app.priority; in dcb_getrewr_prio_dscp_mask_map()
2280 p_map->map[prio] |= 1ULL << itr->app.protocol; in dcb_getrewr_prio_dscp_mask_map()
2291 * that priority by APP entries.
2305 itr->app.selector == IEEE_8021QAZ_APP_SEL_DSCP && in dcb_ieee_getapp_prio_dscp_mask_map()
2306 itr->app.protocol < 64 && in dcb_ieee_getapp_prio_dscp_mask_map()
2307 itr->app.priority < IEEE_8021QAZ_MAX_TCS) { in dcb_ieee_getapp_prio_dscp_mask_map()
2308 prio = itr->app.priority; in dcb_ieee_getapp_prio_dscp_mask_map()
2309 p_map->map[prio] |= 1ULL << itr->app.protocol; in dcb_ieee_getapp_prio_dscp_mask_map()
2320 * given DSCP value by APP entries.
2334 itr->app.selector == IEEE_8021QAZ_APP_SEL_DSCP && in dcb_ieee_getapp_dscp_prio_mask_map()
2335 itr->app.protocol < 64 && in dcb_ieee_getapp_dscp_prio_mask_map()
2336 itr->app.priority < IEEE_8021QAZ_MAX_TCS) in dcb_ieee_getapp_dscp_prio_mask_map()
2337 p_map->map[itr->app.protocol] |= 1 << itr->app.priority; in dcb_ieee_getapp_dscp_prio_mask_map()
2349 * dcb_ieee_getapp_default_prio_mask - For a given device, find all APP entries
2362 itr->app.selector == IEEE_8021QAZ_APP_SEL_ETHERTYPE && in dcb_ieee_getapp_default_prio_mask()
2363 itr->app.protocol == 0 && in dcb_ieee_getapp_default_prio_mask()
2364 itr->app.priority < IEEE_8021QAZ_MAX_TCS) in dcb_ieee_getapp_default_prio_mask()
2365 mask |= 1 << itr->app.priority; in dcb_ieee_getapp_default_prio_mask()