Re: [PATCH net-next RFC 0/6] Configure cloud filters in i40e via tc/flower classifier
On 8/2/2017 5:01 AM, Jamal Hadi Salim wrote: > On 17-08-01 08:57 PM, Nambiar, Amritha wrote: >> >> On 8/1/2017 3:15 AM, Jamal Hadi Salim wrote: >>> On 17-07-31 08:36 PM, Amritha Nambiar wrote: > # tc filter add dev eth0 protocol ip parent : prio 1 flower\ dst_ip 192.168.1.1/32 ip_proto udp dst_port 22\ skip_sw indev eth0 action mirred ingress redirect dev eth0 tc 1 >>> >>> I think "queue 1" sounds better than "tc 1". >>> "tc" is already a keyword in a few places (even within that declaration >>> above). >> >> The idea is to redirect to a traffic class that has queues assigned to >> it and not a single queue i.e. these are actually queue groups and not a >> single queue. So may be "qgroup 1" or "tcqgroup 1" fits better. >> > > Can you describe how this works? So the specific memeber of a > a tcgroups show up on a specific rx DMA ring? If you only have > 16 and 512 RX DMA rings - how does that work? > The Rx rule here is to redirect packets a specific traffic class. It is the traffic class index (queue group index) that is offloaded to the device. Queues were already configured for the traffic class by mapping the queue counts and offsets and offloading this layout using the mqprio framework. I had submitted a patch series for this which uses a new hardware offload mode in mqprio to offload the TCs, the queue configurations and the bandwidth rates for the TCs. So the 512 rings can be mapped into 16 TCs using the mqprio offload mechanism, something like this: TC0 : 0 – 15 TC1: 16 – 31 TC2: 32 – 33 TC3: 34 – 49 . . . TC15: 500 - 511 Now, once the TC configuration is prepared, it is just a matter of hooking up the Rx rules to route traffic to the traffic class/queue group. Rx queue selection within the queue group happens based on RSS. > cheers, > jamal >
Re: [PATCH net-next RFC 0/6] Configure cloud filters in i40e via tc/flower classifier
On 17-08-01 08:57 PM, Nambiar, Amritha wrote: On 8/1/2017 3:15 AM, Jamal Hadi Salim wrote: On 17-07-31 08:36 PM, Amritha Nambiar wrote: # tc filter add dev eth0 protocol ip parent : prio 1 flower\ dst_ip 192.168.1.1/32 ip_proto udp dst_port 22\ skip_sw indev eth0 action mirred ingress redirect dev eth0 tc 1 I think "queue 1" sounds better than "tc 1". "tc" is already a keyword in a few places (even within that declaration above). The idea is to redirect to a traffic class that has queues assigned to it and not a single queue i.e. these are actually queue groups and not a single queue. So may be "qgroup 1" or "tcqgroup 1" fits better. Can you describe how this works? So the specific memeber of a a tcgroups show up on a specific rx DMA ring? If you only have 16 and 512 RX DMA rings - how does that work? cheers, jamal
Re: [PATCH net-next RFC 0/6] Configure cloud filters in i40e via tc/flower classifier
On 8/1/2017 3:15 AM, Jamal Hadi Salim wrote: > On 17-07-31 08:36 PM, Amritha Nambiar wrote: >> This patch series enables configuring cloud filters in i40e >> using the tc/flower classifier. The only tc-filter action >> supported is to redirect packets to a traffic class on the >> same device. The tc/mirred:redirect action is extended to >> accept a traffic class to achieve this. >> >> The cloud filters are added for a VSI and are cleaned up when >> the VSI is deleted. The filters that match on L4 ports needs >> enhanced admin queue functions with big buffer support for >> extended general fields in Add/Remove Cloud filters command. >> >> Example: >> # tc qdisc add dev eth0 ingress >> >> # ethtool -K eth0 hw-tc-offload on >> >> # tc filter add dev eth0 protocol ip parent : prio 1 flower\ >>dst_ip 192.168.1.1/32 ip_proto udp dst_port 22\ >>skip_sw indev eth0 action mirred ingress redirect dev eth0 tc 1 >> > > I think "queue 1" sounds better than "tc 1". > "tc" is already a keyword in a few places (even within that declaration > above). The idea is to redirect to a traffic class that has queues assigned to it and not a single queue i.e. these are actually queue groups and not a single queue. So may be "qgroup 1" or "tcqgroup 1" fits better. > > cheers, > jamal >
Re: [Intel-wired-lan] [PATCH net-next RFC 0/6] Configure cloud filters in i40e via tc/flower classifier
If this is an RFC patchset, then all the patches should have RFC in them. On 7/31/2017 5:36 PM, Amritha Nambiar wrote: This patch series enables configuring cloud filters in i40e using the tc/flower classifier. The only tc-filter action supported is to redirect packets to a traffic class on the same device. The tc/mirred:redirect action is extended to accept a traffic class to achieve this. The cloud filters are added for a VSI and are cleaned up when the VSI is deleted. The filters that match on L4 ports needs enhanced admin queue functions with big buffer support for extended general fields in Add/Remove Cloud filters command. Example: # tc qdisc add dev eth0 ingress # ethtool -K eth0 hw-tc-offload on # tc filter add dev eth0 protocol ip parent : prio 1 flower\ dst_ip 192.168.1.1/32 ip_proto udp dst_port 22\ skip_sw indev eth0 action mirred ingress redirect dev eth0 tc 1 # tc filter show dev eth0 parent : filter protocol ip pref 1 flower filter protocol ip pref 1 flower handle 0x1 indev eth0 eth_type ipv4 ip_proto udp dst_ip 192.168.1.1 dst_port 22 skip_sw in_hw action order 1: mirred (Ingress Redirect to device eth0) stolen tc 1 index 1 ref 1 bind 1 --- Amritha Nambiar (6): [net-next]net: sched: act_mirred: Extend redirect action to accept a traffic class [net-next]net: i40e: Maintain a mapping of TCs with the VSI seids [net-next]net: i40e: Extend set switch config command to accept cloud filter mode [net-next]net: i40e: Admin queue definitions for cloud filters [net-next]net: i40e: Clean up of cloud filters [net-next]net: i40e: Enable cloud filters in i40e via tc/flower classifier drivers/net/ethernet/intel/i40e/i40e.h| 58 + drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 132 +++ drivers/net/ethernet/intel/i40e/i40e_common.c | 184 drivers/net/ethernet/intel/i40e/i40e_ethtool.c|2 drivers/net/ethernet/intel/i40e/i40e_main.c | 983 + drivers/net/ethernet/intel/i40e/i40e_prototype.h | 19 drivers/net/ethernet/intel/i40e/i40e_type.h |9 include/net/tc_act/tc_mirred.h|7 include/uapi/linux/tc_act/tc_mirred.h |5 net/sched/act_mirred.c| 17 10 files changed, 1408 insertions(+), 8 deletions(-) -- ___ Intel-wired-lan mailing list intel-wired-...@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Re: [PATCH net-next RFC 0/6] Configure cloud filters in i40e via tc/flower classifier
On 17-07-31 08:36 PM, Amritha Nambiar wrote: This patch series enables configuring cloud filters in i40e using the tc/flower classifier. The only tc-filter action supported is to redirect packets to a traffic class on the same device. The tc/mirred:redirect action is extended to accept a traffic class to achieve this. The cloud filters are added for a VSI and are cleaned up when the VSI is deleted. The filters that match on L4 ports needs enhanced admin queue functions with big buffer support for extended general fields in Add/Remove Cloud filters command. Example: # tc qdisc add dev eth0 ingress # ethtool -K eth0 hw-tc-offload on # tc filter add dev eth0 protocol ip parent : prio 1 flower\ dst_ip 192.168.1.1/32 ip_proto udp dst_port 22\ skip_sw indev eth0 action mirred ingress redirect dev eth0 tc 1 I think "queue 1" sounds better than "tc 1". "tc" is already a keyword in a few places (even within that declaration above). cheers, jamal
[PATCH net-next RFC 0/6] Configure cloud filters in i40e via tc/flower classifier
This patch series enables configuring cloud filters in i40e using the tc/flower classifier. The only tc-filter action supported is to redirect packets to a traffic class on the same device. The tc/mirred:redirect action is extended to accept a traffic class to achieve this. The cloud filters are added for a VSI and are cleaned up when the VSI is deleted. The filters that match on L4 ports needs enhanced admin queue functions with big buffer support for extended general fields in Add/Remove Cloud filters command. Example: # tc qdisc add dev eth0 ingress # ethtool -K eth0 hw-tc-offload on # tc filter add dev eth0 protocol ip parent : prio 1 flower\ dst_ip 192.168.1.1/32 ip_proto udp dst_port 22\ skip_sw indev eth0 action mirred ingress redirect dev eth0 tc 1 # tc filter show dev eth0 parent : filter protocol ip pref 1 flower filter protocol ip pref 1 flower handle 0x1 indev eth0 eth_type ipv4 ip_proto udp dst_ip 192.168.1.1 dst_port 22 skip_sw in_hw action order 1: mirred (Ingress Redirect to device eth0) stolen tc 1 index 1 ref 1 bind 1 --- Amritha Nambiar (6): [net-next]net: sched: act_mirred: Extend redirect action to accept a traffic class [net-next]net: i40e: Maintain a mapping of TCs with the VSI seids [net-next]net: i40e: Extend set switch config command to accept cloud filter mode [net-next]net: i40e: Admin queue definitions for cloud filters [net-next]net: i40e: Clean up of cloud filters [net-next]net: i40e: Enable cloud filters in i40e via tc/flower classifier drivers/net/ethernet/intel/i40e/i40e.h| 58 + drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 132 +++ drivers/net/ethernet/intel/i40e/i40e_common.c | 184 drivers/net/ethernet/intel/i40e/i40e_ethtool.c|2 drivers/net/ethernet/intel/i40e/i40e_main.c | 983 + drivers/net/ethernet/intel/i40e/i40e_prototype.h | 19 drivers/net/ethernet/intel/i40e/i40e_type.h |9 include/net/tc_act/tc_mirred.h|7 include/uapi/linux/tc_act/tc_mirred.h |5 net/sched/act_mirred.c| 17 10 files changed, 1408 insertions(+), 8 deletions(-) --