Lines Matching +full:port +full:- +full:number

1 // SPDX-License-Identifier: GPL-2.0
8 * - Matching Rules: These registers define the criteria for matching incoming
13 * - Action Rules: These registers define how the ACL should modify the packet's
18 * - Processing Rules: These registers control the overall behavior of the ACL,
23 * +----------------------+
24 * +----------------------+ | (optional) |
27 * +----------------------+ +----------------------+
31 * +----------------------+
35 * +----------------------+
38 * +----------------------+
43 * +----------------------+
117 * ksz9477_dump_acl_index - Print the ACL entry at the specified index
127 * Return: 1 if the entry is non-empty and printed, 0 otherwise.
149 dev_err(dev->dev, " Entry %02d, prio: %02d : %s", index, in ksz9477_dump_acl_index()
156 * ksz9477_dump_acl - Print ACL entries
170 if (count != KSZ9477_ACL_MAX_ENTRIES - 1) in ksz9477_dump_acl()
171 dev_err(dev->dev, " Empty ACL entries were skipped\n"); in ksz9477_dump_acl()
175 * ksz9477_acl_is_valid_matching_rule - Check if an ACL entry contains a valid
206 * ksz9477_acl_get_cont_entr - Get count of contiguous ACL entries and validate
209 * @port: Port number.
224 * and returns the number of these contiguous entries.
227 * - 0 if the entry is empty and can be safely overwritten
228 * - 1 if the entry represents a simple rule
229 * - The number of contiguous entries if it is the root entry of a complex
231 * - -ENOTEMPTY if the entry is part of a complex rule but not the root
233 * - -EINVAL if the validation fails
235 static int ksz9477_acl_get_cont_entr(struct ksz_device *dev, int port, in ksz9477_acl_get_cont_entr() argument
238 struct ksz9477_acl_priv *acl = dev->ports[port].acl_priv; in ksz9477_acl_get_cont_entr()
239 struct ksz9477_acl_entries *acles = &acl->acles; in ksz9477_acl_get_cont_entr()
246 entry = &acles->entries[index].entry[0]; in ksz9477_acl_get_cont_entr()
259 …dev_dbg(dev->dev, "ACL: entry %d starting with a valid matching rule, but no bits set in RuleSet\n… in ksz9477_acl_get_cont_entr()
261 return -ENOTEMPTY; in ksz9477_acl_get_cont_entr()
272 contiguous_count = end_idx - start_idx + 1; in ksz9477_acl_get_cont_entr()
274 /* Check if the number of bits set in val matches our calculated count */ in ksz9477_acl_get_cont_entr()
279 dev_err(dev->dev, "ACL: number of bits set in RuleSet does not match calculated count\n"); in ksz9477_acl_get_cont_entr()
280 return -EINVAL; in ksz9477_acl_get_cont_entr()
285 u8 *current_entry = &acles->entries[i].entry[0]; in ksz9477_acl_get_cont_entr()
291 dev_err(dev->dev, "ACL: entry %d does not contain a valid matching rule\n", in ksz9477_acl_get_cont_entr()
293 return -EINVAL; in ksz9477_acl_get_cont_entr()
301 dev_err(dev->dev, "ACL: entry %d has non-empty RuleSet linkage\n", in ksz9477_acl_get_cont_entr()
303 return -EINVAL; in ksz9477_acl_get_cont_entr()
312 * ksz9477_acl_update_linkage - Update the RuleSet linkage for an ACL entry
322 * linkage is represented by two 8-bit registers, which are combined
323 * into a 16-bit value for easier manipulation. The linkage bits are shifted
330 * Returns: 0 on success, or -EINVAL if any RuleSet linkage bits are lost
356 dev_err(dev->dev, "ACL: entry %d has unexpected ActionRule linkage: %d\n", in ksz9477_acl_update_linkage()
358 return -EINVAL; in ksz9477_acl_update_linkage()
363 /* Calculate the number of positions to shift */ in ksz9477_acl_update_linkage()
364 shift = new_idx - old_idx; in ksz9477_acl_update_linkage()
370 rule_linkage >>= -shift; in ksz9477_acl_update_linkage()
374 dev_err(dev->dev, "ACL RuleSet linkage bits lost during move\n"); in ksz9477_acl_update_linkage()
375 return -EINVAL; in ksz9477_acl_update_linkage()
388 * ksz9477_validate_and_get_src_count - Validate source and destination indices
391 * @port: Port number on the KSZ device where the ACL entries reside.
395 * @src_count: Pointer to the variable that will hold the number of contiguous
397 * @dst_count: Pointer to the variable that will hold the number of contiguous
405 * validations pass, the function returns the number of contiguous source and
411 static int ksz9477_validate_and_get_src_count(struct ksz_device *dev, int port, in ksz9477_validate_and_get_src_count() argument
419 dev_err(dev->dev, "ACL: invalid entry index\n"); in ksz9477_validate_and_get_src_count()
420 return -EINVAL; in ksz9477_validate_and_get_src_count()
424 ret = ksz9477_acl_get_cont_entr(dev, port, src_idx); in ksz9477_validate_and_get_src_count()
430 dev_err(dev->dev, "ACL: source entry is empty\n"); in ksz9477_validate_and_get_src_count()
431 return -EINVAL; in ksz9477_validate_and_get_src_count()
435 dev_err(dev->dev, "ACL: Not enough space at the destination. Move operation will fail.\n"); in ksz9477_validate_and_get_src_count()
436 return -EINVAL; in ksz9477_validate_and_get_src_count()
442 ret = ksz9477_acl_get_cont_entr(dev, port, dst_idx); in ksz9477_validate_and_get_src_count()
451 * ksz9477_move_entries_downwards - Move a range of ACL entries downwards in
456 * @num_entries_to_move: Number of consecutive entries to be relocated.
478 e = &acles->entries[i]; in ksz9477_move_entries_downwards()
479 *e = acles->entries[i + num_entries_to_move]; in ksz9477_move_entries_downwards()
481 ret = ksz9477_acl_update_linkage(dev, &e->entry[0], in ksz9477_move_entries_downwards()
491 * ksz9477_move_entries_upwards - Move a range of ACL entries upwards in the
496 * @num_entries_to_move: Number of contiguous entries to be moved.
515 for (i = start_idx; i > target_idx; i--) { in ksz9477_move_entries_upwards()
516 b = i + num_entries_to_move - 1; in ksz9477_move_entries_upwards()
518 e = &acles->entries[b]; in ksz9477_move_entries_upwards()
519 *e = acles->entries[i - 1]; in ksz9477_move_entries_upwards()
521 ret = ksz9477_acl_update_linkage(dev, &e->entry[0], i - 1, b); in ksz9477_move_entries_upwards()
530 * ksz9477_acl_move_entries - Move a block of contiguous ACL entries from a
533 * @port: Port number.
544 * Return: 0 if the move operation is successful. Returns -EINVAL for validation
547 static int ksz9477_acl_move_entries(struct ksz_device *dev, int port, in ksz9477_acl_move_entries() argument
551 struct ksz9477_acl_priv *acl = dev->ports[port].acl_priv; in ksz9477_acl_move_entries()
552 struct ksz9477_acl_entries *acles = &acl->acles; in ksz9477_acl_move_entries()
559 ret = ksz9477_validate_and_get_src_count(dev, port, src_idx, dst_idx, in ksz9477_acl_move_entries()
569 dst_idx = dst_idx + dst_count - src_count; in ksz9477_acl_move_entries()
573 buffer[i] = acles->entries[src_idx + i]; in ksz9477_acl_move_entries()
593 acles->entries[dst_idx + i] = buffer[i]; in ksz9477_acl_move_entries()
599 * ksz9477_get_next_block_start - Identify the starting index of the next ACL
602 * @port: The port number on which the ACL entries are being checked.
611 * - The starting index of the next valid ACL block.
612 * - KSZ9477_ACL_MAX_ENTRIES if no other valid blocks are found after 'start'.
613 * - A negative error code if an error occurs while checking.
615 static int ksz9477_get_next_block_start(struct ksz_device *dev, int port, in ksz9477_get_next_block_start() argument
621 block_size = ksz9477_acl_get_cont_entr(dev, port, i); in ksz9477_get_next_block_start()
622 if (block_size < 0 && block_size != -ENOTEMPTY) in ksz9477_get_next_block_start()
634 * ksz9477_swap_acl_blocks - Swap two ACL blocks
636 * @port: The port number on which the ACL blocks are to be swapped.
647 * - 0 on successful swapping of blocks.
648 * - -EINVAL if the block at index 'i' is empty.
649 * - A negative error code if any other error occurs during the swap.
651 static int ksz9477_swap_acl_blocks(struct ksz_device *dev, int port, int i, in ksz9477_swap_acl_blocks() argument
656 current_block_size = ksz9477_acl_get_cont_entr(dev, port, i); in ksz9477_swap_acl_blocks()
661 dev_err(dev->dev, "ACL: swapping empty entry %d\n", i); in ksz9477_swap_acl_blocks()
662 return -EINVAL; in ksz9477_swap_acl_blocks()
665 ret = ksz9477_acl_move_entries(dev, port, i, j); in ksz9477_swap_acl_blocks()
669 ret = ksz9477_acl_move_entries(dev, port, j - current_block_size, i); in ksz9477_swap_acl_blocks()
677 * ksz9477_sort_acl_entr_no_back - Sort ACL entries for a given port based on
680 * @port: The port number whose ACL entries need to be sorted.
682 * This function sorts ACL entries of the specified port using a variant of the
693 * - 0 on successful sorting of entries.
694 * - A negative error code if any issue arises during sorting, e.g.,
697 static int ksz9477_sort_acl_entr_no_back(struct ksz_device *dev, int port) in ksz9477_sort_acl_entr_no_back() argument
699 struct ksz9477_acl_priv *acl = dev->ports[port].acl_priv; in ksz9477_sort_acl_entr_no_back()
700 struct ksz9477_acl_entries *acles = &acl->acles; in ksz9477_sort_acl_entr_no_back()
706 curr = &acles->entries[i]; in ksz9477_sort_acl_entr_no_back()
708 j = ksz9477_get_next_block_start(dev, port, i + 1); in ksz9477_sort_acl_entr_no_back()
713 next = &acles->entries[j]; in ksz9477_sort_acl_entr_no_back()
715 if (curr->prio > next->prio) { in ksz9477_sort_acl_entr_no_back()
716 ret = ksz9477_swap_acl_blocks(dev, port, i, j); in ksz9477_sort_acl_entr_no_back()
721 j = ksz9477_get_next_block_start(dev, port, j + 1); in ksz9477_sort_acl_entr_no_back()
726 i = ksz9477_get_next_block_start(dev, port, i + 1); in ksz9477_sort_acl_entr_no_back()
735 * ksz9477_sort_acl_entries - Sort the ACL entries for a given port.
737 * @port: Port number.
740 * port. Before sorting, a backup of the original entries is created. If the
747 int ksz9477_sort_acl_entries(struct ksz_device *dev, int port) in ksz9477_sort_acl_entries() argument
750 struct ksz9477_acl_priv *acl = dev->ports[port].acl_priv; in ksz9477_sort_acl_entries()
751 struct ksz9477_acl_entries *acles = &acl->acles; in ksz9477_sort_acl_entries()
757 memcpy(backup, acles->entries, sizeof(backup)); in ksz9477_sort_acl_entries()
759 ret = ksz9477_sort_acl_entr_no_back(dev, port); in ksz9477_sort_acl_entries()
761 dev_err(dev->dev, "ACL: failed to sort entries for port %d\n", in ksz9477_sort_acl_entries()
762 port); in ksz9477_sort_acl_entries()
763 dev_err(dev->dev, "ACL dump before sorting:\n"); in ksz9477_sort_acl_entries()
765 dev_err(dev->dev, "ACL dump after sorting:\n"); in ksz9477_sort_acl_entries()
766 ksz9477_dump_acl(dev, acles->entries); in ksz9477_sort_acl_entries()
768 memcpy(acles->entries, backup, sizeof(backup)); in ksz9477_sort_acl_entries()
775 * ksz9477_acl_wait_ready - Waits for the ACL operation to complete on a given
776 * port.
778 * @port: The port number to wait for.
786 static int ksz9477_acl_wait_ready(struct ksz_device *dev, int port) in ksz9477_acl_wait_ready() argument
792 reg = dev->dev_ops->get_port_addr(port, KSZ9477_PORT_ACL_CTRL_0); in ksz9477_acl_wait_ready()
794 ret = regmap_read_poll_timeout(dev->regmap[0], reg, val, in ksz9477_acl_wait_ready()
797 dev_err(dev->dev, "Failed to read/write ACL table\n"); in ksz9477_acl_wait_ready()
803 * ksz9477_acl_entry_write - Writes an ACL entry to a given port at the
806 * @port: The port number to write the ACL entry to.
810 * This function writes the provided ACL entry to the specified port at the
816 static int ksz9477_acl_entry_write(struct ksz_device *dev, int port, u8 *entry, in ksz9477_acl_entry_write() argument
823 ret = ksz_pwrite8(dev, port, KSZ9477_PORT_ACL_0 + i, entry[i]); in ksz9477_acl_entry_write()
825 dev_err(dev->dev, "Failed to write ACL entry %d\n", i); in ksz9477_acl_entry_write()
832 ret = ksz_pwrite8(dev, port, KSZ9477_PORT_ACL_CTRL_0, val); in ksz9477_acl_entry_write()
837 return ksz9477_acl_wait_ready(dev, port); in ksz9477_acl_entry_write()
841 * ksz9477_acl_port_enable - Enables ACL functionality on a given port.
843 * @port: The port number on which to enable ACL functionality.
845 * This function enables ACL functionality on the specified port by configuring
849 * 0xn801 - KSZ9477S 5.2.8.2 Port Priority Control Register
850 * Bit 7 - Highest Priority
851 * Bit 6 - OR'ed Priority
852 * Bit 4 - MAC Address Priority Classification
853 * Bit 3 - VLAN Priority Classification
854 * Bit 2 - 802.1p Priority Classification
855 * Bit 1 - Diffserv Priority Classification
856 * Bit 0 - ACL Priority Classification
862 * 0xn803 - KSZ9477S 5.2.8.4 Port Authentication Control Register
863 * Bit 2 - Access Control List (ACL) Enable
864 * Bits 1:0 - Authentication Mode
873 * forwarded to the host port. When ACL is enabled, all
882 static int ksz9477_acl_port_enable(struct ksz_device *dev, int port) in ksz9477_acl_port_enable() argument
886 ret = ksz_prmw8(dev, port, P_PRIO_CTRL, 0, PORT_ACL_PRIO_ENABLE | in ksz9477_acl_port_enable()
891 return ksz_pwrite8(dev, port, REG_PORT_MRI_AUTHEN_CTRL, in ksz9477_acl_port_enable()
897 * ksz9477_acl_port_disable - Disables ACL functionality on a given port.
899 * @port: The port number on which to disable ACL functionality.
901 * This function disables ACL functionality on the specified port by writing a
908 static int ksz9477_acl_port_disable(struct ksz_device *dev, int port) in ksz9477_acl_port_disable() argument
912 ret = ksz_prmw8(dev, port, P_PRIO_CTRL, PORT_ACL_PRIO_ENABLE, 0); in ksz9477_acl_port_disable()
916 return ksz_pwrite8(dev, port, REG_PORT_MRI_AUTHEN_CTRL, 0); in ksz9477_acl_port_disable()
920 * ksz9477_acl_write_list - Write a list of ACL entries to a given port.
922 * @port: The port number on which to write ACL entries.
924 * This function enables ACL functionality on the specified port, writes a list
925 * of ACL entries to the port, and disables ACL functionality if there are no
931 int ksz9477_acl_write_list(struct ksz_device *dev, int port) in ksz9477_acl_write_list() argument
933 struct ksz9477_acl_priv *acl = dev->ports[port].acl_priv; in ksz9477_acl_write_list()
934 struct ksz9477_acl_entries *acles = &acl->acles; in ksz9477_acl_write_list()
938 ret = ksz9477_acl_port_enable(dev, port); in ksz9477_acl_write_list()
943 for (i = 0; i < ARRAY_SIZE(acles->entries); i++) { in ksz9477_acl_write_list()
944 u8 *entry = acles->entries[i].entry; in ksz9477_acl_write_list()
951 if (i >= acles->entries_count && in ksz9477_acl_write_list()
956 ret = ksz9477_acl_entry_write(dev, port, entry, i); in ksz9477_acl_write_list()
963 if (i >= acles->entries_count && in ksz9477_acl_write_list()
971 if (!acles->entries_count) in ksz9477_acl_write_list()
972 return ksz9477_acl_port_disable(dev, port); in ksz9477_acl_write_list()
978 * ksz9477_acl_remove_entries - Remove ACL entries with a given cookie from a
981 * @port: The port number on which to remove ACL entries.
989 void ksz9477_acl_remove_entries(struct ksz_device *dev, int port, in ksz9477_acl_remove_entries() argument
993 int entries_count = acles->entries_count; in ksz9477_acl_remove_entries()
995 int src_idx = -1; in ksz9477_acl_remove_entries()
1002 if (acles->entries[i].cookie == cookie) { in ksz9477_acl_remove_entries()
1009 if (src_idx == -1) in ksz9477_acl_remove_entries()
1013 src_count = ksz9477_acl_get_cont_entr(dev, port, src_idx); in ksz9477_acl_remove_entries()
1020 entries_count - src_count); in ksz9477_acl_remove_entries()
1022 dev_err(dev->dev, "Failed to move ACL entries down\n"); in ksz9477_acl_remove_entries()
1030 for (i = entries_count - src_count; i < entries_count; i++) { in ksz9477_acl_remove_entries()
1031 struct ksz9477_acl_entry *entry = &acles->entries[i]; in ksz9477_acl_remove_entries()
1036 entry->entry[KSZ9477_ACL_PORT_ACCESS_10] = 0xff; in ksz9477_acl_remove_entries()
1037 entry->entry[KSZ9477_ACL_PORT_ACCESS_11] = 0xff; in ksz9477_acl_remove_entries()
1041 acles->entries_count -= src_count; in ksz9477_acl_remove_entries()
1045 * ksz9477_port_acl_init - Initialize the ACL for a specified port on a ksz
1048 * @port: The port number to initialize the ACL for.
1051 * specified port, and initializes the ACL entries to a default state. The
1057 int ksz9477_port_acl_init(struct ksz_device *dev, int port) in ksz9477_port_acl_init() argument
1065 return -ENOMEM; in ksz9477_port_acl_init()
1067 dev->ports[port].acl_priv = acl; in ksz9477_port_acl_init()
1069 acles = &acl->acles; in ksz9477_port_acl_init()
1071 for (i = 0; i < ARRAY_SIZE(acles->entries); i++) { in ksz9477_port_acl_init()
1072 u8 *entry = acles->entries[i].entry; in ksz9477_port_acl_init()
1081 ret = ksz9477_acl_write_list(dev, port); in ksz9477_port_acl_init()
1088 kfree(dev->ports[port].acl_priv); in ksz9477_port_acl_init()
1089 dev->ports[port].acl_priv = NULL; in ksz9477_port_acl_init()
1095 * ksz9477_port_acl_free - Free the ACL resources for a specified port on a ksz
1098 * @port: The port number to initialize the ACL for.
1100 * This disables the ACL for the specified port and frees the associated memory,
1102 void ksz9477_port_acl_free(struct ksz_device *dev, int port) in ksz9477_port_acl_free() argument
1104 if (!dev->ports[port].acl_priv) in ksz9477_port_acl_free()
1107 ksz9477_acl_port_disable(dev, port); in ksz9477_port_acl_free()
1109 kfree(dev->ports[port].acl_priv); in ksz9477_port_acl_free()
1110 dev->ports[port].acl_priv = NULL; in ksz9477_port_acl_free()
1114 * ksz9477_acl_set_reg - Set entry[16] and entry[17] depending on the updated
1124 * 0x10 - Byte Enable [15:8]
1127 * initiated by writing to the Port ACL Byte Enable LSB Register.
1128 * Bit 0 applies to the Port ACL Access 7 Register
1129 * Bit 1 applies to the Port ACL Access 6 Register, etc.
1130 * Bit 7 applies to the Port ACL Access 0 Register
1134 * 0x11 - Byte Enable [7:0]
1137 * initiated by writing to the Port ACL Byte Enable LSB Register.
1138 * Bit 0 applies to the Port ACL Access F Register
1139 * Bit 1 applies to the Port ACL Access E Register, etc.
1140 * Bit 7 applies to the Port ACL Access 8 Register
1150 BIT(KSZ9477_ACL_PORT_ACCESS_7 - reg); in ksz9477_acl_set_reg()
1154 BIT(KSZ9477_ACL_PORT_ACCESS_F - reg); in ksz9477_acl_set_reg()
1164 * ksz9477_acl_matching_rule_cfg_l2 - Configure an ACL filtering entry to match
1180 * 0x01 - Mode and Enable
1181 * Bits 5:4 - MD (Mode)
1183 * Bits 3:2 - ENB (Enable)
1187 * Bit 1 - S/D (Source / Destination)
1190 * Bit 0 - EQ (Equal / Not Equal)
1194 * 0x02-0x07 - MAC Address
1195 * 0x02 - MAC Address [47:40]
1196 * 0x03 - MAC Address [39:32]
1197 * 0x04 - MAC Address [31:24]
1198 * 0x05 - MAC Address [23:16]
1199 * 0x06 - MAC Address [15:8]
1200 * 0x07 - MAC Address [7:0]
1202 * 0x08-0x09 - EtherType
1203 * 0x08 - EtherType [15:8]
1204 * 0x09 - EtherType [7:0]
1237 * ksz9477_acl_action_rule_cfg - Set action for an ACL entry
1244 * action registers accordingly. Currently, there is no port or VLAN PCP
1247 * ACL Action Rule Parameters for Non-Count Modes (MD ≠ 01 or ENB ≠ 00)
1249 * 0x0A - PM, P, RPE, RP[2:1]
1250 * Bits 7:6 - PM[1:0] - Priority Mode
1258 * Bits 5:3 - P[2:0] - Priority value
1259 * Bit 2 - RPE - Remark Priority Enable
1260 * Bits 1:0 - RP[2:1] - Remarked Priority value (bits 2:1)
1265 * 0x0B - RP[0], MM
1266 * Bit 7 - RP[0] - Remarked Priority value (bit 0)
1267 * Bits 6:5 - MM[1:0] - Map Mode
1275 * 0x0D - FORWARD[n:0]
1276 * Bits 7:0 - FORWARD[n:0] - Forwarding map. Bit 0 = port 1,
1277 * bit 1 = port 2, etc.
1278 * 1 = enable forwarding to this port
1279 * 0 = do not forward to this port
1294 /* no port or VLAN PCP remapping for now */ in ksz9477_acl_action_rule_cfg()
1300 * ksz9477_acl_processing_rule_set_action - Set the action for the processing
1311 * 0x00 - First Rule Number (FRN)
1312 * Bits 3:0 - First Rule Number. Pointer to an Action rule entry.
1320 * ksz9477_acl_processing_rule_add_match - Add a matching rule to the rule set
1329 * 0x0E - RuleSet [15:8]
1330 * Bits 7:0 - RuleSet [15:8] Specifies a set of one or more Matching rule
1337 * 0x0F - RuleSet [7:0]
1338 * Bits 7:0 - RuleSet [7:0]
1348 vale |= BIT(match_idx - 8); in ksz9477_acl_processing_rule_add_match()
1355 * ksz9477_acl_get_init_entry - Get a new uninitialized entry for a specified
1356 * port on a ksz_device.
1358 * @port: The port number to get the uninitialized entry for.
1362 * This function retrieves the next available ACL entry for the specified port,
1368 ksz9477_acl_get_init_entry(struct ksz_device *dev, int port, in ksz9477_acl_get_init_entry() argument
1371 struct ksz9477_acl_priv *acl = dev->ports[port].acl_priv; in ksz9477_acl_get_init_entry()
1372 struct ksz9477_acl_entries *acles = &acl->acles; in ksz9477_acl_get_init_entry()
1375 entry = &acles->entries[acles->entries_count]; in ksz9477_acl_get_init_entry()
1376 entry->cookie = cookie; in ksz9477_acl_get_init_entry()
1377 entry->prio = prio; in ksz9477_acl_get_init_entry()
1380 entry->entry[KSZ9477_ACL_PORT_ACCESS_10] = 0; in ksz9477_acl_get_init_entry()
1381 entry->entry[KSZ9477_ACL_PORT_ACCESS_11] = 0; in ksz9477_acl_get_init_entry()
1387 * ksz9477_acl_match_process_l2 - Configure Layer 2 ACL matching rules and
1390 * @port: Port number.
1400 void ksz9477_acl_match_process_l2(struct ksz_device *dev, int port, in ksz9477_acl_match_process_l2() argument
1404 struct ksz9477_acl_priv *acl = dev->ports[port].acl_priv; in ksz9477_acl_match_process_l2()
1405 struct ksz9477_acl_entries *acles = &acl->acles; in ksz9477_acl_match_process_l2()
1408 entry = ksz9477_acl_get_init_entry(dev, port, cookie, prio); in ksz9477_acl_match_process_l2()
1412 ksz9477_acl_matching_rule_cfg_l2(entry->entry, ethtype, src_mac, in ksz9477_acl_match_process_l2()
1416 ksz9477_acl_processing_rule_add_match(entry->entry, in ksz9477_acl_match_process_l2()
1417 acles->entries_count); in ksz9477_acl_match_process_l2()
1418 acles->entries_count++; in ksz9477_acl_match_process_l2()
1419 ksz9477_acl_processing_rule_add_match(entry->entry, in ksz9477_acl_match_process_l2()
1420 acles->entries_count); in ksz9477_acl_match_process_l2()
1422 entry = ksz9477_acl_get_init_entry(dev, port, cookie, prio); in ksz9477_acl_match_process_l2()
1423 ksz9477_acl_matching_rule_cfg_l2(entry->entry, 0, dst_mac, in ksz9477_acl_match_process_l2()
1425 acles->entries_count++; in ksz9477_acl_match_process_l2()
1430 ksz9477_acl_matching_rule_cfg_l2(entry->entry, ethtype, mac, in ksz9477_acl_match_process_l2()
1432 ksz9477_acl_processing_rule_add_match(entry->entry, in ksz9477_acl_match_process_l2()
1433 acles->entries_count); in ksz9477_acl_match_process_l2()
1434 acles->entries_count++; in ksz9477_acl_match_process_l2()