Re: [RFC WIP 2/2] rdma_rxe: use netlink messages to add/delete links

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

 



On Wed, Sep 26, 2018 at 10:41:50AM -0500, Steve Wise wrote:
>
>
> On 9/26/2018 3:45 AM, Leon Romanovsky wrote:
>
> >> +	if (!ndev) {
> >> +		pr_err("interface %s not found\n", ndev_name);
> >> +		err = -ENODEV;
> >> +		goto err;
> >> +	}
> >> +
> >> +	if (net_to_rxe(ndev)) {
> >> +		pr_err("already configured on %s\n", ndev_name);
> >
> > Something general, not for this series, but we need to start to use
> > extack to deliver errors and not dmesg.
>
> extack is being used for the NEWLINK/DELLINK flow:
>
> rdma link add rxe_enp4s0f0 type rxe dev foo0
> link add: No such device
>
> nltrace snipit:
>
> netlink recv(3):
> Setting msg proto to 20
> --------------------------   BEGIN NETLINK MESSAGE
> ---------------------------
>   [NETLINK HEADER] 16 octets
>     .nlmsg_len = 76
>     .type = 2 <ERROR>
>     .flags = 0 <>
>     .seq = 1537976444
>     .port = 1718
>   [ERRORMSG] 20 octets
>     .error = -19 "No such device"
>   [ORIGINAL MESSAGE] 16 octets
>     .nlmsg_len = 16
>     .type = 5135 <0x140f>
>     .flags = 5 <REQUEST,ACK>
>     .seq = 1537976444
>     .port = 0
> ---------------------------  END NETLINK MESSAGE
> ---------------------------
>

Ohh, great, can we return "already configured on .." error via extack
and on not print it with pr_err()?

Thanks

Attachment: signature.asc
Description: PGP signature


[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