1. 04 2月, 2017 13 次提交
    • R
      bridge: per vlan dst_metadata netlink support · efa5356b
      Roopa Prabhu 提交于
      This patch adds support to attach per vlan tunnel info dst
      metadata. This enables bridge driver to map vlan to tunnel_info
      at ingress and egress. It uses the kernel dst_metadata infrastructure.
      
      The initial use case is vlan to vni bridging, but the api is generic
      to extend to any tunnel_info in the future:
          - Uapi to configure/unconfigure/dump per vlan tunnel data
          - netlink functions to configure vlan and tunnel_info mapping
          - Introduces bridge port flag BR_LWT_VLAN to enable attach/detach
          dst_metadata to bridged packets on ports. off by default.
          - changes to existing code is mainly refactor some existing vlan
          handling netlink code + hooks for new vlan tunnel code
          - I have kept the vlan tunnel code isolated in separate files.
          - most of the netlink vlan tunnel code is handling of vlan-tunid
          ranges (follows the vlan range handling code). To conserve space
          vlan-tunid by default are always dumped in ranges if applicable.
      
      Use case:
      example use for this is a vxlan bridging gateway or vtep
      which maps vlans to vn-segments (or vnis).
      
      iproute2 example (patched and pruned iproute2 output to just show
      relevant fdb entries):
      example shows same host mac learnt on two vni's and
      vlan 100 maps to vni 1000, vlan 101 maps to vni 1001
      
      before (netdev per vni):
      $bridge fdb show | grep "00:02:00:00:00:03"
      00:02:00:00:00:03 dev vxlan1001 vlan 101 master bridge
      00:02:00:00:00:03 dev vxlan1001 dst 12.0.0.8 self
      00:02:00:00:00:03 dev vxlan1000 vlan 100 master bridge
      00:02:00:00:00:03 dev vxlan1000 dst 12.0.0.8 self
      
      after this patch with collect metdata in bridged mode (single netdev):
      $bridge fdb show | grep "00:02:00:00:00:03"
      00:02:00:00:00:03 dev vxlan0 vlan 101 master bridge
      00:02:00:00:00:03 dev vxlan0 src_vni 1001 dst 12.0.0.8 self
      00:02:00:00:00:03 dev vxlan0 vlan 100 master bridge
      00:02:00:00:00:03 dev vxlan0 src_vni 1000 dst 12.0.0.8 self
      
      CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efa5356b
    • R
      bridge: uapi: add per vlan tunnel info · b3c7ef0a
      Roopa Prabhu 提交于
      New nested netlink attribute to associate tunnel info per vlan.
      This is used by bridge driver to send tunnel metadata to
      bridge ports in vlan tunnel mode. This patch also adds new per
      port flag IFLA_BRPORT_VLAN_TUNNEL to enable vlan tunnel mode.
      off by default.
      
      One example use for this is a vxlan bridging gateway or vtep
      which maps vlans to vn-segments (or vnis). User can configure
      per-vlan tunnel information which the bridge driver can use
      to bridge vlan into the corresponding vn-segment.
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3c7ef0a
    • R
      vxlan: support fdb and learning in COLLECT_METADATA mode · 3ad7a4b1
      Roopa Prabhu 提交于
      Vxlan COLLECT_METADATA mode today solves the per-vni netdev
      scalability problem in l3 networks. It expects all forwarding
      information to be present in dst_metadata. This patch series
      enhances collect metadata mode to include the case where only
      vni is present in dst_metadata, and the vxlan driver can then use
      the rest of the forwarding information datbase to make forwarding
      decisions. There is no change to default COLLECT_METADATA
      behaviour. These changes only apply to COLLECT_METADATA when
      used with the bridging use-case with a special dst_metadata
      tunnel info flag (eg: where vxlan device is part of a bridge).
      For all this to work, the vxlan driver will need to now support a
      single fdb table hashed by mac + vni. This series essentially makes
      this happen.
      
      use-case and workflow:
      vxlan collect metadata device participates in bridging vlan
      to vn-segments. Bridge driver above the vxlan device,
      sends the vni corresponding to the vlan in the dst_metadata.
      vxlan driver will lookup forwarding database with (mac + vni)
      for the required remote destination information to forward the
      packet.
      
      Changes introduced by this patch:
          - allow learning and forwarding database state in vxlan netdev in
            COLLECT_METADATA mode. Current behaviour is not changed
            by default. tunnel info flag IP_TUNNEL_INFO_BRIDGE is used
            to support the new bridge friendly mode.
          - A single fdb table hashed by (mac, vni) to allow fdb entries with
            multiple vnis in the same fdb table
          - rx path already has the vni
          - tx path expects a vni in the packet with dst_metadata
          - prior to this series, fdb remote_dsts carried remote vni and
            the vxlan device carrying the fdb table represented the
            source vni. With the vxlan device now representing multiple vnis,
            this patch adds a src vni attribute to the fdb entry. The remote
            vni already uses NDA_VNI attribute. This patch introduces
            NDA_SRC_VNI netlink attribute to represent the src vni in a multi
            vni fdb table.
      
      iproute2 example (patched and pruned iproute2 output to just show
      relevant fdb entries):
      example shows same host mac learnt on two vni's.
      
      before (netdev per vni):
      $bridge fdb show | grep "00:02:00:00:00:03"
      00:02:00:00:00:03 dev vxlan1001 dst 12.0.0.8 self
      00:02:00:00:00:03 dev vxlan1000 dst 12.0.0.8 self
      
      after this patch with collect metadata in bridged mode (single netdev):
      $bridge fdb show | grep "00:02:00:00:00:03"
      00:02:00:00:00:03 dev vxlan0 src_vni 1001 dst 12.0.0.8 self
      00:02:00:00:00:03 dev vxlan0 src_vni 1000 dst 12.0.0.8 self
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ad7a4b1
    • R
      ip_tunnels: new IP_TUNNEL_INFO_BRIDGE flag for ip_tunnel_info mode · f35581d6
      Roopa Prabhu 提交于
      New ip_tunnel_info flag to represent bridged tunnel metadata.
      Used by bridge driver later in the series to pass per vlan dst
      metadata to bridge ports.
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f35581d6
    • D
      Merge branch 'ife-to-module' · 5a0fd98b
      David S. Miller 提交于
      Yotam Gigi says:
      
      ====================
      Extract IFE logic to module
      
      Extract ife logic from the tc_ife action into an independent module, and
      make the tc_ife action use it. This way, the ife encapsulation can be used
      by other modules other than tc_ife action.
      
      v1->v2:
      Fix duplicate symbol error by introducing a new patch that makes the
      original symbol static.
      
      The symbol ife_tlv_meta_extract is exported in act_ife, though not being
      used by any other module. As the symbol is being moved to the new ife
      module, introducing the new module creates duplicate symbol. To fix it,
      add a new patch (1/3) that makes the ife_tlv_meta_extract symbol static in
      act_ife, thus the symbol does not collide.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a0fd98b
    • Y
      net/sched: act_ife: Change to use ife module · 295a6e06
      Yotam Gigi 提交于
      Use the encode/decode functionality from the ife module instead of using
      implementation inside the act_ife.
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NRoman Mashak <mrv@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      295a6e06
    • Y
      net: Introduce ife encapsulation module · 1ce84604
      Yotam Gigi 提交于
      This module is responsible for the ife encapsulation protocol
      encode/decode logics. That module can:
       - ife_encode: encode skb and reserve space for the ife meta header
       - ife_decode: decode skb and extract the meta header size
       - ife_tlv_meta_encode - encodes one tlv entry into the reserved ife
         header space.
       - ife_tlv_meta_decode - decodes one tlv entry from the packet
       - ife_tlv_meta_next - advance to the next tlv
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NRoman Mashak <mrv@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ce84604
    • Y
      net/sched: act_ife: Unexport ife_tlv_meta_encode · 1d5e7c85
      Yotam Gigi 提交于
      As the function ife_tlv_meta_encode is not used by any other module,
      unexport it and make it static for the act_ife module.
      Signed-off-by: NYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NRoman Mashak <mrv@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d5e7c85
    • E
      tcp: add tcp_mss_clamp() helper · 3541f9e8
      Eric Dumazet 提交于
      Small cleanup factorizing code doing the TCP_MAXSEG clamping.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3541f9e8
    • A
      hns_enet: use cpumask_var_t for on-stack mask · ff3edc9b
      Arnd Bergmann 提交于
      On large SMP builds, we can run into a build warning:
      
      drivers/net/ethernet/hisilicon/hns/hns_enet.c: In function 'hns_set_irq_affinity.isra.27':
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1242:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      
      The solution here is to use cpumask_var_t, which can use dynamic
      allocation when CONFIG_CPUMASK_OFFSTACK is enabled.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff3edc9b
    • E
      virtio_net: remove custom busy_poll · ceef438d
      Eric Dumazet 提交于
      Generic NAPI busy polling allows us to remove custom implementations
      found in drivers.
      
      It is possible further optimization could be done by testing
      napi_complete_done() return value.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ceef438d
    • E
      atl1e: add GRO support · c45f8e10
      Eric Dumazet 提交于
      It is time to add GRO support to this driver.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c45f8e10
    • A
      cxgb4: Fix uld_send() for ctrl pkts · 0d4b729d
      Arjun V 提交于
      Without any uld being loaded, uld_txq_info[] will be NULL. uld_send()
      is also used for sending control work requests(for eg: setting filter)
      that dont require any ulds to be loaded. Hence move uld_txq_info[]
      assignment after ctrl_xmit().
      
      Also added a NULL check for uld_txq_info[].
      
      Fixes: 94cdb8bb (cxgb4: Add support for dynamic allocation
             of resources for ULD).
      Signed-off-by: NArjun V <arjun@chelsio.com>
      Signed-off-by: NCasey Leedom <leedom@chelsio.com>
      Signed-off-by: NGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d4b729d
  2. 03 2月, 2017 18 次提交
  3. 02 2月, 2017 9 次提交