# Re: \[PATCH net-next v17 2/4\] net: dsa: mv88e6xxx: wrap .set\_egress\_port method

- From: Vladimir Oltean \<olteanv@gmail.com\>
- Date: 2021-03-17 14:41:31 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/03/11199008
- Thread: https://ratatoskr.run/netdev/2021/03/11198995/t.md

```text
On Wed, Mar 17, 2021 at 03:34:33PM +0100, Marek Behún wrote:
> On Wed, 17 Mar 2021 16:22:35 +0200
> Vladimir Oltean [ref] wrote:
> 
> > On Wed, Mar 17, 2021 at 02:46:41PM +0100, Marek Behún wrote:
> > > There are two implementations of the .set_egress_port method, and
> > > both of them, if successful, set chip->*gress_dest_port variable.
> > > 
> > > To avoid code repetition, wrap this method into
> > > mv88e6xxx_set_egress_port.
> > > 
> > > Signed-off-by: Marek Behún <kabel@kernel.org>
> > > Reviewed-by: Pavana Sharma <redacted>
> > > ---  
> > 
> > Separately from this series, do you think you can rename the
> > "egress_port" into "monitor_port" across the driver? Seeing an
> > EGRESS_DIR_INGRESS is pretty strange.
> 
> You mean even renaming methods .set_egress_port to .set_monitor_port,
> and type
>   enum mv88e6xxx_egress_direction
> to
>   enum mv88e6xxx_monitor_direction?

Yeah, if I'm not asking for too much. I think the last thing some
hardware with closed documentation needs is a driver that obfuscates the
configuration it applies to it.
```
