[PATCH][SRU Bionic][SRU Artful] net: hns: Avoid action name truncation

dann frazier dann.frazier at canonical.com
Tue May 22 14:24:55 UTC 2018


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 at 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 at 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 at canonical.com>
> Signed-off-by: David S. Miller <davem at davemloft.net>
> (cherry picked from commit f4ea89110df237da6fbcaab76af431e85f07d904)
> Signed-off-by: dann frazier <dann.frazier at 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 at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team




More information about the kernel-team mailing list