lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <85327b6c-e8a2-0c6c-9c2d-8f17f8a1a929@linux.vnet.ibm.com>
Date:   Fri, 19 Jan 2018 13:23:21 -0600
From:   Nathan Fontenot <nfont@...ux.vnet.ibm.com>
To:     John Allen <jallen@...ux.vnet.ibm.com>, netdev@...r.kernel.org
Cc:     Thomas Falcon <tlfalcon@...ux.vnet.ibm.com>
Subject: Re: [PATCH net v2 2/3] ibmvnic: Revert to previous mtu when
 unsupported value requested



On 01/18/2018 04:27 PM, John Allen wrote:
> If we request an unsupported mtu value, the vnic server will suggest a
> different value. Currently we take the suggested value without question
> and login with that value. However, the behavior doesn't seem completely
> sane as attempting to change the mtu to some specific value will change
> the mtu to some completely different value most of the time. This patch
> fixes the issue by logging in with the previously used mtu value and
> printing an error message saying that the given mtu is unsupported.
> 
> Signed-off-by: John Allen <jallen@...ux.vnet.ibm.com>

Reviewed-by: Nathan Fontenot <nfont@...ux.vnet.ibm.com>

> ---
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
> index f8f1396..bb56460 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -3608,7 +3608,17 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
>  			 *req_value,
>  			 (long int)be64_to_cpu(crq->request_capability_rsp.
>  					       number), name);
> -		*req_value = be64_to_cpu(crq->request_capability_rsp.number);
> +
> +		if (be16_to_cpu(crq->request_capability_rsp.capability) ==
> +		    REQ_MTU) {
> +			pr_err("mtu of %llu is not supported. Reverting.\n",
> +			       *req_value);
> +			*req_value = adapter->fallback.mtu;
> +		} else {
> +			*req_value =
> +				be64_to_cpu(crq->request_capability_rsp.number);
> +		}
> +
>  		ibmvnic_send_req_caps(adapter, 1);
>  		return;
>  	default:
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ