DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1
@ 2016-06-21 11:43 Anupam Kapoor
  2016-06-21 12:27 ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Anupam Kapoor @ 2016-06-21 11:43 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

This commit fixes build errors triggered due misleading indentation.

Fixes: 38db3f7f50bde (e1000: update base driver)
Fixes: 3fc5ca2f63529 (kni: initial import)


Signed-off-by: Anupam Kapoor <anupam.kapoor@gmail.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c     | 6 ++++--
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
index df224702ed7d..140a2a476ed2 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
@@ -3300,12 +3300,13 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw,
u32 address, u32 *data)
        *data = E1000_READ_REG(hw, E1000_MPHY_DATA);

        /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       if (locked) {
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
                                E1000_MPHY_DIS_ACCESS);
+       }

        return E1000_SUCCESS;
 }
@@ -3365,12 +3366,13 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw,
u32 address, u32 data,
        E1000_WRITE_REG(hw, E1000_MPHY_DATA, data);

        /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       if (locked) {
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
                                E1000_MPHY_DIS_ACCESS);
+       }

        return E1000_SUCCESS;
 }
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
index 017dfe16c73f..c6f4130d78ab 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
@@ -867,12 +867,13 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
            link_mode == IXGBE_AUTOC_LMS_KX4_KX_KR_SGMII) {
                /* Set KX4/KX/KR support according to speed requested */
                autoc &= ~(IXGBE_AUTOC_KX4_KX_SUPP_MASK |
IXGBE_AUTOC_KR_SUPP);
-               if (speed & IXGBE_LINK_SPEED_10GB_FULL)
+               if (speed & IXGBE_LINK_SPEED_10GB_FULL) {
                        if (orig_autoc & IXGBE_AUTOC_KX4_SUPP)
                                autoc |= IXGBE_AUTOC_KX4_SUPP;
                        if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
                            (hw->phy.smart_speed_active == false))
                                autoc |= IXGBE_AUTOC_KR_SUPP;
+               }
                if (speed & IXGBE_LINK_SPEED_1GB_FULL)
                        autoc |= IXGBE_AUTOC_KX_SUPP;
        } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) &&
-- 
2.9.0

​--
thanks
anupam​

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1
  2016-06-21 11:43 [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1 Anupam Kapoor
@ 2016-06-21 12:27 ` Ferruh Yigit
  2016-06-21 15:53   ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2016-06-21 12:27 UTC (permalink / raw)
  To: Anupam Kapoor, dev

On 6/21/2016 12:43 PM, Anupam Kapoor wrote:
> This commit fixes build errors triggered due misleading indentation.
> 
> Fixes: 38db3f7f50bde (e1000: update base driver)
Fixes: b9ee370557f1 ("kni: update kernel driver ethtool baseline")

> Fixes: 3fc5ca2f63529 (kni: initial import)
> 
> 
> Signed-off-by: Anupam Kapoor <anupam.kapoor@gmail.com>

Apart from above fixline update:
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>


---

Independent from this patch, for next patches, it would be helpful to
maintainers and reviewers if
- Add version number to new version of patches
http://dpdk.org/doc/guides/contributing/patches.html#creating-patches

- Send new versions in reply to old mail thread
http://dpdk.org/doc/guides/contributing/patches.html#sending-patches

- And in patchwork change status of old version of patch to superseded
http://dpdk.org/dev/patchwork/project/dpdk/list/


Thanks,
ferruh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1
  2016-06-21 12:27 ` Ferruh Yigit
@ 2016-06-21 15:53   ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2016-06-21 15:53 UTC (permalink / raw)
  To: Anupam Kapoor; +Cc: dev, Ferruh Yigit

2016-06-21 13:27, Ferruh Yigit:
> On 6/21/2016 12:43 PM, Anupam Kapoor wrote:
> > This commit fixes build errors triggered due misleading indentation.
> > 
> > Fixes: 38db3f7f50bde (e1000: update base driver)
> Fixes: b9ee370557f1 ("kni: update kernel driver ethtool baseline")
> 
> > Fixes: 3fc5ca2f63529 (kni: initial import)
> > 
> > 
> > Signed-off-by: Anupam Kapoor <anupam.kapoor@gmail.com>
> 
> Apart from above fixline update:
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks


> Independent from this patch, for next patches, it would be helpful to
> maintainers and reviewers if
> - Add version number to new version of patches
> http://dpdk.org/doc/guides/contributing/patches.html#creating-patches
> 
> - Send new versions in reply to old mail thread
> http://dpdk.org/doc/guides/contributing/patches.html#sending-patches
> 
> - And in patchwork change status of old version of patch to superseded
> http://dpdk.org/dev/patchwork/project/dpdk/list/

I add:
- Use git send-email
(this patch was corrupted)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1
  2016-06-21 10:10 ` Ferruh Yigit
@ 2016-06-21 11:20   ` Anupam Kapoor
  0 siblings, 0 replies; 6+ messages in thread
From: Anupam Kapoor @ 2016-06-21 11:20 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Tue, Jun 21, 2016 at 3:40 PM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> Hi Anupam,
>
> Thank you for the patch.
>
>
> On 6/21/2016 9:37 AM, Anupam Kapoor wrote:
> > This commit fixes build errors triggered due misleading indentation.
> >
> > Fixes: 366113dbfb696 (e1000: suppress misleading indentation warning)
> This looks like wrong commit id that fixed, can you please double check
> Also you may need two fixes lines, since fixing two different driver files
>
​yes, you are right, i erroneously looked at the commit-id ​

​which included the '-Wno-misleading-indentation' and used that.​


> >
> >
> > Signed-off-by: Anupam Kapoor <anupam.kapoor@gmail.com>
> > ---
> >  lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c     | 12
> ++++++++----
> >  lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c |  6 +++---
> >  2 files changed, 11 insertions(+), 7 deletions(-)
> >
> > diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
> b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
> > index df224702ed7d..26352da15101 100644
> > --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
> > +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
> > @@ -3299,13 +3299,15 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw,
> u32 address, u32 *data)
> >                 return -E1000_ERR_PHY;
> >         *data = E1000_READ_REG(hw, E1000_MPHY_DATA);
> >
> > -       /* Disable access to mPHY if it was originally disabled */
> > -       if (locked)
> > +       /* Disable access to mPHY if it was originally enabled */
> I think original comment is correct.
> As far as I can see, if access disabled in the beginning of the
> function, it is enabled and here disabled back. Original state saved to
> locked variable.
>
​yes, the locked variable keeps that state...
​


> > +       if (locked) {
> >                 ready = e1000_is_mphy_ready(hw);
> >                 if (!ready)
> >                         return -E1000_ERR_PHY;
> > +
> >                 E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
> >                                 E1000_MPHY_DIS_ACCESS);
> > +       }
> >
>
> ...
>
> > diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
> b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
> > index 017dfe16c73f..dc2a4fb61c25 100644
> > --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
> > +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
> > @@ -870,9 +870,9 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
> >                 if (speed & IXGBE_LINK_SPEED_10GB_FULL)
> >                         if (orig_autoc & IXGBE_AUTOC_KX4_SUPP)
> >                                 autoc |= IXGBE_AUTOC_KX4_SUPP;
> > -                       if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
> > -                           (hw->phy.smart_speed_active == false))
> > -                               autoc |= IXGBE_AUTOC_KR_SUPP;
> > +               if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
> > +                   (hw->phy.smart_speed_active == false))
> > +                       autoc |= IXGBE_AUTOC_KR_SUPP;
> Can you please check following commit:
>
> https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=55461ddbc

​cool thanks for the information.
​

>
> >                 if (speed & IXGBE_LINK_SPEED_1GB_FULL)
> >                         autoc |= IXGBE_AUTOC_KX_SUPP;
> >         } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) &&
> > --
> > 2.9.0
> >
>
>
> Would you mind sending a new version of patch according above comments?

​yes sure. in a few minutes...​



>
> Thanks,
> ferruh
>



-- 
​thanks
anupam​

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1
  2016-06-21  8:37 Anupam Kapoor
@ 2016-06-21 10:10 ` Ferruh Yigit
  2016-06-21 11:20   ` Anupam Kapoor
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2016-06-21 10:10 UTC (permalink / raw)
  To: Anupam Kapoor, dev

Hi Anupam,

Thank you for the patch.


On 6/21/2016 9:37 AM, Anupam Kapoor wrote:
> This commit fixes build errors triggered due misleading indentation.
> 
> Fixes: 366113dbfb696 (e1000: suppress misleading indentation warning)
This looks like wrong commit id that fixed, can you please double check
Also you may need two fixes lines, since fixing two different driver files

> 
> 
> Signed-off-by: Anupam Kapoor <anupam.kapoor@gmail.com>
> ---
>  lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c     | 12 ++++++++----
>  lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c |  6 +++---
>  2 files changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
> index df224702ed7d..26352da15101 100644
> --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
> +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
> @@ -3299,13 +3299,15 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data)
>                 return -E1000_ERR_PHY;
>         *data = E1000_READ_REG(hw, E1000_MPHY_DATA);
> 
> -       /* Disable access to mPHY if it was originally disabled */
> -       if (locked)
> +       /* Disable access to mPHY if it was originally enabled */
I think original comment is correct.
As far as I can see, if access disabled in the beginning of the
function, it is enabled and here disabled back. Original state saved to
locked variable.

> +       if (locked) {
>                 ready = e1000_is_mphy_ready(hw);
>                 if (!ready)
>                         return -E1000_ERR_PHY;
> +
>                 E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
>                                 E1000_MPHY_DIS_ACCESS);
> +       }
> 

...

> diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
> index 017dfe16c73f..dc2a4fb61c25 100644
> --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
> +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
> @@ -870,9 +870,9 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
>                 if (speed & IXGBE_LINK_SPEED_10GB_FULL)
>                         if (orig_autoc & IXGBE_AUTOC_KX4_SUPP)
>                                 autoc |= IXGBE_AUTOC_KX4_SUPP;
> -                       if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
> -                           (hw->phy.smart_speed_active == false))
> -                               autoc |= IXGBE_AUTOC_KR_SUPP;
> +               if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
> +                   (hw->phy.smart_speed_active == false))
> +                       autoc |= IXGBE_AUTOC_KR_SUPP;
Can you please check following commit:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=55461ddbc

>                 if (speed & IXGBE_LINK_SPEED_1GB_FULL)
>                         autoc |= IXGBE_AUTOC_KX_SUPP;
>         } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) &&
> --
> 2.9.0
> 


Would you mind sending a new version of patch according above comments?

Thanks,
ferruh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1
@ 2016-06-21  8:37 Anupam Kapoor
  2016-06-21 10:10 ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Anupam Kapoor @ 2016-06-21  8:37 UTC (permalink / raw)
  To: dev

This commit fixes build errors triggered due misleading indentation.

Fixes: 366113dbfb696 (e1000: suppress misleading indentation warning)


Signed-off-by: Anupam Kapoor <anupam.kapoor@gmail.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c     | 12 ++++++++----
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c |  6 +++---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
index df224702ed7d..26352da15101 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
@@ -3299,13 +3299,15 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data)
                return -E1000_ERR_PHY;
        *data = E1000_READ_REG(hw, E1000_MPHY_DATA);

-       /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       /* Disable access to mPHY if it was originally enabled */
+       if (locked) {
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
+
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
                                E1000_MPHY_DIS_ACCESS);
+       }

        return E1000_SUCCESS;
 }
@@ -3364,13 +3366,15 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 data,
                return -E1000_ERR_PHY;
        E1000_WRITE_REG(hw, E1000_MPHY_DATA, data);

-       /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       /* Disable access to mPHY if it was originally enabled */
+       if (locked) {
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
+
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
                                E1000_MPHY_DIS_ACCESS);
+       }

        return E1000_SUCCESS;
 }
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
index 017dfe16c73f..dc2a4fb61c25 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c
@@ -870,9 +870,9 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
                if (speed & IXGBE_LINK_SPEED_10GB_FULL)
                        if (orig_autoc & IXGBE_AUTOC_KX4_SUPP)
                                autoc |= IXGBE_AUTOC_KX4_SUPP;
-                       if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
-                           (hw->phy.smart_speed_active == false))
-                               autoc |= IXGBE_AUTOC_KR_SUPP;
+               if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) &&
+                   (hw->phy.smart_speed_active == false))
+                       autoc |= IXGBE_AUTOC_KR_SUPP;
                if (speed & IXGBE_LINK_SPEED_1GB_FULL)
                        autoc |= IXGBE_AUTOC_KX_SUPP;
        } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) &&
--
2.9.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-21 15:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-21 11:43 [dpdk-dev] [PATCH] kni : fix build errors for gcc --version >= 6.1 Anupam Kapoor
2016-06-21 12:27 ` Ferruh Yigit
2016-06-21 15:53   ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2016-06-21  8:37 Anupam Kapoor
2016-06-21 10:10 ` Ferruh Yigit
2016-06-21 11:20   ` Anupam Kapoor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).