MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sfc_flow_parse_mark

Function sfc_flow_parse_mark

dpdk/drivers/net/sfc/sfc_flow.c:1584–1605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1582}
1583
1584static int
1585sfc_flow_parse_mark(struct sfc_adapter *sa,
1586 const struct rte_flow_action_mark *mark,
1587 struct rte_flow *flow)
1588{
1589 struct sfc_flow_spec *spec = &flow->spec;
1590 struct sfc_flow_spec_filter *spec_filter = &spec->filter;
1591 const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
1592 uint32_t mark_max;
1593
1594 mark_max = encp->enc_filter_action_mark_max;
1595 if (sfc_ft_is_active(sa))
1596 mark_max = RTE_MIN(mark_max, SFC_FT_USER_MARK_MASK);
1597
1598 if (mark == NULL || mark->id > mark_max)
1599 return EINVAL;
1600
1601 spec_filter->template.efs_flags |= EFX_FILTER_FLAG_ACTION_MARK;
1602 spec_filter->template.efs_mark = mark->id;
1603
1604 return 0;
1605}
1606
1607static int
1608sfc_flow_parse_actions(struct sfc_adapter *sa,

Callers 1

sfc_flow_parse_actionsFunction · 0.85

Calls 2

efx_nic_cfg_getFunction · 0.85
sfc_ft_is_activeFunction · 0.85

Tested by

no test coverage detected