In net code, it is preferred to have block comments which
* either are one line: `/* ... */`
* multiple lines with:
- starting with the first comment line directly: `/* ...`
- each line is intended with the first asterisk: ` * ...`
- the last line is just the end of the comment: ` */`
Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <[email protected]>
memcpy(&fib_work->fen_info, ptr, sizeof(fib_work->fen_info));
/* Take referece on fib_info to prevent it from being
- * freed while work is queued. Release it afterwards.
- */
+ * freed while work is queued. Release it afterwards.
+ */
fib_info_hold(fib_work->fen_info.fi);
} else if (info->family == AF_INET6) {
/* Set default burst rates on all ports (the same for 1G / 10G) with a PHY
* for UC, MC and BC
* For 1G port, the minimum burst rate is 1700, maximum 65535,
- * For 10G ports it is 2650 and 1048575 respectively */
+ * For 10G ports it is 2650 and 1048575 respectively
+ */
for (int p = 0; p < priv->cpu_port; p++) {
if (priv->ports[p].phy && !priv->ports[p].is10G) {
sw_w32_mask(0xffff, 0x8000, RTL839X_STORM_CTRL_PORT_UC_1(p));
{
/* Set portmask for broadcast traffic and unknown unicast address flooding
* to the reserved entry in the portmask table used also for
- * multicast flooding */
+ * multicast flooding
+ */
sw_w32(UNKNOWN_MC_PMASK << 9 | UNKNOWN_MC_PMASK, RTL838X_L2_FLD_PMSK);
/* Enable learning constraint system-wide (bit 0), per-port (bit 1)
- * and per vlan (bit 2) */
+ * and per vlan (bit 2)
+ */
sw_w32(0x7, RTL838X_L2_LRN_CONSTRT_EN);
/* Limit learning to maximum: 16k entries, after that just flood (bits 0-1) */
* they have different precedence depending on their type and this precedence
* defines which Action Information Field (0-4) in the IACL table stores
* the additional data of the action (like e.g. the port number a packet is
- * forwarded to) */
+ * forwarded to)
+ */
/* TODO: count bits in selectors to limit to a maximum number of actions */
if (pr->fwd_sel) { /* Forwarding action */
data = pr->fwd_act << 13;
/* Intermediate representation of a Packet Inspection Engine Rule
* as suggested by the Kernel's tc flower offload subsystem
* Field meaning is universal across SoC families, but data content is specific
- * to SoC family (e.g. because of different port ranges) */
+ * to SoC family (e.g. because of different port ranges)
+ */
struct pie_rule {
int id;
enum pie_phase phase; /* Phase in which this template is applied */
{
/* Set portmask for broadcast (offset bit 12) and unknown unicast (offset 0)
* address flooding to the reserved entry in the portmask table used
- * also for multicast flooding */
+ * also for multicast flooding
+ */
sw_w32(UNKNOWN_MC_PMASK << 12 | UNKNOWN_MC_PMASK, RTL839X_L2_FLD_PMSK);
/* Limit learning to maximum: 32k entries, after that just flood (bits 0-1) */
// Currently not used
-// /* Creates an interface for a route by setting up the HW tables in the SoC
+// /* Creates an interface for a route by setting up the HW tables in the SoC */
// static int rtl930x_l3_intf_add(struct rtl838x_switch_priv *priv, struct rtl838x_l3_intf *intf)
// {
// int i, intf_id, mtu_id;
-// /* number of MTU-values < 16384 *\/
+// /* number of MTU-values < 16384 */
// /* Use the same IPv6 mtu as the ip4 mtu for this route if unset */
// intf->ip6_mtu = intf->ip6_mtu ? intf->ip6_mtu : intf->ip4_mtu;