Re: [PATCH] rxe_cfg: Fix parsing of ethtool / ifconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/17 07:45, Moni Shoua wrote:
On Wed, Oct 18, 2017 at 5:24 PM, Leon Romanovsky <leon@xxxxxxxxxx> wrote:
Moni ?????

Thanks

On Wed, Oct 11, 2017 at 01:00:24PM -0600, Nathan Hartwell wrote:
rxe_cfg does not always parse the output of ethtool and ifconfig correctly.

Fix two items:
1)  Parsing of ethtool's link speed field to always output a link speed.

2)  Parsing of ifconfig's IP address / MTU fields with newer builds of
ifconfig that have a slightly different output format than in the
past.
did you consider replacing ifconfig with ip? I can't say for sure but
the recommendation AFAIK is to replace is to replace ifconfig with ip
in scripts that parse the output
Another alternative is to use /sys file system (e.g. /sys/class/net/p2p1/speed)

Personally I'm in favor of the latter solution (sysfs). For sysfs attributes backwards compatibility is guaranteed but not for the output of the ifconfig or ip tools.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux