Messages in this thread | | | Date | Sat, 30 Mar 2024 15:55:42 +0100 | From | Andrew Lunn <> | Subject | Re: [PATCH net-next v1 5/9] net: dsa: microchip: add support for different DCB app configurations |
| |
On Fri, Mar 29, 2024 at 09:29:32AM +0000, Naveen Mamindlapalli wrote: > > > +int ksz_init_global_dscp_map(struct ksz_device *dev) { > > + int reg, per_reg, ret, dscp; > > + u8 data = 0; > > + u8 mask; > > + > > + /* On KSZ9xxx variants, DSCP remapping is disabled by default. > > + * Enable to have, predictable and reproducible behavior across > > + * different devices. > > + */ > > + if (!is_ksz8(dev)) { > > + ret = ksz_rmw8(dev, KSZ9477_REG_SW_MAC_TOS_CTRL, > > + KSZ9477_SW_TOS_DSCP_REMAP, > > + KSZ9477_SW_TOS_DSCP_REMAP); > > + if (ret) > > + return ret; > > + } > > + > > + ksz_get_dscp_prio_reg(dev, ®, &per_reg, &mask); > > + > > + for (dscp = 0; dscp < DSCP_MAX; dscp++) { > > + int ipv, shift; > > + > > + /* Map DSCP to Traffic Type, which is corresponding to the > > + * Internal Priority Value (IPV) in the switch. > > + */ > > + if (!is_ksz8(dev)) { > > + ipv = ietf_dscp_to_ieee8021q_tt(dscp); > > + } else { > > + ipv = > > ieee8021q_tt_to_tc(ietf_dscp_to_ieee8021q_tt(dscp), > > + dev->info->num_tx_queues); > > + } > > No need for braces for single statement.
Please trim the email when replying. It is very easy to miss comments when it is 99% quoted text with a couple of one-liners mixed in.
Andrew
| |