Skip to content

Commit 0b849f5

Browse files
Vadim Lomovtsevdavem330
authored andcommitted
net: thunderx: add new messages for handle ndo_set_rx_mode callback
The kernel calls ndo_set_rx_mode() callback supplying it will all necessary info, such as device state flags, multicast mac addresses list and so on. Since we have only 128 bits to communicate with PF we need to initiate several requests to PF with small/short operation each based on input data. So this commit implements following PF messages codes along with new data structures for them: NIC_MBOX_MSG_RESET_XCAST to flush all filters configured for this particular network interface (VF) NIC_MBOX_MSG_ADD_MCAST to add new MAC address to DMAC filter registers for this particular network interface (VF) NIC_MBOX_MSG_SET_XCAST to apply filtering configuration to filter control register Signed-off-by: Vadim Lomovtsev <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ceb9ea2 commit 0b849f5

File tree

1 file changed

+12
-0
lines changed
  • drivers/net/ethernet/cavium/thunder

1 file changed

+12
-0
lines changed

drivers/net/ethernet/cavium/thunder/nic.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,9 @@ struct nicvf {
403403
#define NIC_MBOX_MSG_PTP_CFG 0x19 /* HW packet timestamp */
404404
#define NIC_MBOX_MSG_CFG_DONE 0xF0 /* VF configuration done */
405405
#define NIC_MBOX_MSG_SHUTDOWN 0xF1 /* VF is being shutdown */
406+
#define NIC_MBOX_MSG_RESET_XCAST 0xF2 /* Reset DCAM filtering mode */
407+
#define NIC_MBOX_MSG_ADD_MCAST 0xF3 /* Add MAC to DCAM filters */
408+
#define NIC_MBOX_MSG_SET_XCAST 0xF4 /* Set MCAST/BCAST RX mode */
406409

407410
struct nic_cfg_msg {
408411
u8 msg;
@@ -556,6 +559,14 @@ struct set_ptp {
556559
bool enable;
557560
};
558561

562+
struct xcast {
563+
u8 msg;
564+
union {
565+
u8 mode;
566+
u64 mac;
567+
} data;
568+
};
569+
559570
/* 128 bit shared memory between PF and each VF */
560571
union nic_mbx {
561572
struct { u8 msg; } msg;
@@ -576,6 +587,7 @@ union nic_mbx {
576587
struct reset_stat_cfg reset_stat;
577588
struct pfc pfc;
578589
struct set_ptp ptp;
590+
struct xcast xcast;
579591
};
580592

581593
#define NIC_NODE_ID_MASK 0x03

0 commit comments

Comments
 (0)