mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-22 19:37:51 +04:00
realtek: dsa: rtl839x: share the first L3 row of the PIE
The ethernet driver is about to tell a frame that a tc rule sent to the CPU from one that an L3 rule sent there, and only the PIE row in the CPU tag tells them apart. Move RTL839X_PIE_L3_FIRST to a new shared header, include/linux/soc/realtek/otto_common.h, and derive the number of L3 rows from it. Both values stay as they were, 640 and 512. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Gennaro Cimmino <gcimmino@rayonra.net> Link: https://github.com/openwrt/openwrt/pull/25919 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This commit is contained in:
1 parent
2caedb4b48
commit
52dc458dcd
2 files changed
+10
-2
No files matched your search
@@ -2,6 +2,7 @@
|
||||
#ifndef _OTTO_PIE_H
|
||||
#define _OTTO_PIE_H
|
||||
|
||||
#include <linux/soc/realtek/otto_common.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* PIE actions */
|
||||
@@ -19,8 +20,7 @@
|
||||
* ingress comes before routing.
|
||||
*/
|
||||
#define RTL839X_PIE_CUTLINE 9
|
||||
#define RTL839X_PIE_L3_RULES (4 * PIE_BLOCK_SIZE)
|
||||
#define RTL839X_PIE_L3_FIRST (RTL839X_PIE_CUTLINE * PIE_BLOCK_SIZE - RTL839X_PIE_L3_RULES)
|
||||
#define RTL839X_PIE_L3_RULES (RTL839X_PIE_CUTLINE * PIE_BLOCK_SIZE - RTL839X_PIE_L3_FIRST)
|
||||
|
||||
struct pie_rule;
|
||||
struct otto_dsa_priv;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef _OTTO_COMMON_H
|
||||
#define _OTTO_COMMON_H
|
||||
|
||||
#define RTL839X_PIE_L3_FIRST 640
|
||||
|
||||
#endif /* _OTTO_COMMON_H */
|
||||
Reference in new issue
Block a user