dsa.h (53110c67e3358f1b9a6f0f6997d3beef7832aa40) | dsa.h (c26933639b5402c174c65c01d33f145622784012) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * include/net/dsa.h - Driver for Distributed Switch Architecture switch chips 4 * Copyright (c) 2008-2009 Marvell Semiconductor 5 */ 6 7#ifndef __LINUX_NET_DSA_H 8#define __LINUX_NET_DSA_H --- 327 unchanged lines hidden (view full) --- 336 * so keep it stupid at the moment and list them all. 337 */ 338struct dsa_link { 339 struct dsa_port *dp; 340 struct dsa_port *link_dp; 341 struct list_head list; 342}; 343 | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * include/net/dsa.h - Driver for Distributed Switch Architecture switch chips 4 * Copyright (c) 2008-2009 Marvell Semiconductor 5 */ 6 7#ifndef __LINUX_NET_DSA_H 8#define __LINUX_NET_DSA_H --- 327 unchanged lines hidden (view full) --- 336 * so keep it stupid at the moment and list them all. 337 */ 338struct dsa_link { 339 struct dsa_port *dp; 340 struct dsa_port *link_dp; 341 struct list_head list; 342}; 343 |
344enum dsa_db_type { 345 DSA_DB_PORT, 346 DSA_DB_LAG, 347 DSA_DB_BRIDGE, 348}; 349 350struct dsa_db { 351 enum dsa_db_type type; 352 353 union { 354 const struct dsa_port *dp; 355 struct dsa_lag lag; 356 struct dsa_bridge bridge; 357 }; 358}; 359 |
|
344struct dsa_mac_addr { 345 unsigned char addr[ETH_ALEN]; 346 u16 vid; 347 refcount_t refcount; 348 struct list_head list; | 360struct dsa_mac_addr { 361 unsigned char addr[ETH_ALEN]; 362 u16 vid; 363 refcount_t refcount; 364 struct list_head list; |
365 struct dsa_db db; |
|
349}; 350 351struct dsa_vlan { 352 u16 vid; 353 refcount_t refcount; 354 struct list_head list; 355}; 356 --- 47 unchanged lines hidden (view full) --- 404 u32 vlan_filtering:1; 405 406 /* For switches that only have the MRU configurable. To ensure the 407 * configured MTU is not exceeded, normalization of MRU on all bridged 408 * interfaces is needed. 409 */ 410 u32 mtu_enforcement_ingress:1; 411 | 366}; 367 368struct dsa_vlan { 369 u16 vid; 370 refcount_t refcount; 371 struct list_head list; 372}; 373 --- 47 unchanged lines hidden (view full) --- 421 u32 vlan_filtering:1; 422 423 /* For switches that only have the MRU configurable. To ensure the 424 * configured MTU is not exceeded, normalization of MRU on all bridged 425 * interfaces is needed. 426 */ 427 u32 mtu_enforcement_ingress:1; 428 |
429 /* Drivers that isolate the FDBs of multiple bridges must set this 430 * to true to receive the bridge as an argument in .port_fdb_{add,del} 431 * and .port_mdb_{add,del}. Otherwise, the bridge.num will always be 432 * passed as zero. 433 */ 434 u32 fdb_isolation:1; 435 |
|
412 /* Listener for switch fabric events */ 413 struct notifier_block nb; 414 415 /* 416 * Give the switch driver somewhere to hang its private data 417 * structure. 418 */ 419 void *priv; --- 516 unchanged lines hidden (view full) --- 936 const struct switchdev_obj_port_vlan *vlan, 937 struct netlink_ext_ack *extack); 938 int (*port_vlan_del)(struct dsa_switch *ds, int port, 939 const struct switchdev_obj_port_vlan *vlan); 940 /* 941 * Forwarding database 942 */ 943 int (*port_fdb_add)(struct dsa_switch *ds, int port, | 436 /* Listener for switch fabric events */ 437 struct notifier_block nb; 438 439 /* 440 * Give the switch driver somewhere to hang its private data 441 * structure. 442 */ 443 void *priv; --- 516 unchanged lines hidden (view full) --- 960 const struct switchdev_obj_port_vlan *vlan, 961 struct netlink_ext_ack *extack); 962 int (*port_vlan_del)(struct dsa_switch *ds, int port, 963 const struct switchdev_obj_port_vlan *vlan); 964 /* 965 * Forwarding database 966 */ 967 int (*port_fdb_add)(struct dsa_switch *ds, int port, |
944 const unsigned char *addr, u16 vid); | 968 const unsigned char *addr, u16 vid, 969 struct dsa_db db); |
945 int (*port_fdb_del)(struct dsa_switch *ds, int port, | 970 int (*port_fdb_del)(struct dsa_switch *ds, int port, |
946 const unsigned char *addr, u16 vid); | 971 const unsigned char *addr, u16 vid, 972 struct dsa_db db); |
947 int (*port_fdb_dump)(struct dsa_switch *ds, int port, 948 dsa_fdb_dump_cb_t *cb, void *data); 949 int (*lag_fdb_add)(struct dsa_switch *ds, struct dsa_lag lag, | 973 int (*port_fdb_dump)(struct dsa_switch *ds, int port, 974 dsa_fdb_dump_cb_t *cb, void *data); 975 int (*lag_fdb_add)(struct dsa_switch *ds, struct dsa_lag lag, |
950 const unsigned char *addr, u16 vid); | 976 const unsigned char *addr, u16 vid, 977 struct dsa_db db); |
951 int (*lag_fdb_del)(struct dsa_switch *ds, struct dsa_lag lag, | 978 int (*lag_fdb_del)(struct dsa_switch *ds, struct dsa_lag lag, |
952 const unsigned char *addr, u16 vid); | 979 const unsigned char *addr, u16 vid, 980 struct dsa_db db); |
953 954 /* 955 * Multicast database 956 */ 957 int (*port_mdb_add)(struct dsa_switch *ds, int port, | 981 982 /* 983 * Multicast database 984 */ 985 int (*port_mdb_add)(struct dsa_switch *ds, int port, |
958 const struct switchdev_obj_port_mdb *mdb); | 986 const struct switchdev_obj_port_mdb *mdb, 987 struct dsa_db db); |
959 int (*port_mdb_del)(struct dsa_switch *ds, int port, | 988 int (*port_mdb_del)(struct dsa_switch *ds, int port, |
960 const struct switchdev_obj_port_mdb *mdb); | 989 const struct switchdev_obj_port_mdb *mdb, 990 struct dsa_db db); |
961 /* 962 * RXNFC 963 */ 964 int (*get_rxnfc)(struct dsa_switch *ds, int port, 965 struct ethtool_rxnfc *nfc, u32 *rule_locs); 966 int (*set_rxnfc)(struct dsa_switch *ds, int port, 967 struct ethtool_rxnfc *nfc); 968 --- 390 unchanged lines hidden --- | 991 /* 992 * RXNFC 993 */ 994 int (*get_rxnfc)(struct dsa_switch *ds, int port, 995 struct ethtool_rxnfc *nfc, u32 *rule_locs); 996 int (*set_rxnfc)(struct dsa_switch *ds, int port, 997 struct ethtool_rxnfc *nfc); 998 --- 390 unchanged lines hidden --- |