diff mbox series

[net-next,v3,2/2] virtio-net: remove GUEST_CSUM check for XDP

Message ID 20230626120301.380-3-hengqi@linux.alibaba.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series virtio-net: avoid conflicts between XDP and GUEST_CSUM | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers warning 1 maintainers not CCed: virtualization@lists.linux-foundation.org
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch warning WARNING: line length of 116 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Heng Qi June 26, 2023, 12:03 p.m. UTC
XDP and GUEST_CSUM no longer conflict now, so we removed the
check for GUEST_CSUM for XDP loading/unloading.

Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
v1->v2:
  - Rewrite the commit log.

 drivers/net/virtio_net.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Michael S. Tsirkin June 26, 2023, 12:14 p.m. UTC | #1
On Mon, Jun 26, 2023 at 08:03:01PM +0800, Heng Qi wrote:
> XDP and GUEST_CSUM no longer conflict now, so we removed the

removed -> remove

> check for GUEST_CSUM for XDP loading/unloading.
> 
> Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> ---
> v1->v2:
>   - Rewrite the commit log.
> 
>  drivers/net/virtio_net.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 0a715e0fbc97..2e4bd9a05c85 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -60,7 +60,6 @@ static const unsigned long guest_offloads[] = {
>  	VIRTIO_NET_F_GUEST_TSO6,
>  	VIRTIO_NET_F_GUEST_ECN,
>  	VIRTIO_NET_F_GUEST_UFO,
> -	VIRTIO_NET_F_GUEST_CSUM,
>  	VIRTIO_NET_F_GUEST_USO4,
>  	VIRTIO_NET_F_GUEST_USO6,
>  	VIRTIO_NET_F_GUEST_HDRLEN
> @@ -3437,10 +3436,9 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog,
>  	        virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO6) ||
>  	        virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_ECN) ||
>  		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_UFO) ||
> -		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM) ||
>  		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_USO4) ||
>  		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_USO6))) {
> -		NL_SET_ERR_MSG_MOD(extack, "Can't set XDP while host is implementing GRO_HW/CSUM, disable GRO_HW/CSUM first");
> +		NL_SET_ERR_MSG_MOD(extack, "Can't set XDP while host is implementing GRO_HW, disable GRO_HW first");
>  		return -EOPNOTSUPP;
>  	}
>  
> -- 
> 2.19.1.6.gb485710b
Heng Qi June 26, 2023, 2:53 p.m. UTC | #2
在 2023/6/26 下午8:14, Michael S. Tsirkin 写道:
> On Mon, Jun 26, 2023 at 08:03:01PM +0800, Heng Qi wrote:
>> XDP and GUEST_CSUM no longer conflict now, so we removed the
> removed -> remove

Will modify.

Thanks.

>
>> check for GUEST_CSUM for XDP loading/unloading.
>>
>> Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
>> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
>> ---
>> v1->v2:
>>    - Rewrite the commit log.
>>
>>   drivers/net/virtio_net.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>> index 0a715e0fbc97..2e4bd9a05c85 100644
>> --- a/drivers/net/virtio_net.c
>> +++ b/drivers/net/virtio_net.c
>> @@ -60,7 +60,6 @@ static const unsigned long guest_offloads[] = {
>>   	VIRTIO_NET_F_GUEST_TSO6,
>>   	VIRTIO_NET_F_GUEST_ECN,
>>   	VIRTIO_NET_F_GUEST_UFO,
>> -	VIRTIO_NET_F_GUEST_CSUM,
>>   	VIRTIO_NET_F_GUEST_USO4,
>>   	VIRTIO_NET_F_GUEST_USO6,
>>   	VIRTIO_NET_F_GUEST_HDRLEN
>> @@ -3437,10 +3436,9 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog,
>>   	        virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO6) ||
>>   	        virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_ECN) ||
>>   		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_UFO) ||
>> -		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM) ||
>>   		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_USO4) ||
>>   		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_USO6))) {
>> -		NL_SET_ERR_MSG_MOD(extack, "Can't set XDP while host is implementing GRO_HW/CSUM, disable GRO_HW/CSUM first");
>> +		NL_SET_ERR_MSG_MOD(extack, "Can't set XDP while host is implementing GRO_HW, disable GRO_HW first");
>>   		return -EOPNOTSUPP;
>>   	}
>>   
>> -- 
>> 2.19.1.6.gb485710b
diff mbox series

Patch

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0a715e0fbc97..2e4bd9a05c85 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -60,7 +60,6 @@  static const unsigned long guest_offloads[] = {
 	VIRTIO_NET_F_GUEST_TSO6,
 	VIRTIO_NET_F_GUEST_ECN,
 	VIRTIO_NET_F_GUEST_UFO,
-	VIRTIO_NET_F_GUEST_CSUM,
 	VIRTIO_NET_F_GUEST_USO4,
 	VIRTIO_NET_F_GUEST_USO6,
 	VIRTIO_NET_F_GUEST_HDRLEN
@@ -3437,10 +3436,9 @@  static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog,
 	        virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO6) ||
 	        virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_ECN) ||
 		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_UFO) ||
-		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM) ||
 		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_USO4) ||
 		virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_USO6))) {
-		NL_SET_ERR_MSG_MOD(extack, "Can't set XDP while host is implementing GRO_HW/CSUM, disable GRO_HW/CSUM first");
+		NL_SET_ERR_MSG_MOD(extack, "Can't set XDP while host is implementing GRO_HW, disable GRO_HW first");
 		return -EOPNOTSUPP;
 	}