This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/LINUXSDK-AM35X: Error Message when setting interface to promisc

Part Number: LINUXSDK-AM35X

Tool/software: Linux

We are using SDK 7, kernel version 3.12.  Our boards have 2 interfaces, eth0 and eth1.  Our boards are going to be acting as routers so we are setting promiscuity on for each interface. We are using these commands:

ifconfig eth0 promisc

ifconfig eth1 promisc

When the second command is executed an error appears in the system log:

 promiscuity not disabled as the other interface is still in promiscuity mode

When looking at the code it appears that this message should only display when you are trying to turn off promiscuity but it is still set on one of the interfaces.  But this is not the case here.  We are turning it on.  Is this a bug?  Is this error message something we should be concerned with?  The code I am looking at it is in drivers/net/Ethernet/ti/cpsw.c

static void cpsw_set_promiscious(struct net_device *ndev, bool enable)
{
        struct cpsw_priv *priv = netdev_priv(ndev);
        struct cpsw_ale *ale = priv->ale;

        if (priv->data.dual_emac) {
                /* Enabling promiscuous mode for one interface will be
                 * common for both the interface as the interface shares
                 * the same hardware resource.
                 */
                if (!enable && ((priv->slaves[0].ndev->flags & IFF_PROMISC) ||
                                (priv->slaves[1].ndev->flags & IFF_PROMISC))) {
                        enable = true;
                        dev_err(&ndev->dev, "promiscuity not disabled as the other interface is still in promiscuity mode\n");
                }

                if (enable) {
                        /* Enable Bypass */
                        cpsw_ale_control_set(ale, 0, ALE_BYPASS, 1);

                        dev_dbg(&ndev->dev, "promiscuity enabled\n");
                } else {

  • Hi Tim,

    It seems this is some kind of a bug in the kernel. On my AM335x Starter kit running kernel 4.4.41 I did the following:

    root@am335x-evm:~# ifconfig eth0                                                                                                  

    eth0      Link encap:Ethernet  HWaddr 00:18:31:E0:18:9C                                                                            

             UP BROADCAST MULTICAST  MTU:1500  Metric:1                                                                              

             RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                                                      

             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                                                    

             collisions:0 txqueuelen:1000                                                                                            

             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                                                                  

             Interrupt:172                                                                                                            

    root@am335x-evm:~# ifconfig eth1                                                                                                  

    eth1      Link encap:Ethernet  HWaddr 00:18:31:E0:18:9D                                                                            

             UP BROADCAST MULTICAST  MTU:1500  Metric:1                                                                              

             RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                                                      

             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                                                    

             collisions:0 txqueuelen:1000                                                                                            

             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                                                                  

    root@am335x-evm:~# ifconfig eth0 promisc                                                                                          

    [  126.942804] device eth0 entered promiscuous mode                                                                                

    root@am335x-evm:~# ifconfig eth1 promisc                                                                                          

    [  134.133296] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode                              

    [  134.209782] device eth1 entered promiscuous mode                                                                                

    As you can see I am getting the same warning, however, when I check the interface settings:

    root@am335x-evm:~# ifconfig eth0                                                                                                  

    eth0      Link encap:Ethernet  HWaddr 00:18:31:E0:18:9C                                                                            

             UP BROADCAST PROMISC MULTICAST  MTU:1500  Metric:1                                                                      

             RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                                                      

             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                                                    

             collisions:0 txqueuelen:1000                                                                                            

             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                                                                  

             Interrupt:172

    root@am335x-evm:~# ifconfig eth1                                                                                                  

    eth1      Link encap:Ethernet  HWaddr 00:18:31:E0:18:9D                                                                            

             UP BROADCAST PROMISC MULTICAST  MTU:1500  Metric:1                                                                      

             RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                                                      

             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                                                    

             collisions:0 txqueuelen:1000                                                                                            

             RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                                                                  

    You can see that both eth0 & eth1 are in promiscuous mode. So IMO you can disregard this for now.

    Best Regards,

    Yordan