]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Add macvlan support on i40e
authorHarshitha Ramamurthy <harshitha.ramamurthy@intel.com>
Wed, 19 Jun 2019 18:45:40 +0000 (14:45 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 28 Jun 2019 23:00:20 +0000 (16:00 -0700)
commit7b6ff2ed0a5e9927cce80f510ea26e59058b90cc
tree9089ca39dfe269ac1d4410cfc3e0940f00f57824
parent66694f9a99da27cda00371df7bb94e45e7c3e5fc
i40e: Add macvlan support on i40e

This patch enables macvlan offloads for i40e. The idea is to use
channels as macvlan interfaces. The channels are VSIs of
type VMDQ. When the first macvlan is created, the maximum number of
channels possible are created. From then on, as a macvlan interface
is created, a macvlan filter is added to these already created
channels (VSIs).

This patch utilizes subordinate device traffic classes to make queue
groups(channels) available for an upper device like a macvlan.

Steps to configure macvlan offloads:
1. ethtool -K ethx l2-fwd-offload on
2. ip link add link ethx name macvlan1 type macvlan
3. ip addr add <address> dev macvlan1
4. ip link set macvlan1 up

Signed-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c