Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160AbdLNTem (ORCPT ); Thu, 14 Dec 2017 14:34:42 -0500 Received: from mx0a-00190b01.pphosted.com ([67.231.149.131]:35320 "EHLO mx0a-00190b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751952AbdLNTel (ORCPT ); Thu, 14 Dec 2017 14:34:41 -0500 From: Jason Baron To: qemu-devel@nongnu.org, linux-kernel@vger.kernel.org Cc: mst@redhat.com, jasowang@redhat.com Subject: [PATCH 0/2] virtio_net: allow hypervisor to indicate linkspeed and duplex setting Date: Thu, 14 Dec 2017 14:33:51 -0500 Message-Id: X-Mailer: git-send-email 1.9.1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-14_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=541 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712140267 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-14_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=523 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712140267 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1363 Lines: 39 We have found it useful to be able to set the linkspeed and duplex settings from the host-side for virtio_net. This obviates the need for guest changes and settings for these fields. The ability to set linkspeed and duplex was introduced by: 16032be virtio_net: add ethtool support for set and get of settings And using 'ethtool -s' continues to over-write the linkspeed/duplex settings with this patch. The 1/2 patch is against net-next, while the 2/2 patch is the associated qemu changes that would go in after as update-linux-headers.sh should be run first. So 2/2 is more meant as a demonstration of how I intend this to work. Thanks, -Jason Jason Baron (2): virtio_net: allow hypervisor to indicate linkspeed and duplex setting qemu: add linkspeed and duplex setting to virtio-net linux changes: drivers/net/virtio_net.c | 11 ++++++++++- include/uapi/linux/virtio_net.h | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) qemu changes: hw/net/virtio-net.c | 29 +++++++++++++++++++++++++++++ include/hw/virtio/virtio-net.h | 3 +++ include/standard-headers/linux/virtio_net.h | 4 ++++ 3 files changed, 36 insertions(+) -- 2.6.1