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

Function cpfl_add_cfgqs

dpdk/drivers/net/cpfl/cpfl_ethdev.c:1980–2004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1978}
1979
1980static int
1981cpfl_add_cfgqs(struct cpfl_adapter_ext *adapter)
1982{
1983 struct idpf_ctlq_info *cfg_cq;
1984 int ret = 0;
1985 int i = 0;
1986
1987 for (i = 0; i < CPFL_CFGQ_NUM; i++) {
1988 cfg_cq = NULL;
1989 ret = cpfl_vport_ctlq_add((struct idpf_hw *)(&adapter->base.hw),
1990 &adapter->cfgq_info[i],
1991 &cfg_cq);
1992 if (ret || !cfg_cq) {
1993 PMD_DRV_LOG(ERR, "ctlq add failed for queue id: %d",
1994 adapter->cfgq_info[i].id);
1995 cpfl_remove_cfgqs(adapter);
1996 return ret;
1997 }
1998 PMD_DRV_LOG(INFO, "added cfgq to hw. queue id: %d",
1999 adapter->cfgq_info[i].id);
2000 adapter->ctlqp[i] = cfg_cq;
2001 }
2002
2003 return ret;
2004}
2005
2006#define CPFL_CFGQ_RING_LEN 512
2007#define CPFL_CFGQ_DESCRIPTOR_SIZE 32

Callers 1

cpfl_ctrl_path_openFunction · 0.85

Calls 2

cpfl_vport_ctlq_addFunction · 0.85
cpfl_remove_cfgqsFunction · 0.85

Tested by

no test coverage detected