Skip to content

Commit

Permalink
dpdk/rss: remove unused code and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Kiripolsky authored and Adam Kiripolsky committed Oct 31, 2024
1 parent 37d67b2 commit 132b794
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
4 changes: 2 additions & 2 deletions src/runmode-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,8 @@ static DPDKIfaceConfig *ConfigParse(const char *iface)

static void DeviceSetPMDSpecificRSS(struct rte_eth_rss_conf *rss_conf, const char *driver_name)
{
// if (strcmp(driver_name, "net_i40e") == 0)
// i40eDeviceSetRSSConf(rss_conf);
if (strcmp(driver_name, "net_i40e") == 0)
i40eDeviceSetRSSConf(rss_conf);
if (strcmp(driver_name, "net_ice") == 0)
iceDeviceSetRSSConf(rss_conf);
// if (strcmp(driver_name, "net_ixgbe") == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/util-dpdk-i40e.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static int i40eDeviceSetRSSWithFlows(int port_id, const char *port_name, int nb_
return retval;
}

DeviceSetRSSAction(&rss_action_conf, rss_conf, 0, queues, RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, false);
DeviceSetRSSAction(&rss_action_conf, rss_conf, 0, queues, RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, true);

retval = 0;

Expand Down
24 changes: 2 additions & 22 deletions src/util-dpdk-rss.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,37 +62,17 @@ void DeviceSetRSSAction(struct rte_flow_action_rss *rss_action_conf, struct rte
static int DeviceCreateRSSFlow(int port_id, const char *port_name, struct rte_flow_action_rss *rss_conf,
uint64_t rss_type, struct rte_flow_item *pattern, int nb_rx_queues)
{
// struct rte_flow_action_rss rss_action_conf = { 0 };
struct rte_flow_attr attr = { 0 };
struct rte_flow_action action[] = { { 0 }, { 0 } };
struct rte_flow *flow;
struct rte_flow_error flow_error = { 0 };

// rss_action_conf.func = RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
// rss_action_conf.level = 0;
rss_conf->types = rss_type;

//rss_action_conf.queue_num = nb_rx_queues;

// if (nb_rx_queues != 0) {
// uint16_t queues[RTE_MAX_QUEUES_PER_PORT];

// rss_action_conf.key_len = rss_conf.rss_key_len;
// rss_action_conf.key = rss_conf.rss_key;
// rss_action_conf.queue_num = nb_rx_queues;

// for (int i = 0; i < nb_rx_queues; ++i)
// queues[i] = i;

// rss_action_conf.queue = queues;
// } else {
// rss_action_conf.queue = NULL;
// }

// for (size_t i = 0; i < 40; i++) {
// SCLogInfo("RSS key is: %0x", rss_conf.rss_key[i]);
// SCLogInfo("RSS key is: %0x", rss_conf->key[i]);
// }
// SCLogInfo("RSS key length is: %u", rss_conf.rss_key);
// SCLogInfo("RSS key length is: %u", rss_conf->key_len);

// SCLogInfo("number of queues: %u", nb_rx_queues);
attr.ingress = 1;
Expand Down

0 comments on commit 132b794

Please sign in to comment.