[PATCH net-next 3/4] net: xilinx: axienet: Don't print if we go into promiscuous mode

Sean Anderson posted 4 patches 1 year, 5 months ago
There is a newer version of this series
[PATCH net-next 3/4] net: xilinx: axienet: Don't print if we go into promiscuous mode
Posted by Sean Anderson 1 year, 5 months ago
A message about being in promiscuous mode is printed every time each
additional multicast address beyond four is added. Suppress this message
like is done in other drivers. And don't set IFF_PROMISC in ndev->flags;
contrary to the comment we don't have to inform the net subsystem.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
---

 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 1bcabb016ca9..9bcad515f156 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -439,15 +439,9 @@ static void axienet_set_multicast_list(struct net_device *ndev)
 
 	if (ndev->flags & (IFF_ALLMULTI | IFF_PROMISC) ||
 	    netdev_mc_count(ndev) > XAE_MULTICAST_CAM_TABLE_NUM) {
-		/* We must make the kernel realize we had to move into
-		 * promiscuous mode. If it was a promiscuous mode request
-		 * the flag is already set. If not we set it.
-		 */
-		ndev->flags |= IFF_PROMISC;
 		reg = axienet_ior(lp, XAE_FMI_OFFSET);
 		reg |= XAE_FMI_PM_MASK;
 		axienet_iow(lp, XAE_FMI_OFFSET, reg);
-		dev_info(&ndev->dev, "Promiscuous mode enabled.\n");
 	} else if (!netdev_mc_empty(ndev)) {
 		struct netdev_hw_addr *ha;
 
@@ -481,7 +475,6 @@ static void axienet_set_multicast_list(struct net_device *ndev)
 		reg &= ~XAE_FMI_PM_MASK;
 
 		axienet_iow(lp, XAE_FMI_OFFSET, reg);
-		dev_info(&ndev->dev, "Promiscuous mode disabled.\n");
 	}
 
 	for (; i < XAE_MULTICAST_CAM_TABLE_NUM; i++) {
-- 
2.35.1.1320.gc452695387.dirty
Re: [PATCH net-next 3/4] net: xilinx: axienet: Don't print if we go into promiscuous mode
Posted by Simon Horman 1 year, 5 months ago
On Mon, Aug 12, 2024 at 04:04:36PM -0400, Sean Anderson wrote:
> A message about being in promiscuous mode is printed every time each
> additional multicast address beyond four is added. Suppress this message
> like is done in other drivers. And don't set IFF_PROMISC in ndev->flags;
> contrary to the comment we don't have to inform the net subsystem.

Hi Sean,

FWIIW, this feels like two things that could be two patches.

...
Re: [PATCH net-next 3/4] net: xilinx: axienet: Don't print if we go into promiscuous mode
Posted by Sean Anderson 1 year, 5 months ago
On 8/15/24 10:59, Simon Horman wrote:
> On Mon, Aug 12, 2024 at 04:04:36PM -0400, Sean Anderson wrote:
>> A message about being in promiscuous mode is printed every time each
>> additional multicast address beyond four is added. Suppress this message
>> like is done in other drivers. And don't set IFF_PROMISC in ndev->flags;
>> contrary to the comment we don't have to inform the net subsystem.
> 
> Hi Sean,
> 
> FWIIW, this feels like two things that could be two patches.
> 
> ...

OK