[Devel] [PATCH v2 RH9 2/3] ve/net/features: put per-ve netdev features to separate struct member

Konstantin Khorenko khorenko at virtuozzo.com
Wed Oct 27 19:29:12 MSK 2021


On 27.10.2021 17:45, Pavel Tikhomirov wrote:
> Replace features member uses for per-ve features with ve_features member
> under CONFIG_VE.
> 
> Later we would likely want to split this patch and put each fixup hunk
> in proper base patch:
> 
> Fixes: be40f8f443f9 ("ve/net/dummy: enable support in a container")
> Fixes: b3345177cf1f ("net: Add NETIF_F_VIRTUAL feature to mask devices allowed in CT")
> Fixes: cba4909419c9 ("ve/net/ppp: introduce VE_FEATURE_PPP feature")
> Fixes: 0046628c2a38 ("ve/net/vxlan: enable support in a container")
> Fixes: 69dfb70e37e3 ("ve/net/ip_gre: containerize per-net devices")
> Fixes: b06f5ab814de ("net: Make ipip feature optional")
> Fixes: 5b9aaf63d0d3 ("ve/net/ipv6 tunnels: Enable GRE netdevice register inside container")
> Fixes: 466db989d34e ("ve/net/sit: Enable SIT devices in Containers")
> Fixes: 6b4bc35aae98 ("openvswitch: allow to create ovs bridges inside Containers")
> 
> Fixes: 12b9b0869be8 ("drivers/net/ve: venet network device introduced")
> Fixes: 2339b008fbf7 ("net: optimized skb forwarding for venet")
> Fixes: 00e7dbe29105 ("ve/net,netfilter: Adjust REDIRECT target on venet device")
> 
> v2: allign ve_features assignments in ipip, fix NETIF_F_NETNS_LOCAL bad
> usage from ve_features in ve_is_dev_movable
> 
> https://jira.sw.ru/browse/PSBM-135200
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>

<skipped>

> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
> index fbc8d5dd9799..9945162fa074 100644
> --- a/include/linux/netdev_features.h
> +++ b/include/linux/netdev_features.h
> @@ -14,7 +14,7 @@ typedef u64 netdev_features_t;
>   enum {
>   	NETIF_F_SG_BIT,			/* Scatter/gather IO. */
>   	NETIF_F_IP_CSUM_BIT,		/* Can checksum TCP/UDP over IPv4. */
> -	NETIF_F_VIRTUAL_BIT,		/* Can be registered inside VE */
> +	__UNUSED_NETIF_F_1,
>   	NETIF_F_HW_CSUM_BIT,		/* Can checksum all the packets. */
>   	NETIF_F_IPV6_CSUM_BIT,		/* Can checksum TCP/UDP over IPV6 */
>   	NETIF_F_HIGHDMA_BIT,		/* Can DMA to high memory. */
> @@ -84,9 +84,6 @@ enum {
>   	NETIF_F_GRO_FRAGLIST_BIT,	/* Fraglist GRO */
>   
>   	NETIF_F_GRO_UDP_FWD_BIT,	/* Allow UDP GRO for forwarding */
> -	/* here goes NETIF_F_HW_MACSEC_BIT in ms, temporarily reverted */

Restored NETIF_F_HW_MACSEC_BIT here, see later reverts.
https://jira.sw.ru/browse/PSBM-134132

> -					/* Offload MACsec operations */
> -	NETIF_F_VENET_BIT,		/* Device is venet device */
>   
>   	NETIF_F_HW_HSR_TAG_INS_BIT,	/* Offload HSR tag insertion */
>   	NETIF_F_HW_HSR_TAG_RM_BIT,	/* Offload HSR tag removal */
> @@ -170,8 +167,16 @@ enum {
>   #define NETIF_F_HW_HSR_FWD	__NETIF_F(HW_HSR_FWD)
>   #define NETIF_F_HW_HSR_DUP	__NETIF_F(HW_HSR_DUP)
>   
> +#ifdef CONFIG_VE
> +/* For net_device->ve_features */
> +enum {
> +	NETIF_F_VIRTUAL_BIT,	/* Device is venet device */

Fixed comment here.

> +	NETIF_F_VENET_BIT,	/* Device is venet device */
> +};
> +
>   #define NETIF_F_VIRTUAL		__NETIF_F(VIRTUAL)
>   #define NETIF_F_VENET		__NETIF_F(VENET)
> +#endif
>

<skipped>


More information about the Devel mailing list