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

Function ionic_lif_rss_config

dpdk/drivers/net/ionic/ionic_lif.c:1148–1181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1146}
1147
1148int
1149ionic_lif_rss_config(struct ionic_lif *lif,
1150 const uint16_t types, const uint8_t *key, const uint32_t *indir)
1151{
1152 struct ionic_adapter *adapter = lif->adapter;
1153 struct ionic_admin_ctx ctx = {
1154 .pending_work = true,
1155 .cmd.lif_setattr = {
1156 .opcode = IONIC_CMD_LIF_SETATTR,
1157 .attr = IONIC_LIF_ATTR_RSS,
1158 .rss.types = rte_cpu_to_le_16(types),
1159 .rss.addr = rte_cpu_to_le_64(lif->rss_ind_tbl_pa),
1160 },
1161 };
1162 unsigned int i;
1163 uint16_t tbl_sz =
1164 rte_le_to_cpu_16(adapter->ident.lif.eth.rss_ind_tbl_sz);
1165
1166 IONIC_PRINT_CALL();
1167
1168 lif->rss_types = types;
1169
1170 if (key)
1171 memcpy(lif->rss_hash_key, key, IONIC_RSS_HASH_KEY_SIZE);
1172
1173 if (indir)
1174 for (i = 0; i < tbl_sz; i++)
1175 lif->rss_ind_tbl[i] = indir[i];
1176
1177 memcpy(ctx.cmd.lif_setattr.rss.key, lif->rss_hash_key,
1178 IONIC_RSS_HASH_KEY_SIZE);
1179
1180 return ionic_adminq_post_wait(lif, &ctx);
1181}
1182
1183static int
1184ionic_lif_rss_setup(struct ionic_lif *lif)

Callers 4

ionic_lif_rss_setupFunction · 0.85
ionic_lif_rss_teardownFunction · 0.85

Calls 2

ionic_adminq_post_waitFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected