mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
0d89d2035f
In the case where a non-MPLS packet is received and an MPLS stack is added it may well be the case that the original skb is GSO but the NIC used for transmit does not support GSO of MPLS packets. The aim of this code is to provide GSO in software for MPLS packets whose skbs are GSO. SKB Usage: When an implementation adds an MPLS stack to a non-MPLS packet it should do the following to skb metadata: * Set skb->inner_protocol to the old non-MPLS ethertype of the packet. skb->inner_protocol is added by this patch. * Set skb->protocol to the new MPLS ethertype of the packet. * Set skb->network_header to correspond to the end of the L3 header, including the MPLS label stack. I have posted a patch, "[PATCH v3.29] datapath: Add basic MPLS support to kernel" which adds MPLS support to the kernel datapath of Open vSwtich. That patch sets the above requirements in datapath/actions.c:push_mpls() and was used to exercise this code. The datapath patch is against the Open vSwtich tree but it is intended that it be added to the Open vSwtich code present in the mainline Linux kernel at some point. Features: I believe that the approach that I have taken is at least partially consistent with the handling of other protocols. Jesse, I understand that you have some ideas here. I am more than happy to change my implementation. This patch adds dev->mpls_features which may be used by devices to advertise features supported for MPLS packets. A new NETIF_F_MPLS_GSO feature is added for devices which support hardware MPLS GSO offload. Currently no devices support this and MPLS GSO always falls back to software. Alternate Implementation: One possible alternate implementation is to teach netif_skb_features() and skb_network_protocol() about MPLS, in a similar way to their understanding of VLANs. I believe this would avoid the need for net/mpls/mpls_gso.c and in particular the calls to __skb_push() and __skb_push() in mpls_gso_segment(). I have decided on the implementation in this patch as it should not introduce any overhead in the case where mpls_gso is not compiled into the kernel or inserted as a module. MPLS GSO suggested by Jesse Gross. Based in part on "v4 GRE: Add TCP segmentation offload for GRE" by Pravin B Shelar. Cc: Jesse Gross <jesse@nicira.com> Cc: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
74 lines
2.0 KiB
Makefile
74 lines
2.0 KiB
Makefile
#
|
|
# Makefile for the linux networking.
|
|
#
|
|
# 2 Sep 2000, Christoph Hellwig <hch@infradead.org>
|
|
# Rewritten to use lists instead of if-statements.
|
|
#
|
|
|
|
obj-y := nonet.o
|
|
|
|
obj-$(CONFIG_NET) := socket.o core/
|
|
|
|
tmp-$(CONFIG_COMPAT) := compat.o
|
|
obj-$(CONFIG_NET) += $(tmp-y)
|
|
|
|
# LLC has to be linked before the files in net/802/
|
|
obj-$(CONFIG_LLC) += llc/
|
|
obj-$(CONFIG_NET) += ethernet/ 802/ sched/ netlink/
|
|
obj-$(CONFIG_NETFILTER) += netfilter/
|
|
obj-$(CONFIG_INET) += ipv4/
|
|
obj-$(CONFIG_XFRM) += xfrm/
|
|
obj-$(CONFIG_UNIX) += unix/
|
|
obj-$(CONFIG_NET) += ipv6/
|
|
obj-$(CONFIG_PACKET) += packet/
|
|
obj-$(CONFIG_NET_KEY) += key/
|
|
obj-$(CONFIG_BRIDGE) += bridge/
|
|
obj-$(CONFIG_NET_DSA) += dsa/
|
|
obj-$(CONFIG_IPX) += ipx/
|
|
obj-$(CONFIG_ATALK) += appletalk/
|
|
obj-$(CONFIG_X25) += x25/
|
|
obj-$(CONFIG_LAPB) += lapb/
|
|
obj-$(CONFIG_NETROM) += netrom/
|
|
obj-$(CONFIG_ROSE) += rose/
|
|
obj-$(CONFIG_AX25) += ax25/
|
|
obj-$(CONFIG_CAN) += can/
|
|
obj-$(CONFIG_IRDA) += irda/
|
|
obj-$(CONFIG_BT) += bluetooth/
|
|
obj-$(CONFIG_SUNRPC) += sunrpc/
|
|
obj-$(CONFIG_AF_RXRPC) += rxrpc/
|
|
obj-$(CONFIG_ATM) += atm/
|
|
obj-$(CONFIG_L2TP) += l2tp/
|
|
obj-$(CONFIG_DECNET) += decnet/
|
|
obj-$(CONFIG_PHONET) += phonet/
|
|
ifneq ($(CONFIG_VLAN_8021Q),)
|
|
obj-y += 8021q/
|
|
endif
|
|
obj-$(CONFIG_IP_DCCP) += dccp/
|
|
obj-$(CONFIG_IP_SCTP) += sctp/
|
|
obj-$(CONFIG_RDS) += rds/
|
|
obj-$(CONFIG_WIRELESS) += wireless/
|
|
obj-$(CONFIG_MAC80211) += mac80211/
|
|
obj-$(CONFIG_TIPC) += tipc/
|
|
obj-$(CONFIG_NETLABEL) += netlabel/
|
|
obj-$(CONFIG_IUCV) += iucv/
|
|
obj-$(CONFIG_RFKILL) += rfkill/
|
|
obj-$(CONFIG_NET_9P) += 9p/
|
|
obj-$(CONFIG_CAIF) += caif/
|
|
ifneq ($(CONFIG_DCB),)
|
|
obj-y += dcb/
|
|
endif
|
|
obj-$(CONFIG_IEEE802154) += ieee802154/
|
|
obj-$(CONFIG_MAC802154) += mac802154/
|
|
|
|
ifeq ($(CONFIG_NET),y)
|
|
obj-$(CONFIG_SYSCTL) += sysctl_net.o
|
|
endif
|
|
obj-$(CONFIG_WIMAX) += wimax/
|
|
obj-$(CONFIG_DNS_RESOLVER) += dns_resolver/
|
|
obj-$(CONFIG_CEPH_LIB) += ceph/
|
|
obj-$(CONFIG_BATMAN_ADV) += batman-adv/
|
|
obj-$(CONFIG_NFC) += nfc/
|
|
obj-$(CONFIG_OPENVSWITCH) += openvswitch/
|
|
obj-$(CONFIG_VSOCKETS) += vmw_vsock/
|
|
obj-$(CONFIG_NET_MPLS_GSO) += mpls/
|