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

Stefan Bader stefan.bader at canonical.com
Mon Apr 23 09:47:23 UTC 2018


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 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>
Acked-by: Stefan Bader <stefan.bader 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,
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180423/b11c37bd/attachment.sig>


More information about the kernel-team mailing list