Print this page
11490 SRS ring polling disabled for VLANs
11491 Want DLS bypass for VLAN traffic
11492 add VLVF bypass to ixgbe core
2869 duplicate packets with vnics over aggrs
11489 DLS stat delete and aggr kstat can deadlock
Portions contributed by: Theo Schlossnagle <jesus@omniti.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/mac_provider.h
          +++ new/usr/src/uts/common/sys/mac_provider.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  24      - * Copyright (c) 2017, Joyent, Inc.
       24 + * Copyright (c) 2018, Joyent, Inc.
  25   25   */
  26   26  
  27   27  #ifndef _SYS_MAC_PROVIDER_H
  28   28  #define _SYS_MAC_PROVIDER_H
  29   29  
  30   30  #include <sys/types.h>
  31   31  #include <sys/ddi.h>
  32   32  #include <sys/sunddi.h>
  33   33  #include <sys/stream.h>
  34   34  #include <sys/mkdev.h>
↓ open down ↓ 239 lines elided ↑ open up ↑
 274  274  #define MAC_VIRT_NONE           0x0
 275  275  #define MAC_VIRT_LEVEL1         0x1
 276  276  #define MAC_VIRT_HIO            0x2
 277  277  
 278  278  typedef enum {
 279  279          MAC_RING_TYPE_RX = 1,   /* Receive ring */
 280  280          MAC_RING_TYPE_TX        /* Transmit ring */
 281  281  } mac_ring_type_t;
 282  282  
 283  283  /*
      284 + * The value VLAN_ID_NONE (VID 0) means a client does not have
      285 + * membership to any VLAN. However, this statement is true for both
      286 + * untagged packets and priority tagged packets leading to confusion
      287 + * over what semantic is intended. To the provider, VID 0 is a valid
      288 + * VID when priority tagging is in play. To MAC and everything above
      289 + * VLAN_ID_NONE almost universally implies untagged traffic. Thus, we
      290 + * convert VLAN_ID_NONE to a sentinel value (MAC_VLAN_UNTAGGED) at the
      291 + * border between MAC and MAC provider. This informs the provider that
      292 + * the client is interested in untagged traffic and the provider
      293 + * should set any relevant bits to receive such traffic.
      294 + *
      295 + * Currently, the API between MAC and the provider passes the VID as a
      296 + * unit16_t. In the future this could actually be the entire TCI mask
      297 + * (PCP, DEI, and VID). This current scheme is safe in that potential
      298 + * future world as well; as 0xFFFF is not a valid TCI (the 0xFFF VID
      299 + * is reserved and never transmitted across networks).
      300 + */
      301 +#define MAC_VLAN_UNTAGGED               UINT16_MAX
      302 +#define MAC_VLAN_UNTAGGED_VID(vid)      \
      303 +        (((vid) == VLAN_ID_NONE) ? MAC_VLAN_UNTAGGED : (vid))
      304 +
      305 +/*
 284  306   * Grouping type of a ring group
 285  307   *
 286  308   * MAC_GROUP_TYPE_STATIC: The ring group can not be re-grouped.
 287  309   * MAC_GROUP_TYPE_DYNAMIC: The ring group support dynamic re-grouping
 288  310   */
 289  311  typedef enum {
 290  312          MAC_GROUP_TYPE_STATIC = 1,      /* Static ring group */
 291  313          MAC_GROUP_TYPE_DYNAMIC          /* Dynamic ring group */
 292  314  } mac_group_type_t;
 293  315  
↓ open down ↓ 57 lines elided ↑ open up ↑
 351  373          uint_t                  mri_flags;
 352  374  } mac_ring_info_s;
 353  375  
 354  376  #define mri_tx                  mrfunion.send
 355  377  #define mri_poll                mrfunion.poll
 356  378  
 357  379  /*
 358  380   * #defines for mri_flags. The flags are temporary flags that are provided
 359  381   * only to workaround issues in specific drivers, and they will be
 360  382   * removed in the future.
      383 + *
      384 + * These are consumed only by sun4v and neptune (nxge).
 361  385   */
 362  386  #define MAC_RING_TX_SERIALIZE           0x1
 363  387  #define MAC_RING_RX_ENQUEUE             0x2
 364  388  
 365  389  typedef int     (*mac_group_start_t)(mac_group_driver_t);
 366  390  typedef void    (*mac_group_stop_t)(mac_group_driver_t);
 367  391  typedef int     (*mac_add_mac_addr_t)(void *, const uint8_t *);
 368  392  typedef int     (*mac_rem_mac_addr_t)(void *, const uint8_t *);
      393 +typedef int     (*mac_add_vlan_filter_t)(mac_group_driver_t, uint16_t);
      394 +typedef int     (*mac_rem_vlan_filter_t)(mac_group_driver_t, uint16_t);
 369  395  
 370  396  struct mac_group_info_s {
 371  397          mac_group_driver_t      mgi_driver;     /* Driver reference */
 372  398          mac_group_start_t       mgi_start;      /* Start the group */
 373  399          mac_group_stop_t        mgi_stop;       /* Stop the group */
 374  400          uint_t                  mgi_count;      /* Count of rings */
 375  401          mac_intr_t              mgi_intr;       /* Optional per-group intr */
 376  402  
 377      -        /* Only used for rx groups */
      403 +        /* Only used for Rx groups */
 378  404          mac_add_mac_addr_t      mgi_addmac;     /* Add a MAC address */
 379  405          mac_rem_mac_addr_t      mgi_remmac;     /* Remove a MAC address */
      406 +        mac_add_vlan_filter_t   mgi_addvlan;    /* Add a VLAN filter */
      407 +        mac_rem_vlan_filter_t   mgi_remvlan;    /* Remove a VLAN filter */
 380  408  };
 381  409  
 382  410  /*
 383  411   * Share management functions.
 384  412   */
 385  413  typedef uint64_t mac_share_handle_t;
 386  414  
 387  415  /*
 388  416   * Allocate and free a share. Returns ENOSPC if all shares have been
 389  417   * previously allocated.
↓ open down ↓ 97 lines elided ↑ open up ↑
 487  515                                      uint_t *);
 488  516  extern int                      mac_maxsdu_update(mac_handle_t, uint_t);
 489  517  extern int                      mac_maxsdu_update2(mac_handle_t, uint_t,
 490  518                                      uint_t);
 491  519  
 492  520  extern mac_register_t           *mac_alloc(uint_t);
 493  521  extern void                     mac_free(mac_register_t *);
 494  522  extern int                      mac_register(mac_register_t *, mac_handle_t *);
 495  523  extern int                      mac_disable_nowait(mac_handle_t);
 496  524  extern int                      mac_disable(mac_handle_t);
 497      -extern int                      mac_unregister(mac_handle_t);
 498      -extern void                     mac_rx(mac_handle_t, mac_resource_handle_t,
      525 +extern int                      mac_unregister(mac_handle_t);
      526 +extern void                     mac_rx(mac_handle_t, mac_resource_handle_t,
 499  527                                      mblk_t *);
 500      -extern void                     mac_rx_ring(mac_handle_t, mac_ring_handle_t,
      528 +extern void                     mac_rx_ring(mac_handle_t, mac_ring_handle_t,
 501  529                                      mblk_t *, uint64_t);
 502      -extern void                     mac_link_update(mac_handle_t, link_state_t);
 503      -extern void                     mac_link_redo(mac_handle_t, link_state_t);
 504      -extern void                     mac_unicst_update(mac_handle_t,
      530 +extern void                     mac_link_update(mac_handle_t, link_state_t);
      531 +extern void                     mac_link_redo(mac_handle_t, link_state_t);
      532 +extern void                     mac_unicst_update(mac_handle_t,
 505  533                                      const uint8_t *);
 506  534  extern void                     mac_dst_update(mac_handle_t, const uint8_t *);
 507  535  extern void                     mac_tx_update(mac_handle_t);
 508  536  extern void                     mac_tx_ring_update(mac_handle_t,
 509  537                                      mac_ring_handle_t);
 510  538  extern void                     mac_capab_update(mac_handle_t);
 511  539  extern int                      mac_pdata_update(mac_handle_t, void *,
 512  540                                      size_t);
 513  541  extern void                     mac_multicast_refresh(mac_handle_t,
 514  542                                      mac_multicst_t, void *, boolean_t);
↓ open down ↓ 68 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX