Hi,

Not sure if I understand correctly but I have tried to send the Match vector 
zero prepended (n_skip*16 = 12*16 = 192 zeros and then the actual data) and in 
this case the value is displayed using vppctl command, but I am not sure if it 
works correctly. We have some automated tests which failed after this change.
API call
ClassifyAddDelSession{isAdd=1, tableIndex=0, hitNextIndex=0, opaqueIndex=0, 
advance=0, action=0, metadata=0, matchLen=208, match=[0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -64, -88, 1, 2, 0, 0]}

sudo vppctl show classify tables verbose
  TableIdx  Sessions   NextTbl  NextNode
         0         1        -1        -1
  Heap: total: 1.06M, used: 1.27K, free: 1.06M, trimmable: 1.06M
no traced allocations

  nbuckets 2, skip 12 match 1 flag 0 offset 0
  mask 00000000000000000000ffffffff0000
  linear-search buckets 0

[1]: heap offset 1136, elts 2, normal
    0: [1136]: next_index 0 advance 0 opaque 1 action 0 metadata 0
        k: 00000000000000000000c0a801020000
        hits 0, last_heard 0.00

But how would I do this using vppctl because when I used
“sudo vppctl classify session policer-hit-next policy1 exceed-color table-index 
0 match l3 ip4 src 192.168.1.2”
The response was also “k: 00000000000000000000000000000000”

I tried to understand how it should be done using guide provided at 
https://wiki.fd.io/view/VPP/Introduction_To_N-tuple_Classifiers, where it is 
said that:
“Match is the key for the indicated session. It need not be aligned, but it 
must be table->match_n_vectors*16 octets in length.”
So  I thought that match is not aligned but it needs to be of proper length. 
That is the original implementation we had in honeycomb (data are at beginning 
of match vector and the rest is filled with zeros and matches the desired 
length)

So how is it, does match need to be prepended in classify session?
And how should I replicate this using vppctl command because the command I used 
behaves the same way (it shows all 0 for k: value)


M.

[https://www.cisco.com/c/dam/m/en_us/signaturetool/images/banners/standard/06_standard_graphic.png]




Michal Cmarada
Engineer - Software
mcmar...@cisco.com<mailto:mcmar...@cisco.com>
Tel:










Cisco Systems, Inc.



Slovakia
cisco.com



[http://www.cisco.com/assets/swa/img/thinkbeforeyouprint.gif]

Think before you print.

This email may contain confidential and privileged material for the sole use of 
the intended recipient. Any review, use, distribution or disclosure by others 
is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete 
all copies of this message.
Please click 
here<http://www.cisco.com/c/en/us/about/legal/terms-sale-software-license-agreement/company-registration-information.html>
 for Company Registration Information.







From: Andrew 👽 Yourtchenko <ayour...@gmail.com>
Sent: Thursday, March 28, 2019 12:34 PM
To: Michal Cmarada -X (mcmarada - PANTHEON TECHNOLOGIES at Cisco) 
<mcmar...@cisco.com>
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Classify session weird behavior

Where do you point into the session data vector argument when creating it ?

IIRC you need to point to the point *before* the n-skip vectors - i.e. the 
argument needs to include the “skipped” data as well.

That is if I you have skip 3 words and match 2, the session data vector to be 
passed as a parameter needs to be 5 words.

Back in the time when I noticed it I rationalized it that you might want to 
create sessions from the same packet data so recalculating the offer each time 
can be a pain.


--a

On 28 Mar 2019, at 12:08, Michal Cmarada via Lists.Fd.Io 
<mcmarada=cisco....@lists.fd.io<mailto:mcmarada=cisco....@lists.fd.io>> wrote:
Hi VPP devs, Raj,

We had an issue when configuring classify session  for classify table, where 
the n_skip_vector value is more than zero. The same issue happens when I am 
creating the configuration over API or via vppctl. The match “k: 
00000000000000000000000000000000” value is always all zeros in both API and 
vppctl responses. I believe it should be “k: 00000000000000000000c0a801020000” 
that is the match ip of 192.168.1.2.

Can someone check whether there is a bug and the value is not configured at all 
or only the data shown to the user are wrongly interpreted?

I added Raj to copy. He noticed this originally and will try to test the 
configuration on his setup.

Raj: If you have more data available after testing, please provide them here. 
Thanks

API CALLS EXAMPLE:
ClassifyAddDelTable{isAdd=1, delChain=0, tableIndex=-1, nbuckets=2, 
memorySize=1048576, skipNVectors=12, matchNVectors=1, nextTableIndex=-1, 
missNextIndex=-1, currentDataFlag=0, currentDataOffset=0, maskLen=16, mask=[0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0]}
ClassifyAddDelSession{isAdd=1, tableIndex=0, hitNextIndex=0, opaqueIndex=0, 
advance=0, action=0, metadata=0, matchLen=208, match=[0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, -64, -88, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
ClassifySessionDetailsReplyDump{classifySessionDetails=[ClassifySessionDetails{context=99,
 tableId=0, hitNextIndex=0, advance=0, opaqueIndex=1, matchLength=16, match=[0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]}

sudo vppctl show classify tables verbose
  TableIdx  Sessions   NextTbl  NextNode
         0         1        -1        -1
  Heap: total: 1.06M, used: 1.27K, free: 1.06M, trimmable: 1.06M
no traced allocations

  nbuckets 2, skip 12 match 1 flag 0 offset 0
  mask 00000000000000000000ffffffff0000
  linear-search buckets 0

[0]: heap offset 1136, elts 2, normal
    0: [1136]: next_index 0 advance 0 opaque 1 action 0 metadata 0
        k: 00000000000000000000000000000000
        hits 0, last_heard 0.00

    1 active elements
    1 free lists
    0 linear-search buckets

VPPCTL EXAMPLE:
        sudo vppctl classify table mask l3 ip4 src skip 12
        sudo vppctl classify session policer-hit-next policy1 exceed-color 
table-index 0 match l3 ip4 src 192.168.1.2

        sudo vppctl show classify tables verbose
          TableIdx  Sessions   NextTbl  NextNode
                 0         1        -1        -1
          Heap: total: 2.06M, used: 1.27K, free: 2.06M, trimmable: 2.06M
        no traced allocations

          nbuckets 2, skip 12 match 1 flag 0 offset 0
          mask 00000000000000000000ffffffff0000
          linear-search buckets 0

        [0]: heap offset 1136, elts 2, normal
            0: [1136]: next_index 0 advance 0 opaque 1 action 0 metadata 0
                k: 00000000000000000000000000000000
                hits 0, last_heard 0.00

            1 active elements
            1 free lists
            0 linear-search buckets


Thanks
Michal

<image001.png>




Michal Cmarada
Engineer - Software
mcmar...@cisco.com<mailto:mcmar...@cisco.com>
Tel:










Cisco Systems, Inc.



Slovakia
cisco.com<http://cisco.com>



<image002.gif>

Think before you print.

This email may contain confidential and privileged material for the sole use of 
the intended recipient. Any review, use, distribution or disclosure by others 
is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete 
all copies of this message.
Please click 
here<http://www.cisco.com/c/en/us/about/legal/terms-sale-software-license-agreement/company-registration-information.html>
 for Company Registration Information.







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12657): https://lists.fd.io/g/vpp-dev/message/12657
Mute This Topic: https://lists.fd.io/mt/30810146/675608
Group Owner: vpp-dev+ow...@lists.fd.io<mailto:vpp-dev+ow...@lists.fd.io>
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  
[ayour...@gmail.com<mailto:ayour...@gmail.com>]
-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12659): https://lists.fd.io/g/vpp-dev/message/12659
Mute This Topic: https://lists.fd.io/mt/30810146/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to