2 -- Copyright (c) 2010-2017 Intel Corporation
4 -- Licensed under the Apache License, Version 2.0 (the "License");
5 -- you may not use this file except in compliance with the License.
6 -- You may obtain a copy of the License at
8 -- http://www.apache.org/licenses/LICENSE-2.0
10 -- Unless required by applicable law or agreed to in writing, software
11 -- distributed under the License is distributed on an "AS IS" BASIS,
12 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 -- See the License for the specific language governing permissions and
14 -- limitations under the License.
17 -- This script generates a user table containing 131072 users. It is
18 -- meant to be used in a BNG with 4 CPE facing ports. Each of the CPE
19 -- facing ports has 32768 users behind it. Each user has a unique
20 -- svlan/cvlan combination. The only difference between the two sets
21 -- of users is the svlan id. Note that any arbitrary configuration is
30 -- svlan_id is 000000000XXXXXXX at the bit level
31 -- cvlan_id is 0000XXXX00XX00XX at the bit level
32 svlan_id = mask(idx, 0x7f00) / 2^8,
33 cvlan_id = mask(idx, 0xf0) * 2^4 + mask(idx, 0xc) * 2^2 + mask(idx, 0x3),
40 user_table[2^15 + i] = {
42 -- svlan_id is 000000001XXXXXXX at the bit level
43 -- cvlan_id is 0000XXXX00XX00XX at the bit level
44 svlan_id = mask(idx, 0x7f00) / 2^8 + 0x80,
45 cvlan_id = mask(idx, 0xf0) * 2^4 + mask(idx, 0xc) * 2^2 + mask(idx, 0x3),
52 user_table[2*2^15 + i] = {
53 gre_id = 2*2^15 + idx,
54 -- svlan_id is 000000010XXXXXXX at the bit level
55 -- cvlan_id is 0000XXXX00XX00XX at the bit level
56 svlan_id = mask(idx, 0x7f00) / 2^8 + 0x100,
57 cvlan_id = mask(idx, 0xf0) * 2^4 + mask(idx, 0xc) * 2^2 + mask(idx, 0x3),
64 user_table[3*2^15 + i] = {
65 gre_id = 3*2^15 + idx,
66 -- svlan_id is 000000011XXXXXXX at the bit level
67 -- cvlan_id is 0000XXXX00XX00XX at the bit level
68 svlan_id = mask(idx, 0x7f00) / 2^8 + 0x180,
69 cvlan_id = mask(idx, 0xf0) * 2^4 + mask(idx, 0xc) * 2^2 + mask(idx, 0x3),