Message ID | 20180421165012.GA31873@xps13.dannf |
---|---|
State | New |
Headers | show |
Series | [SRU,Bionic,SRU,Artful] net: hns: Avoid action name truncation | expand |
On 21.04.2018 18:50, dann frazier wrote: > BugLink: https://bugs.launchpad.net/bugs/1765977 > > When longer interface names are used, the action names exposed in > /proc/interrupts and /proc/irq/* maybe truncated. For example, when > using the predictable name algorithm in systemd on a HiSilicon D05, > I see: > > ubuntu@d05-3:~$ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' > enahisic2i0-tx0 > enahisic2i0-tx1 > [...] > enahisic2i0-tx8 > enahisic2i0-tx9 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > > Increase the max ring name length to allow for an interface name > of IFNAMSIZE. After this change, I now see: > > $ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' > enahisic2i0-tx0 > enahisic2i0-tx1 > enahisic2i0-tx2 > [...] > enahisic2i0-tx8 > enahisic2i0-tx9 > enahisic2i0-tx10 > enahisic2i0-tx11 > enahisic2i0-tx12 > enahisic2i0-tx13 > enahisic2i0-tx14 > enahisic2i0-tx15 > > Signed-off-by: dann frazier <dann.frazier@canonical.com> > Signed-off-by: David S. Miller <davem@davemloft.net> > (cherry picked from commit f4ea89110df237da6fbcaab76af431e85f07d904) > Signed-off-by: dann frazier <dann.frazier@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- > drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h > index 7ba653af19cb..0502e0b2840f 100644 > --- a/drivers/net/ethernet/hisilicon/hns/hnae.h > +++ b/drivers/net/ethernet/hisilicon/hns/hnae.h > @@ -87,7 +87,7 @@ do { \ > > #define HNAE_AE_REGISTER 0x1 > > -#define RCB_RING_NAME_LEN 16 > +#define RCB_RING_NAME_LEN (IFNAMSIZ + 4) > > enum hnae_led_state { > HNAE_LED_INACTIVE, >
On 04/21/18 18:50, dann frazier wrote: > BugLink: https://bugs.launchpad.net/bugs/1765977 > > When longer interface names are used, the action names exposed in > /proc/interrupts and /proc/irq/* maybe truncated. For example, when > using the predictable name algorithm in systemd on a HiSilicon D05, > I see: > > ubuntu@d05-3:~$ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' > enahisic2i0-tx0 > enahisic2i0-tx1 > [...] > enahisic2i0-tx8 > enahisic2i0-tx9 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > > Increase the max ring name length to allow for an interface name > of IFNAMSIZE. After this change, I now see: > > $ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' > enahisic2i0-tx0 > enahisic2i0-tx1 > enahisic2i0-tx2 > [...] > enahisic2i0-tx8 > enahisic2i0-tx9 > enahisic2i0-tx10 > enahisic2i0-tx11 > enahisic2i0-tx12 > enahisic2i0-tx13 > enahisic2i0-tx14 > enahisic2i0-tx15 > > Signed-off-by: dann frazier <dann.frazier@canonical.com> > Signed-off-by: David S. Miller <davem@davemloft.net> > (cherry picked from commit f4ea89110df237da6fbcaab76af431e85f07d904) > Signed-off-by: dann frazier <dann.frazier@canonical.com> Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > --- > drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h > index 7ba653af19cb..0502e0b2840f 100644 > --- a/drivers/net/ethernet/hisilicon/hns/hnae.h > +++ b/drivers/net/ethernet/hisilicon/hns/hnae.h > @@ -87,7 +87,7 @@ do { \ > > #define HNAE_AE_REGISTER 0x1 > > -#define RCB_RING_NAME_LEN 16 > +#define RCB_RING_NAME_LEN (IFNAMSIZ + 4) > > enum hnae_led_state { > HNAE_LED_INACTIVE, >
On 21.04.2018 18:50, dann frazier wrote: > BugLink: https://bugs.launchpad.net/bugs/1765977 > > When longer interface names are used, the action names exposed in > /proc/interrupts and /proc/irq/* maybe truncated. For example, when > using the predictable name algorithm in systemd on a HiSilicon D05, > I see: > > ubuntu@d05-3:~$ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' > enahisic2i0-tx0 > enahisic2i0-tx1 > [...] > enahisic2i0-tx8 > enahisic2i0-tx9 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > > Increase the max ring name length to allow for an interface name > of IFNAMSIZE. After this change, I now see: > > $ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' > enahisic2i0-tx0 > enahisic2i0-tx1 > enahisic2i0-tx2 > [...] > enahisic2i0-tx8 > enahisic2i0-tx9 > enahisic2i0-tx10 > enahisic2i0-tx11 > enahisic2i0-tx12 > enahisic2i0-tx13 > enahisic2i0-tx14 > enahisic2i0-tx15 > > Signed-off-by: dann frazier <dann.frazier@canonical.com> > Signed-off-by: David S. Miller <davem@davemloft.net> > (cherry picked from commit f4ea89110df237da6fbcaab76af431e85f07d904) > Signed-off-by: dann frazier <dann.frazier@canonical.com> > --- Applied to artful/master-next > drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h > index 7ba653af19cb..0502e0b2840f 100644 > --- a/drivers/net/ethernet/hisilicon/hns/hnae.h > +++ b/drivers/net/ethernet/hisilicon/hns/hnae.h > @@ -87,7 +87,7 @@ do { \ > > #define HNAE_AE_REGISTER 0x1 > > -#define RCB_RING_NAME_LEN 16 > +#define RCB_RING_NAME_LEN (IFNAMSIZ + 4) > > enum hnae_led_state { > HNAE_LED_INACTIVE, >
Ping on this one - note that it is now fix released for artful, but hasn't landed in bionic yet. On Sat, Apr 21, 2018 at 10:50 AM, dann frazier <dann.frazier@canonical.com> wrote: > BugLink: https://bugs.launchpad.net/bugs/1765977 > > When longer interface names are used, the action names exposed in > /proc/interrupts and /proc/irq/* maybe truncated. For example, when > using the predictable name algorithm in systemd on a HiSilicon D05, > I see: > > ubuntu@d05-3:~$ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' > enahisic2i0-tx0 > enahisic2i0-tx1 > [...] > enahisic2i0-tx8 > enahisic2i0-tx9 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > enahisic2i0-tx1 > > Increase the max ring name length to allow for an interface name > of IFNAMSIZE. After this change, I now see: > > $ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //' > enahisic2i0-tx0 > enahisic2i0-tx1 > enahisic2i0-tx2 > [...] > enahisic2i0-tx8 > enahisic2i0-tx9 > enahisic2i0-tx10 > enahisic2i0-tx11 > enahisic2i0-tx12 > enahisic2i0-tx13 > enahisic2i0-tx14 > enahisic2i0-tx15 > > Signed-off-by: dann frazier <dann.frazier@canonical.com> > Signed-off-by: David S. Miller <davem@davemloft.net> > (cherry picked from commit f4ea89110df237da6fbcaab76af431e85f07d904) > Signed-off-by: dann frazier <dann.frazier@canonical.com> > --- > drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h > index 7ba653af19cb..0502e0b2840f 100644 > --- a/drivers/net/ethernet/hisilicon/hns/hnae.h > +++ b/drivers/net/ethernet/hisilicon/hns/hnae.h > @@ -87,7 +87,7 @@ do { \ > > #define HNAE_AE_REGISTER 0x1 > > -#define RCB_RING_NAME_LEN 16 > +#define RCB_RING_NAME_LEN (IFNAMSIZ + 4) > > enum hnae_led_state { > HNAE_LED_INACTIVE, > -- > 2.17.0 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
At the time of submission bionic was transitioning from devel to stable, so it seems to have slipped. Now applied to bionic master-next (context had to be ignored below change due to other changes). -Stefan
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h index 7ba653af19cb..0502e0b2840f 100644 --- a/drivers/net/ethernet/hisilicon/hns/hnae.h +++ b/drivers/net/ethernet/hisilicon/hns/hnae.h @@ -87,7 +87,7 @@ do { \ #define HNAE_AE_REGISTER 0x1 -#define RCB_RING_NAME_LEN 16 +#define RCB_RING_NAME_LEN (IFNAMSIZ + 4) enum hnae_led_state { HNAE_LED_INACTIVE,