DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
       [not found] <SG2PR04MB3173B935587AE7E8599C7DF9E4239@SG2PR04MB3173.apcprd04.prod.outlook.com>
@ 2021-05-27  7:39 ` Vishal Mohan
  2021-05-27  8:11   ` Xing, Beilei
  0 siblings, 1 reply; 9+ messages in thread
From: Vishal Mohan @ 2021-05-27  7:39 UTC (permalink / raw)
  To: users

I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with X710 - quad port in DPDK 20.11 with no success. I was able to implement the same in DPDK 17.11 with a combination of RSS flags  given below and rte_eth_dev_filter_ctrl():

.rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_FRAG_IPV4 |
ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP)

and selecting input fields as dst and src ip for every rss_hf flag using rte_eth_dev_filter_ctrl().

In DPDK 20.11, I believe there is no explicit usage of using rte_eth_dev_filter_ctrl() instead we can configure the hashing with the generic rte_flow api. I did configure a flow validate and create the same, but the hashing is not working as expected. Without flags ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing takes place and with those flags included in .rss_hf, 5 tuple hashing takes place.

When using rte_flow api, any flags given in rte_flow_action_rss.types has no effect on the final RSS hash result. Also the RSS hashing in the given testpmd isn't working when it is configured in "ip" (2 tuple) mode.

Any inputs for configuring RSS hashing for 2 tuple is much appreciated.


Thanks & Regards,
 Vishal Mohan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
  2021-05-27  7:39 ` [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration Vishal Mohan
@ 2021-05-27  8:11   ` Xing, Beilei
  2021-05-27  9:45     ` Vishal Mohan
  0 siblings, 1 reply; 9+ messages in thread
From: Xing, Beilei @ 2021-05-27  8:11 UTC (permalink / raw)
  To: Vishal Mohan, users

Hi,

I remember there's no legacy API rte_eth_dev_filter_ctrl()  supported in 20.11.
Please refer to RSS Flow part in i40e.rst:

Enable hash and set input set for ipv4-tcp.
    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \
      actions rss types ipv4-tcp l3-src-only end queues end / end

BR,
Beilei

> -----Original Message-----
> From: users <users-bounces@dpdk.org> On Behalf Of Vishal Mohan
> Sent: Thursday, May 27, 2021 3:40 PM
> To: users@dpdk.org
> Subject: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
> 
> I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with X710 -
> quad port in DPDK 20.11 with no success. I was able to implement the same
> in DPDK 17.11 with a combination of RSS flags  given below and
> rte_eth_dev_filter_ctrl():
> 
> .rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER |
> ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP |
> ETH_RSS_NONFRAG_IPV4_TCP)
> 
> and selecting input fields as dst and src ip for every rss_hf flag using
> rte_eth_dev_filter_ctrl().
> 
> In DPDK 20.11, I believe there is no explicit usage of using
> rte_eth_dev_filter_ctrl() instead we can configure the hashing with the
> generic rte_flow api. I did configure a flow validate and create the same, but
> the hashing is not working as expected. Without flags
> ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing
> takes place and with those flags included in .rss_hf, 5 tuple hashing takes
> place.
> 
> When using rte_flow api, any flags given in rte_flow_action_rss.types has no
> effect on the final RSS hash result. Also the RSS hashing in the given testpmd
> isn't working when it is configured in "ip" (2 tuple) mode.
> 
> Any inputs for configuring RSS hashing for 2 tuple is much appreciated.
> 
> 
> Thanks & Regards,
>  Vishal Mohan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
  2021-05-27  8:11   ` Xing, Beilei
@ 2021-05-27  9:45     ` Vishal Mohan
  2021-05-28  1:23       ` Xing, Beilei
  0 siblings, 1 reply; 9+ messages in thread
From: Vishal Mohan @ 2021-05-27  9:45 UTC (permalink / raw)
  To: Xing, Beilei, users

Hi Beilei,

Thanks for the pointer. By using l3-src-only, I was able to run testpmd on 1 tuple mode. But no success when configured manually. Please find the snippet below of my rte_eth_conf and flow conf for your kind perusal:

static struct rte_eth_conf port_conf_default = {
        .rxmode = {
                .mq_mode = ETH_MQ_RX_RSS,
        },
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
                        .rss_key_len = 40,
                        .rss_hf = ETH_RSS_NONFRAG_IPV4_UDP,
                },
        }
};

struct rte_flow_item pattern[] = {
        [0] = {
                .type = RTE_FLOW_ITEM_TYPE_ETH,
        },
        [1] = {
                .type = RTE_FLOW_ITEM_TYPE_IPV4,
        },
        [2] = {
                .type = RTE_FLOW_ITEM_TYPE_UDP,
        },
[3] = {
                .type = RTE_FLOW_ITEM_TYPE_END,
        }
};

struct rte_flow_action_rss action_rss = {
        .types = ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY,
        .queue_num = 10,
        .queue = queue_ids,
};

struct rte_flow_action action[] = {

        [0] = {
                .type = RTE_FLOW_ACTION_TYPE_RSS,
                .conf = &action_rss
        },

        [1] = {
                .type = RTE_FLOW_ACTION_TYPE_END,
        }
};

struct rte_flow_attr attr = {
        .egress = 0,
        .ingress = 1
};

struct rte_flow_error err;

retval = rte_flow_validate(portid, &attr,
                        pattern, action, &err);
printf("retval %d %d\n",retval,-ENOTSUP);

if(!retval){
        struct rte_flow *flow = rte_flow_create(portid, &attr, pattern, action, &err);
}

The above given flow validates and adds successfully but no effect on RSS hashing. Also I did not set .spec and .mask for patterns assuming  ETH_RSS_L3_SRC_ONLY will take care of the fields looked into.
Can you please point out if im missing anything here ?

Thanks & Regards,
Vishal Mohan

-----Original Message-----
From: Xing, Beilei <beilei.xing@intel.com>
Sent: 27 May 2021 01:42 PM
To: Vishal Mohan <vishal.mohan@tatacommunications.com>; users@dpdk.org
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

I remember there's no legacy API rte_eth_dev_filter_ctrl()  supported in 20.11.
Please refer to RSS Flow part in i40e.rst:

Enable hash and set input set for ipv4-tcp.
    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \
      actions rss types ipv4-tcp l3-src-only end queues end / end

BR,
Beilei

> -----Original Message-----
> From: users <mailto:users-bounces@dpdk.org> On Behalf Of Vishal Mohan
> Sent: Thursday, May 27, 2021 3:40 PM
> To: mailto:users@dpdk.org
> Subject: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
>
> I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with
> X710 - quad port in DPDK 20.11 with no success. I was able to
> implement the same in DPDK 17.11 with a combination of RSS flags
> given below and
> rte_eth_dev_filter_ctrl():
>
> .rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER |
> ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP |
> ETH_RSS_NONFRAG_IPV4_TCP)
>
> and selecting input fields as dst and src ip for every rss_hf flag
> using rte_eth_dev_filter_ctrl().
>
> In DPDK 20.11, I believe there is no explicit usage of using
> rte_eth_dev_filter_ctrl() instead we can configure the hashing with
> the generic rte_flow api. I did configure a flow validate and create
> the same, but the hashing is not working as expected. Without flags
> ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing takes
> place and with those flags included in .rss_hf, 5 tuple hashing takes
> place.
>
> When using rte_flow api, any flags given in rte_flow_action_rss.types
> has no effect on the final RSS hash result. Also the RSS hashing in
> the given testpmd isn't working when it is configured in "ip" (2 tuple) mode.
>
> Any inputs for configuring RSS hashing for 2 tuple is much appreciated.
>
>
> Thanks & Regards,
>  Vishal Mohan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
  2021-05-27  9:45     ` Vishal Mohan
@ 2021-05-28  1:23       ` Xing, Beilei
  2021-05-28  3:36         ` Zhang, AlvinX
  2021-05-28  6:56         ` Zhang, AlvinX
  0 siblings, 2 replies; 9+ messages in thread
From: Xing, Beilei @ 2021-05-28  1:23 UTC (permalink / raw)
  To: Vishal Mohan, users, Zhang, AlvinX

+ Alvin.

Could you please help on it? Thanks.

BR,
Beilei

From: Vishal Mohan <vishal.mohan@tatacommunications.com>
Sent: Thursday, May 27, 2021 5:45 PM
To: Xing, Beilei <beilei.xing@intel.com>; users@dpdk.org
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Beilei,

Thanks for the pointer. By using l3-src-only, I was able to run testpmd on 1 tuple mode. But no success when configured manually. Please find the snippet below of my rte_eth_conf and flow conf for your kind perusal:

static struct rte_eth_conf port_conf_default = {
        .rxmode = {
                .mq_mode = ETH_MQ_RX_RSS,
        },
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
                        .rss_key_len = 40,
                        .rss_hf = ETH_RSS_NONFRAG_IPV4_UDP,
                },
        }
};

struct rte_flow_item pattern[] = {
        [0] = {
                .type = RTE_FLOW_ITEM_TYPE_ETH,
        },
        [1] = {
                .type = RTE_FLOW_ITEM_TYPE_IPV4,
        },
        [2] = {
                .type = RTE_FLOW_ITEM_TYPE_UDP,
        },
[3] = {
                .type = RTE_FLOW_ITEM_TYPE_END,
        }
};

struct rte_flow_action_rss action_rss = {
        .types = ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY,
        .queue_num = 10,
        .queue = queue_ids,
};

struct rte_flow_action action[] = {

        [0] = {
                .type = RTE_FLOW_ACTION_TYPE_RSS,
                .conf = &action_rss
        },

        [1] = {
                .type = RTE_FLOW_ACTION_TYPE_END,
        }
};

struct rte_flow_attr attr = {
        .egress = 0,
        .ingress = 1
};

struct rte_flow_error err;

retval = rte_flow_validate(portid, &attr,
                        pattern, action, &err);
printf("retval %d %d\n",retval,-ENOTSUP);

if(!retval){
        struct rte_flow *flow = rte_flow_create(portid, &attr, pattern, action, &err);
}

The above given flow validates and adds successfully but no effect on RSS hashing. Also I did not set .spec and .mask for patterns assuming ETH_RSS_L3_SRC_ONLY will take care of the fields looked into.
Can you please point out if im missing anything here ?

Thanks & Regards,
Vishal Mohan

-----Original Message-----
From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: 27 May 2021 01:42 PM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

I remember there's no legacy API rte_eth_dev_filter_ctrl()  supported in 20.11.
Please refer to RSS Flow part in i40e.rst:

Enable hash and set input set for ipv4-tcp.
    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \
      actions rss types ipv4-tcp l3-src-only end queues end / end

BR,
Beilei

> -----Original Message-----
> From: users <mailto:users-bounces@dpdk.org> On Behalf Of Vishal Mohan
> Sent: Thursday, May 27, 2021 3:40 PM
> To: mailto:users@dpdk.org
> Subject: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
>
> I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with
> X710 - quad port in DPDK 20.11 with no success. I was able to
> implement the same in DPDK 17.11 with a combination of RSS flags
> given below and
> rte_eth_dev_filter_ctrl():
>
> .rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER |
> ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP |
> ETH_RSS_NONFRAG_IPV4_TCP)
>
> and selecting input fields as dst and src ip for every rss_hf flag
> using rte_eth_dev_filter_ctrl().
>
> In DPDK 20.11, I believe there is no explicit usage of using
> rte_eth_dev_filter_ctrl() instead we can configure the hashing with
> the generic rte_flow api. I did configure a flow validate and create
> the same, but the hashing is not working as expected. Without flags
> ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing takes
> place and with those flags included in .rss_hf, 5 tuple hashing takes
> place.
>
> When using rte_flow api, any flags given in rte_flow_action_rss.types
> has no effect on the final RSS hash result. Also the RSS hashing in
> the given testpmd isn't working when it is configured in "ip" (2 tuple) mode.
>
> Any inputs for configuring RSS hashing for 2 tuple is much appreciated.
>
>
> Thanks & Regards,
>  Vishal Mohan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
  2021-05-28  1:23       ` Xing, Beilei
@ 2021-05-28  3:36         ` Zhang, AlvinX
  2021-05-28  6:56         ` Zhang, AlvinX
  1 sibling, 0 replies; 9+ messages in thread
From: Zhang, AlvinX @ 2021-05-28  3:36 UTC (permalink / raw)
  To: Xing, Beilei, Vishal Mohan, users; +Cc: Yu, PingX

Hi Beilei,

We will try it ASAP.

BRs,
Alvin Zhang

From: Xing, Beilei <beilei.xing@intel.com>
Sent: Friday, May 28, 2021 9:24 AM
To: Vishal Mohan <vishal.mohan@tatacommunications.com>; users@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

+ Alvin.

Could you please help on it? Thanks.

BR,
Beilei

From: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>
Sent: Thursday, May 27, 2021 5:45 PM
To: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Beilei,

Thanks for the pointer. By using l3-src-only, I was able to run testpmd on 1 tuple mode. But no success when configured manually. Please find the snippet below of my rte_eth_conf and flow conf for your kind perusal:

static struct rte_eth_conf port_conf_default = {
        .rxmode = {
                .mq_mode = ETH_MQ_RX_RSS,
        },
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
                        .rss_key_len = 40,
                        .rss_hf = ETH_RSS_NONFRAG_IPV4_UDP,
                },
        }
};

struct rte_flow_item pattern[] = {
        [0] = {
                .type = RTE_FLOW_ITEM_TYPE_ETH,
        },
        [1] = {
                .type = RTE_FLOW_ITEM_TYPE_IPV4,
        },
        [2] = {
                .type = RTE_FLOW_ITEM_TYPE_UDP,
        },
[3] = {
                .type = RTE_FLOW_ITEM_TYPE_END,
        }
};

struct rte_flow_action_rss action_rss = {
        .types = ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY,
        .queue_num = 10,
        .queue = queue_ids,
};

struct rte_flow_action action[] = {

        [0] = {
                .type = RTE_FLOW_ACTION_TYPE_RSS,
                .conf = &action_rss
        },

        [1] = {
                .type = RTE_FLOW_ACTION_TYPE_END,
        }
};

struct rte_flow_attr attr = {
        .egress = 0,
        .ingress = 1
};

struct rte_flow_error err;

retval = rte_flow_validate(portid, &attr,
                        pattern, action, &err);
printf("retval %d %d\n",retval,-ENOTSUP);

if(!retval){
        struct rte_flow *flow = rte_flow_create(portid, &attr, pattern, action, &err);
}

The above given flow validates and adds successfully but no effect on RSS hashing. Also I did not set .spec and .mask for patterns assuming ETH_RSS_L3_SRC_ONLY will take care of the fields looked into.
Can you please point out if im missing anything here ?

Thanks & Regards,
Vishal Mohan

-----Original Message-----
From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: 27 May 2021 01:42 PM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

I remember there's no legacy API rte_eth_dev_filter_ctrl()  supported in 20.11.
Please refer to RSS Flow part in i40e.rst:

Enable hash and set input set for ipv4-tcp.
    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \
      actions rss types ipv4-tcp l3-src-only end queues end / end

BR,
Beilei

> -----Original Message-----
> From: users <mailto:users-bounces@dpdk.org> On Behalf Of Vishal Mohan
> Sent: Thursday, May 27, 2021 3:40 PM
> To: mailto:users@dpdk.org
> Subject: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
>
> I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with
> X710 - quad port in DPDK 20.11 with no success. I was able to
> implement the same in DPDK 17.11 with a combination of RSS flags
> given below and
> rte_eth_dev_filter_ctrl():
>
> .rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER |
> ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP |
> ETH_RSS_NONFRAG_IPV4_TCP)
>
> and selecting input fields as dst and src ip for every rss_hf flag
> using rte_eth_dev_filter_ctrl().
>
> In DPDK 20.11, I believe there is no explicit usage of using
> rte_eth_dev_filter_ctrl() instead we can configure the hashing with
> the generic rte_flow api. I did configure a flow validate and create
> the same, but the hashing is not working as expected. Without flags
> ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing takes
> place and with those flags included in .rss_hf, 5 tuple hashing takes
> place.
>
> When using rte_flow api, any flags given in rte_flow_action_rss.types
> has no effect on the final RSS hash result. Also the RSS hashing in
> the given testpmd isn't working when it is configured in "ip" (2 tuple) mode.
>
> Any inputs for configuring RSS hashing for 2 tuple is much appreciated.
>
>
> Thanks & Regards,
>  Vishal Mohan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
  2021-05-28  1:23       ` Xing, Beilei
  2021-05-28  3:36         ` Zhang, AlvinX
@ 2021-05-28  6:56         ` Zhang, AlvinX
  2021-05-28  8:47           ` Vishal Mohan
  1 sibling, 1 reply; 9+ messages in thread
From: Zhang, AlvinX @ 2021-05-28  6:56 UTC (permalink / raw)
  To: Xing, Beilei, Vishal Mohan, users

Hi Vishal Mohan

We have tried based on commit b1d36cf828771e28eb0130b59dcf606c2a0bc94d(version: 20.11.0)

0000:81:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' drv=vfio-pci unused=i40e
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd  -c 0xff -n 4 -a 0000:81:00.0 -- -i --rxq=64 --txq=64 --port-topology=loop

flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end queues end / end

packet=[Ether()/IP(dst="192.168.1.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180
packet=[Ether()/IP(dst="192.168.1.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180

packet=[Ether()/IP(dst="192.168.1.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0xead3c21e

packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0xead3c21e
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=230)/("X"*480) -->RSS hash = 0xead3c21e
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=202,dport=23)/("X"*480) -->RSS hash = 0xead3c21e

Is this you expected?

BRs,
Alvin Zhang

From: Xing, Beilei <beilei.xing@intel.com>
Sent: Friday, May 28, 2021 9:24 AM
To: Vishal Mohan <vishal.mohan@tatacommunications.com>; users@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

+ Alvin.

Could you please help on it? Thanks.

BR,
Beilei

From: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>
Sent: Thursday, May 27, 2021 5:45 PM
To: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Beilei,

Thanks for the pointer. By using l3-src-only, I was able to run testpmd on 1 tuple mode. But no success when configured manually. Please find the snippet below of my rte_eth_conf and flow conf for your kind perusal:

static struct rte_eth_conf port_conf_default = {
        .rxmode = {
                .mq_mode = ETH_MQ_RX_RSS,
        },
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
                        .rss_key_len = 40,
                        .rss_hf = ETH_RSS_NONFRAG_IPV4_UDP,
                },
        }
};

struct rte_flow_item pattern[] = {
        [0] = {
                .type = RTE_FLOW_ITEM_TYPE_ETH,
        },
        [1] = {
                .type = RTE_FLOW_ITEM_TYPE_IPV4,
        },
        [2] = {
                .type = RTE_FLOW_ITEM_TYPE_UDP,
        },
[3] = {
                .type = RTE_FLOW_ITEM_TYPE_END,
        }
};

struct rte_flow_action_rss action_rss = {
        .types = ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY,
        .queue_num = 10,
        .queue = queue_ids,
};

struct rte_flow_action action[] = {

        [0] = {
                .type = RTE_FLOW_ACTION_TYPE_RSS,
                .conf = &action_rss
        },

        [1] = {
                .type = RTE_FLOW_ACTION_TYPE_END,
        }
};

struct rte_flow_attr attr = {
        .egress = 0,
        .ingress = 1
};

struct rte_flow_error err;

retval = rte_flow_validate(portid, &attr,
                        pattern, action, &err);
printf("retval %d %d\n",retval,-ENOTSUP);

if(!retval){
        struct rte_flow *flow = rte_flow_create(portid, &attr, pattern, action, &err);
}

The above given flow validates and adds successfully but no effect on RSS hashing. Also I did not set .spec and .mask for patterns assuming ETH_RSS_L3_SRC_ONLY will take care of the fields looked into.
Can you please point out if im missing anything here ?

Thanks & Regards,
Vishal Mohan

-----Original Message-----
From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: 27 May 2021 01:42 PM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

I remember there's no legacy API rte_eth_dev_filter_ctrl()  supported in 20.11.
Please refer to RSS Flow part in i40e.rst:

Enable hash and set input set for ipv4-tcp.
    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \
      actions rss types ipv4-tcp l3-src-only end queues end / end

BR,
Beilei

> -----Original Message-----
> From: users <mailto:users-bounces@dpdk.org> On Behalf Of Vishal Mohan
> Sent: Thursday, May 27, 2021 3:40 PM
> To: mailto:users@dpdk.org
> Subject: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
>
> I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with
> X710 - quad port in DPDK 20.11 with no success. I was able to
> implement the same in DPDK 17.11 with a combination of RSS flags
> given below and
> rte_eth_dev_filter_ctrl():
>
> .rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER |
> ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP |
> ETH_RSS_NONFRAG_IPV4_TCP)
>
> and selecting input fields as dst and src ip for every rss_hf flag
> using rte_eth_dev_filter_ctrl().
>
> In DPDK 20.11, I believe there is no explicit usage of using
> rte_eth_dev_filter_ctrl() instead we can configure the hashing with
> the generic rte_flow api. I did configure a flow validate and create
> the same, but the hashing is not working as expected. Without flags
> ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing takes
> place and with those flags included in .rss_hf, 5 tuple hashing takes
> place.
>
> When using rte_flow api, any flags given in rte_flow_action_rss.types
> has no effect on the final RSS hash result. Also the RSS hashing in
> the given testpmd isn't working when it is configured in "ip" (2 tuple) mode.
>
> Any inputs for configuring RSS hashing for 2 tuple is much appreciated.
>
>
> Thanks & Regards,
>  Vishal Mohan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
  2021-05-28  6:56         ` Zhang, AlvinX
@ 2021-05-28  8:47           ` Vishal Mohan
  2021-05-30 14:22             ` Vishal Mohan
  0 siblings, 1 reply; 9+ messages in thread
From: Vishal Mohan @ 2021-05-28  8:47 UTC (permalink / raw)
  To: Zhang, AlvinX, Xing, Beilei, users

Hi Alvin,

Thanks for your effort in verifying. As mentioned below I was able to achieve the same behaviour as below but not when I do it manually using rte_flow apis. Can you please take a look at the code snippet in the trail mail to point me if I'm missing anything.

Thanks & Regards,

Vishal Mohan
From: Zhang, AlvinX <alvinx.zhang@intel.com>
Sent: 28 May 2021 12:27 PM
To: Xing, Beilei <beilei.xing@intel.com>; Vishal Mohan <vishal.mohan@tatacommunications.com>; users@dpdk.org
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Vishal Mohan

We have tried based on commit b1d36cf828771e28eb0130b59dcf606c2a0bc94d(version: 20.11.0)

0000:81:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' drv=vfio-pci unused=i40e
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd  -c 0xff -n 4 -a 0000:81:00.0 -- -i --rxq=64 --txq=64 --port-topology=loop

flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end queues end / end

packet=[Ether()/IP(dst="192.168.1.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180
packet=[Ether()/IP(dst="192.168.1.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180

packet=[Ether()/IP(dst="192.168.1.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0xead3c21e

packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0xead3c21e
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=230)/("X"*480) -->RSS hash = 0xead3c21e
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=202,dport=23)/("X"*480) -->RSS hash = 0xead3c21e

Is this you expected?

BRs,
Alvin Zhang

From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: Friday, May 28, 2021 9:24 AM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>; Zhang, AlvinX <alvinx.zhang@intel.com<mailto:alvinx.zhang@intel.com>>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

+ Alvin.

Could you please help on it? Thanks.

BR,
Beilei

From: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>
Sent: Thursday, May 27, 2021 5:45 PM
To: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Beilei,

Thanks for the pointer. By using l3-src-only, I was able to run testpmd on 1 tuple mode. But no success when configured manually. Please find the snippet below of my rte_eth_conf and flow conf for your kind perusal:

static struct rte_eth_conf port_conf_default = {
        .rxmode = {
                .mq_mode = ETH_MQ_RX_RSS,
        },
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
                        .rss_key_len = 40,
                        .rss_hf = ETH_RSS_NONFRAG_IPV4_UDP,
                },
        }
};

struct rte_flow_item pattern[] = {
        [0] = {
                .type = RTE_FLOW_ITEM_TYPE_ETH,
        },
        [1] = {
                .type = RTE_FLOW_ITEM_TYPE_IPV4,
        },
        [2] = {
                .type = RTE_FLOW_ITEM_TYPE_UDP,
        },
[3] = {
                .type = RTE_FLOW_ITEM_TYPE_END,
        }
};

struct rte_flow_action_rss action_rss = {
        .types = ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY,
        .queue_num = 10,
        .queue = queue_ids,
};

struct rte_flow_action action[] = {

        [0] = {
                .type = RTE_FLOW_ACTION_TYPE_RSS,
                .conf = &action_rss
        },

        [1] = {
                .type = RTE_FLOW_ACTION_TYPE_END,
        }
};

struct rte_flow_attr attr = {
        .egress = 0,
        .ingress = 1
};

struct rte_flow_error err;

retval = rte_flow_validate(portid, &attr,
                        pattern, action, &err);
printf("retval %d %d\n",retval,-ENOTSUP);

if(!retval){
        struct rte_flow *flow = rte_flow_create(portid, &attr, pattern, action, &err);
}

The above given flow validates and adds successfully but no effect on RSS hashing. Also I did not set .spec and .mask for patterns assuming ETH_RSS_L3_SRC_ONLY will take care of the fields looked into.
Can you please point out if im missing anything here ?

Thanks & Regards,
Vishal Mohan

-----Original Message-----
From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: 27 May 2021 01:42 PM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

I remember there's no legacy API rte_eth_dev_filter_ctrl()  supported in 20.11.
Please refer to RSS Flow part in i40e.rst:

Enable hash and set input set for ipv4-tcp.
    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \
      actions rss types ipv4-tcp l3-src-only end queues end / end

BR,
Beilei

> -----Original Message-----
> From: users <mailto:users-bounces@dpdk.org> On Behalf Of Vishal Mohan
> Sent: Thursday, May 27, 2021 3:40 PM
> To: mailto:users@dpdk.org
> Subject: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
>
> I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with
> X710 - quad port in DPDK 20.11 with no success. I was able to
> implement the same in DPDK 17.11 with a combination of RSS flags
> given below and
> rte_eth_dev_filter_ctrl():
>
> .rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER |
> ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP |
> ETH_RSS_NONFRAG_IPV4_TCP)
>
> and selecting input fields as dst and src ip for every rss_hf flag
> using rte_eth_dev_filter_ctrl().
>
> In DPDK 20.11, I believe there is no explicit usage of using
> rte_eth_dev_filter_ctrl() instead we can configure the hashing with
> the generic rte_flow api. I did configure a flow validate and create
> the same, but the hashing is not working as expected. Without flags
> ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing takes
> place and with those flags included in .rss_hf, 5 tuple hashing takes
> place.
>
> When using rte_flow api, any flags given in rte_flow_action_rss.types
> has no effect on the final RSS hash result. Also the RSS hashing in
> the given testpmd isn't working when it is configured in "ip" (2 tuple) mode.
>
> Any inputs for configuring RSS hashing for 2 tuple is much appreciated.
>
>
> Thanks & Regards,
>  Vishal Mohan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
  2021-05-28  8:47           ` Vishal Mohan
@ 2021-05-30 14:22             ` Vishal Mohan
  2021-05-31  1:52               ` Zhang, AlvinX
  0 siblings, 1 reply; 9+ messages in thread
From: Vishal Mohan @ 2021-05-30 14:22 UTC (permalink / raw)
  To: Zhang, AlvinX, Xing, Beilei, users

Hi Alvin and Beilei,

I was able to implement 1 tuple for all the flows after not defining .queue and .queue_num in struct rte_flow_action_rss.  Im still trying to do 2 tuple (src and dst) at the same level which seems not possible by the documentations. Any suggestions to address that ?

Thank you for the inputs.

Regards,
Vishal Mohan
From: Vishal Mohan
Sent: 28 May 2021 02:18 PM
To: Zhang, AlvinX <alvinx.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>; users@dpdk.org
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Alvin,

Thanks for your effort in verifying. As mentioned below I was able to achieve the same behaviour as below but not when I do it manually using rte_flow apis. Can you please take a look at the code snippet in the trail mail to point me if I'm missing anything.

Thanks & Regards,

Vishal Mohan
From: Zhang, AlvinX <alvinx.zhang@intel.com<mailto:alvinx.zhang@intel.com>>
Sent: 28 May 2021 12:27 PM
To: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Vishal Mohan

We have tried based on commit b1d36cf828771e28eb0130b59dcf606c2a0bc94d(version: 20.11.0)

0000:81:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' drv=vfio-pci unused=i40e
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd  -c 0xff -n 4 -a 0000:81:00.0 -- -i --rxq=64 --txq=64 --port-topology=loop

flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end queues end / end

packet=[Ether()/IP(dst="192.168.1.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180
packet=[Ether()/IP(dst="192.168.1.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180

packet=[Ether()/IP(dst="192.168.1.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0xead3c21e

packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0xead3c21e
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=230)/("X"*480) -->RSS hash = 0xead3c21e
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=202,dport=23)/("X"*480) -->RSS hash = 0xead3c21e

Is this you expected?

BRs,
Alvin Zhang

From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: Friday, May 28, 2021 9:24 AM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>; Zhang, AlvinX <alvinx.zhang@intel.com<mailto:alvinx.zhang@intel.com>>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

+ Alvin.

Could you please help on it? Thanks.

BR,
Beilei

From: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>
Sent: Thursday, May 27, 2021 5:45 PM
To: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Beilei,

Thanks for the pointer. By using l3-src-only, I was able to run testpmd on 1 tuple mode. But no success when configured manually. Please find the snippet below of my rte_eth_conf and flow conf for your kind perusal:

static struct rte_eth_conf port_conf_default = {
        .rxmode = {
                .mq_mode = ETH_MQ_RX_RSS,
        },
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
                        .rss_key_len = 40,
                        .rss_hf = ETH_RSS_NONFRAG_IPV4_UDP,
                },
        }
};

struct rte_flow_item pattern[] = {
        [0] = {
                .type = RTE_FLOW_ITEM_TYPE_ETH,
        },
        [1] = {
                .type = RTE_FLOW_ITEM_TYPE_IPV4,
        },
        [2] = {
                .type = RTE_FLOW_ITEM_TYPE_UDP,
        },
[3] = {
                .type = RTE_FLOW_ITEM_TYPE_END,
        }
};

struct rte_flow_action_rss action_rss = {
        .types = ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY,
        .queue_num = 10,
        .queue = queue_ids,
};

struct rte_flow_action action[] = {

        [0] = {
                .type = RTE_FLOW_ACTION_TYPE_RSS,
                .conf = &action_rss
        },

        [1] = {
                .type = RTE_FLOW_ACTION_TYPE_END,
        }
};

struct rte_flow_attr attr = {
        .egress = 0,
        .ingress = 1
};

struct rte_flow_error err;

retval = rte_flow_validate(portid, &attr,
                        pattern, action, &err);
printf("retval %d %d\n",retval,-ENOTSUP);

if(!retval){
        struct rte_flow *flow = rte_flow_create(portid, &attr, pattern, action, &err);
}

The above given flow validates and adds successfully but no effect on RSS hashing. Also I did not set .spec and .mask for patterns assuming ETH_RSS_L3_SRC_ONLY will take care of the fields looked into.
Can you please point out if im missing anything here ?

Thanks & Regards,
Vishal Mohan

-----Original Message-----
From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: 27 May 2021 01:42 PM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

I remember there's no legacy API rte_eth_dev_filter_ctrl()  supported in 20.11.
Please refer to RSS Flow part in i40e.rst:

Enable hash and set input set for ipv4-tcp.
    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \
      actions rss types ipv4-tcp l3-src-only end queues end / end

BR,
Beilei

> -----Original Message-----
> From: users <mailto:users-bounces@dpdk.org> On Behalf Of Vishal Mohan
> Sent: Thursday, May 27, 2021 3:40 PM
> To: mailto:users@dpdk.org
> Subject: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
>
> I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with
> X710 - quad port in DPDK 20.11 with no success. I was able to
> implement the same in DPDK 17.11 with a combination of RSS flags
> given below and
> rte_eth_dev_filter_ctrl():
>
> .rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER |
> ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP |
> ETH_RSS_NONFRAG_IPV4_TCP)
>
> and selecting input fields as dst and src ip for every rss_hf flag
> using rte_eth_dev_filter_ctrl().
>
> In DPDK 20.11, I believe there is no explicit usage of using
> rte_eth_dev_filter_ctrl() instead we can configure the hashing with
> the generic rte_flow api. I did configure a flow validate and create
> the same, but the hashing is not working as expected. Without flags
> ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing takes
> place and with those flags included in .rss_hf, 5 tuple hashing takes
> place.
>
> When using rte_flow api, any flags given in rte_flow_action_rss.types
> has no effect on the final RSS hash result. Also the RSS hashing in
> the given testpmd isn't working when it is configured in "ip" (2 tuple) mode.
>
> Any inputs for configuring RSS hashing for 2 tuple is much appreciated.
>
>
> Thanks & Regards,
>  Vishal Mohan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
  2021-05-30 14:22             ` Vishal Mohan
@ 2021-05-31  1:52               ` Zhang, AlvinX
  0 siblings, 0 replies; 9+ messages in thread
From: Zhang, AlvinX @ 2021-05-31  1:52 UTC (permalink / raw)
  To: Vishal Mohan, Xing, Beilei, users; +Cc: Yu, PingX, Guo, Junfeng, Yang, Qiming

Hi Mohan,

You can use this flow:
flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l3-dst-only end queues end / end

BRs,
Alvin Zhang

From: Vishal Mohan <vishal.mohan@tatacommunications.com>
Sent: Sunday, May 30, 2021 10:23 PM
To: Zhang, AlvinX <alvinx.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>; users@dpdk.org
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Alvin and Beilei,

I was able to implement 1 tuple for all the flows after not defining .queue and .queue_num in struct rte_flow_action_rss.  Im still trying to do 2 tuple (src and dst) at the same level which seems not possible by the documentations. Any suggestions to address that ?

Thank you for the inputs.

Regards,
Vishal Mohan
From: Vishal Mohan
Sent: 28 May 2021 02:18 PM
To: Zhang, AlvinX <alvinx.zhang@intel.com<mailto:alvinx.zhang@intel.com>>; Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Alvin,

Thanks for your effort in verifying. As mentioned below I was able to achieve the same behaviour as below but not when I do it manually using rte_flow apis. Can you please take a look at the code snippet in the trail mail to point me if I'm missing anything.

Thanks & Regards,

Vishal Mohan
From: Zhang, AlvinX <alvinx.zhang@intel.com<mailto:alvinx.zhang@intel.com>>
Sent: 28 May 2021 12:27 PM
To: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Vishal Mohan

We have tried based on commit b1d36cf828771e28eb0130b59dcf606c2a0bc94d(version: 20.11.0)

0000:81:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' drv=vfio-pci unused=i40e
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd  -c 0xff -n 4 -a 0000:81:00.0 -- -i --rxq=64 --txq=64 --port-topology=loop

flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end queues end / end

packet=[Ether()/IP(dst="192.168.1.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180
packet=[Ether()/IP(dst="192.168.1.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180

packet=[Ether()/IP(dst="192.168.1.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0x6a12e180
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0xead3c21e

packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=23)/("X"*480) -->RSS hash = 0xead3c21e
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=22,dport=230)/("X"*480) -->RSS hash = 0xead3c21e
packet=[Ether()/IP(dst="192.169.1.2", src="192.16.0.2")/TCP(sport=202,dport=23)/("X"*480) -->RSS hash = 0xead3c21e

Is this you expected?

BRs,
Alvin Zhang

From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: Friday, May 28, 2021 9:24 AM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>; Zhang, AlvinX <alvinx.zhang@intel.com<mailto:alvinx.zhang@intel.com>>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

+ Alvin.

Could you please help on it? Thanks.

BR,
Beilei

From: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>
Sent: Thursday, May 27, 2021 5:45 PM
To: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

Hi Beilei,

Thanks for the pointer. By using l3-src-only, I was able to run testpmd on 1 tuple mode. But no success when configured manually. Please find the snippet below of my rte_eth_conf and flow conf for your kind perusal:

static struct rte_eth_conf port_conf_default = {
        .rxmode = {
                .mq_mode = ETH_MQ_RX_RSS,
        },
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
                        .rss_key_len = 40,
                        .rss_hf = ETH_RSS_NONFRAG_IPV4_UDP,
                },
        }
};

struct rte_flow_item pattern[] = {
        [0] = {
                .type = RTE_FLOW_ITEM_TYPE_ETH,
        },
        [1] = {
                .type = RTE_FLOW_ITEM_TYPE_IPV4,
        },
        [2] = {
                .type = RTE_FLOW_ITEM_TYPE_UDP,
        },
[3] = {
                .type = RTE_FLOW_ITEM_TYPE_END,
        }
};

struct rte_flow_action_rss action_rss = {
        .types = ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY,
        .queue_num = 10,
        .queue = queue_ids,
};

struct rte_flow_action action[] = {

        [0] = {
                .type = RTE_FLOW_ACTION_TYPE_RSS,
                .conf = &action_rss
        },

        [1] = {
                .type = RTE_FLOW_ACTION_TYPE_END,
        }
};

struct rte_flow_attr attr = {
        .egress = 0,
        .ingress = 1
};

struct rte_flow_error err;

retval = rte_flow_validate(portid, &attr,
                        pattern, action, &err);
printf("retval %d %d\n",retval,-ENOTSUP);

if(!retval){
        struct rte_flow *flow = rte_flow_create(portid, &attr, pattern, action, &err);
}

The above given flow validates and adds successfully but no effect on RSS hashing. Also I did not set .spec and .mask for patterns assuming ETH_RSS_L3_SRC_ONLY will take care of the fields looked into.
Can you please point out if im missing anything here ?

Thanks & Regards,
Vishal Mohan

-----Original Message-----
From: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>
Sent: 27 May 2021 01:42 PM
To: Vishal Mohan <vishal.mohan@tatacommunications.com<mailto:vishal.mohan@tatacommunications.com>>; users@dpdk.org<mailto:users@dpdk.org>
Subject: RE: DPDK 20.11 - i40e 2 tuple RSS configuration

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

I remember there's no legacy API rte_eth_dev_filter_ctrl()  supported in 20.11.
Please refer to RSS Flow part in i40e.rst:

Enable hash and set input set for ipv4-tcp.
    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end \
      actions rss types ipv4-tcp l3-src-only end queues end / end

BR,
Beilei

> -----Original Message-----
> From: users <mailto:users-bounces@dpdk.org> On Behalf Of Vishal Mohan
> Sent: Thursday, May 27, 2021 3:40 PM
> To: mailto:users@dpdk.org
> Subject: [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration
>
> I'm trying to implement RSS with 2 tuple (src ip, dst ip) hashing with
> X710 - quad port in DPDK 20.11 with no success. I was able to
> implement the same in DPDK 17.11 with a combination of RSS flags
> given below and
> rte_eth_dev_filter_ctrl():
>
> .rss_hf = (ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER |
> ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP |
> ETH_RSS_NONFRAG_IPV4_TCP)
>
> and selecting input fields as dst and src ip for every rss_hf flag
> using rte_eth_dev_filter_ctrl().
>
> In DPDK 20.11, I believe there is no explicit usage of using
> rte_eth_dev_filter_ctrl() instead we can configure the hashing with
> the generic rte_flow api. I did configure a flow validate and create
> the same, but the hashing is not working as expected. Without flags
> ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV4_TCP no hashing takes
> place and with those flags included in .rss_hf, 5 tuple hashing takes
> place.
>
> When using rte_flow api, any flags given in rte_flow_action_rss.types
> has no effect on the final RSS hash result. Also the RSS hashing in
> the given testpmd isn't working when it is configured in "ip" (2 tuple) mode.
>
> Any inputs for configuring RSS hashing for 2 tuple is much appreciated.
>
>
> Thanks & Regards,
>  Vishal Mohan


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-31  1:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <SG2PR04MB3173B935587AE7E8599C7DF9E4239@SG2PR04MB3173.apcprd04.prod.outlook.com>
2021-05-27  7:39 ` [dpdk-users] DPDK 20.11 - i40e 2 tuple RSS configuration Vishal Mohan
2021-05-27  8:11   ` Xing, Beilei
2021-05-27  9:45     ` Vishal Mohan
2021-05-28  1:23       ` Xing, Beilei
2021-05-28  3:36         ` Zhang, AlvinX
2021-05-28  6:56         ` Zhang, AlvinX
2021-05-28  8:47           ` Vishal Mohan
2021-05-30 14:22             ` Vishal Mohan
2021-05-31  1:52               ` Zhang, AlvinX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).