Lines Matching refs:cmd

224 static int bcmasp_flow_insert(struct net_device *dev, struct ethtool_rxnfc *cmd)  in bcmasp_flow_insert()  argument
228 u32 loc = cmd->fs.location; in bcmasp_flow_insert()
231 if (cmd->fs.ring_cookie == RX_CLS_FLOW_WAKE) in bcmasp_flow_insert()
238 switch (cmd->fs.flow_type & ~(FLOW_EXT | FLOW_MAC_EXT)) { in bcmasp_flow_insert()
251 if (bcmasp_netfilt_check_dup(intf, &cmd->fs)) in bcmasp_flow_insert()
259 cmd->fs.location = nfilter->hw_index; in bcmasp_flow_insert()
260 memcpy(&nfilter->fs, &cmd->fs, sizeof(struct ethtool_rx_flow_spec)); in bcmasp_flow_insert()
268 static int bcmasp_flow_delete(struct net_device *dev, struct ethtool_rxnfc *cmd) in bcmasp_flow_delete() argument
273 nfilter = bcmasp_netfilt_get_init(intf, cmd->fs.location, false, false); in bcmasp_flow_delete()
282 static int bcmasp_flow_get(struct bcmasp_intf *intf, struct ethtool_rxnfc *cmd) in bcmasp_flow_get() argument
286 nfilter = bcmasp_netfilt_get_init(intf, cmd->fs.location, false, false); in bcmasp_flow_get()
290 memcpy(&cmd->fs, &nfilter->fs, sizeof(nfilter->fs)); in bcmasp_flow_get()
292 cmd->data = NUM_NET_FILTERS; in bcmasp_flow_get()
297 static int bcmasp_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) in bcmasp_set_rxnfc() argument
304 switch (cmd->cmd) { in bcmasp_set_rxnfc()
306 ret = bcmasp_flow_insert(dev, cmd); in bcmasp_set_rxnfc()
309 ret = bcmasp_flow_delete(dev, cmd); in bcmasp_set_rxnfc()
320 static int bcmasp_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, in bcmasp_get_rxnfc() argument
328 switch (cmd->cmd) { in bcmasp_get_rxnfc()
330 cmd->rule_cnt = bcmasp_netfilt_get_active(intf); in bcmasp_get_rxnfc()
332 cmd->data |= RX_CLS_LOC_SPECIAL; in bcmasp_get_rxnfc()
335 err = bcmasp_flow_get(intf, cmd); in bcmasp_get_rxnfc()
338 err = bcmasp_netfilt_get_all_active(intf, rule_locs, &cmd->rule_cnt); in bcmasp_get_rxnfc()
339 cmd->data = NUM_NET_FILTERS; in bcmasp_get_rxnfc()