summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/mac_impl.h
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-05-19 12:07:49 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-05-19 12:07:49 +0000
commit3817aef5460600089dfc2425a47c170ab4cce9e4 (patch)
tree73c5ac47d6ca43c532100c0f5e2d8e58f7f19728 /usr/src/uts/common/sys/mac_impl.h
parentb0c683a03f7c07cd7ab962acc1dcfef6ba4f78a3 (diff)
parentd5b4c61b9474779079c9ef8650d04dd7c8207a06 (diff)
downloadillumos-joyent-release-20200521.tar.gz
[illumos-gate merge]release-20200521
commit d5b4c61b9474779079c9ef8650d04dd7c8207a06 12732 Update Intel microcode to 20200508 commit c61a1653a4d73dbc950dac7d96350fd6cb517486 12676 want better offloads for vnics 12677 simnet has bogus mi_tx_cksum_flags 12678 mac_tx() is too eager to emulate hardware offloads commit f13f199891d2a0440db0361743dd73527f565e89 12729 bootadm set-menu timeout crashes without timeout value commit c039d8138bcc82c8082abc5560e0293afb7994cf 12741 Fix "more then" typo in dlopen(3c) commit 109b65249647da8f2f4306cd9b3d2800b05fd59b 12744 gfx_private: bitmap_cons_clear 8-bit mode is using wrong color commit 3382f241dd77fdfc4a9c4b03092e328924cd0c65 12707 Port OpenZFS Coverity Fixes commit 0c268761780011e1de45099cf76b2ee464ea8f50 12733 loader: autoboot_timeout greater than 10 is not shown Conflicts: usr/src/boot/sys/boot/forth/menu.4th usr/src/pkg/manifests/system-test-nettest.mf usr/src/test/net-tests/config/Makefile usr/src/test/net-tests/runfiles/default.run usr/src/test/net-tests/tests/forwarding/README usr/src/test/net-tests/tests/forwarding/ip_forwarding.ksh usr/src/test/net-tests/tests/net_common.ksh usr/src/uts/common/io/mac/mac.c usr/src/uts/common/io/mac/mac_client.c usr/src/uts/common/io/mac/mac_sched.c usr/src/uts/common/io/mac/mac_util.c usr/src/uts/common/io/simnet/simnet.c
Diffstat (limited to 'usr/src/uts/common/sys/mac_impl.h')
-rw-r--r--usr/src/uts/common/sys/mac_impl.h62
1 files changed, 13 insertions, 49 deletions
diff --git a/usr/src/uts/common/sys/mac_impl.h b/usr/src/uts/common/sys/mac_impl.h
index f1b119653f..21f2c10a8e 100644
--- a/usr/src/uts/common/sys/mac_impl.h
+++ b/usr/src/uts/common/sys/mac_impl.h
@@ -290,54 +290,6 @@ struct mac_group_s {
#define GROUP_INTR_ENABLE_FUNC(g) (g)->mrg_info.mgi_intr.mi_enable
#define GROUP_INTR_DISABLE_FUNC(g) (g)->mrg_info.mgi_intr.mi_disable
-#define MAC_RING_TX(mhp, rh, mp, rest) { \
- mac_ring_handle_t mrh = rh; \
- mac_impl_t *mimpl = (mac_impl_t *)mhp; \
- /* \
- * Send packets through a selected tx ring, or through the \
- * default handler if there is no selected ring. \
- */ \
- if (mrh == NULL) \
- mrh = mimpl->mi_default_tx_ring; \
- if (mrh == NULL) { \
- rest = mimpl->mi_tx(mimpl->mi_driver, mp); \
- } else { \
- rest = mac_hwring_tx(mrh, mp); \
- } \
-}
-
-/*
- * This is the final stop before reaching the underlying driver
- * or aggregation, so this is where the bridging hook is implemented.
- * Packets that are bridged will return through mac_bridge_tx(), with
- * rh nulled out if the bridge chooses to send output on a different
- * link due to forwarding.
- */
-#define MAC_TX(mip, rh, mp, src_mcip) { \
- mac_ring_handle_t rhandle = (rh); \
- /* \
- * If there is a bound Hybrid I/O share, send packets through \
- * the default tx ring. (When there's a bound Hybrid I/O share, \
- * the tx rings of this client are mapped in the guest domain \
- * and not accessible from here.) \
- */ \
- _NOTE(CONSTANTCONDITION) \
- if ((src_mcip)->mci_state_flags & MCIS_SHARE_BOUND) \
- rhandle = (mip)->mi_default_tx_ring; \
- if (mip->mi_promisc_list != NULL) \
- mac_promisc_dispatch(mip, mp, src_mcip); \
- /* \
- * Grab the proper transmit pointer and handle. Special \
- * optimization: we can test mi_bridge_link itself atomically, \
- * and if that indicates no bridge send packets through tx ring.\
- */ \
- if (mip->mi_bridge_link == NULL) { \
- MAC_RING_TX(mip, rhandle, mp, mp); \
- } else { \
- mp = mac_bridge_tx(mip, rhandle, mp); \
- } \
-}
-
/* mci_tx_flag */
#define MCI_TX_QUIESCE 0x1
@@ -726,6 +678,18 @@ typedef struct mac_client_impl_s mac_client_impl_t;
extern void mac_init(void);
extern int mac_fini(void);
+/*
+ * MAC packet/chain drop functions to aggregate all dropped-packet
+ * debugging to a single surface.
+ */
+/*PRINTFLIKE2*/
+extern void mac_drop_pkt(mblk_t *, const char *, ...)
+ __KPRINTFLIKE(2);
+
+/*PRINTFLIKE2*/
+extern void mac_drop_chain(mblk_t *, const char *, ...)
+ __KPRINTFLIKE(2);
+
extern void mac_ndd_ioctl(mac_impl_t *, queue_t *, mblk_t *);
extern boolean_t mac_ip_hdr_length_v6(ip6_t *, uint8_t *, uint16_t *,
uint8_t *, ip6_frag_t **);
@@ -839,7 +803,7 @@ extern void mac_flow_set_name(flow_entry_t *, const char *);
extern mblk_t *mac_add_vlan_tag(mblk_t *, uint_t, uint16_t);
extern mblk_t *mac_add_vlan_tag_chain(mblk_t *, uint_t, uint16_t);
extern mblk_t *mac_strip_vlan_tag_chain(mblk_t *);
-extern void mac_pkt_drop(void *, mac_resource_handle_t, mblk_t *, boolean_t);
+extern void mac_rx_def(void *, mac_resource_handle_t, mblk_t *, boolean_t);
extern mblk_t *mac_rx_flow(mac_handle_t, mac_resource_handle_t, mblk_t *);
extern void i_mac_share_alloc(mac_client_impl_t *);