Merge tag 'net-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Current release - always broken: - net/smc: fix access to parent of an ib device - devlink: use _BITUL() macro instead of BIT() in the UAPI header - handful of mptcp fixes Previous release - regressions: - intel: AF_XDP: clear the status bits for the next_to_use descriptor - dpaa2-eth: fix the size of the mapped SGT buffer Previous release - always broken: - mptcp: fix security context on server socket - ethtool: fix string set id check - ethtool: fix error paths in ethnl_set_channels() - lan743x: fix rx_napi_poll/interrupt ping-pong - qca: ar9331: fix sleeping function called from invalid context bug" * tag 'net-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (32 commits) net/sched: sch_taprio: reset child qdiscs before freeing them nfp: move indirect block cleanup to flower app stop callback octeontx2-af: Fix undetected unmap PF error check net: nixge: fix spelling mistake in Kconfig: "Instuments" -> "Instruments" qlcnic: Fix error code in probe mptcp: fix pending data accounting mptcp: push pending frames when subflow has free space mptcp: properly annotate nested lock mptcp: fix security context on server socket net/mlx5: Fix compilation warning for 32-bit platform mptcp: clear use_ack and use_map when dropping other suboptions devlink: use _BITUL() macro instead of BIT() in the UAPI header net: korina: fix return value net/smc: fix access to parent of an ib device ethtool: fix error paths in ethnl_set_channels() nfc: s3fwrn5: Remove unused NCI prop commands nfc: s3fwrn5: Remove the delay for NFC sleep phy: fix kdoc warning tipc: do sanity check payload of a netlink message use __netdev_notify_peers in hyperv ...
This commit is contained in:
@@ -25,7 +25,7 @@ handling, etc... The Connector driver allows any kernelspace agents to use
|
|||||||
netlink based networking for inter-process communication in a significantly
|
netlink based networking for inter-process communication in a significantly
|
||||||
easier way::
|
easier way::
|
||||||
|
|
||||||
int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *));
|
int cn_add_callback(const struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *));
|
||||||
void cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask);
|
void cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask);
|
||||||
void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask);
|
void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask);
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
static struct cn_callback_entry *
|
static struct cn_callback_entry *
|
||||||
cn_queue_alloc_callback_entry(struct cn_queue_dev *dev, const char *name,
|
cn_queue_alloc_callback_entry(struct cn_queue_dev *dev, const char *name,
|
||||||
struct cb_id *id,
|
const struct cb_id *id,
|
||||||
void (*callback)(struct cn_msg *,
|
void (*callback)(struct cn_msg *,
|
||||||
struct netlink_skb_parms *))
|
struct netlink_skb_parms *))
|
||||||
{
|
{
|
||||||
@@ -51,13 +51,13 @@ void cn_queue_release_callback(struct cn_callback_entry *cbq)
|
|||||||
kfree(cbq);
|
kfree(cbq);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cn_cb_equal(struct cb_id *i1, struct cb_id *i2)
|
int cn_cb_equal(const struct cb_id *i1, const struct cb_id *i2)
|
||||||
{
|
{
|
||||||
return ((i1->idx == i2->idx) && (i1->val == i2->val));
|
return ((i1->idx == i2->idx) && (i1->val == i2->val));
|
||||||
}
|
}
|
||||||
|
|
||||||
int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
|
int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
|
||||||
struct cb_id *id,
|
const struct cb_id *id,
|
||||||
void (*callback)(struct cn_msg *,
|
void (*callback)(struct cn_msg *,
|
||||||
struct netlink_skb_parms *))
|
struct netlink_skb_parms *))
|
||||||
{
|
{
|
||||||
@@ -90,7 +90,7 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id)
|
void cn_queue_del_callback(struct cn_queue_dev *dev, const struct cb_id *id)
|
||||||
{
|
{
|
||||||
struct cn_callback_entry *cbq, *n;
|
struct cn_callback_entry *cbq, *n;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ static void cn_rx_skb(struct sk_buff *skb)
|
|||||||
*
|
*
|
||||||
* May sleep.
|
* May sleep.
|
||||||
*/
|
*/
|
||||||
int cn_add_callback(struct cb_id *id, const char *name,
|
int cn_add_callback(const struct cb_id *id, const char *name,
|
||||||
void (*callback)(struct cn_msg *,
|
void (*callback)(struct cn_msg *,
|
||||||
struct netlink_skb_parms *))
|
struct netlink_skb_parms *))
|
||||||
{
|
{
|
||||||
@@ -214,7 +214,7 @@ EXPORT_SYMBOL_GPL(cn_add_callback);
|
|||||||
*
|
*
|
||||||
* May sleep while waiting for reference counter to become zero.
|
* May sleep while waiting for reference counter to become zero.
|
||||||
*/
|
*/
|
||||||
void cn_del_callback(struct cb_id *id)
|
void cn_del_callback(const struct cb_id *id)
|
||||||
{
|
{
|
||||||
struct cn_dev *dev = &cdev;
|
struct cn_dev *dev = &cdev;
|
||||||
|
|
||||||
|
|||||||
@@ -159,6 +159,8 @@ struct ar9331_sw_priv {
|
|||||||
struct dsa_switch ds;
|
struct dsa_switch ds;
|
||||||
struct dsa_switch_ops ops;
|
struct dsa_switch_ops ops;
|
||||||
struct irq_domain *irqdomain;
|
struct irq_domain *irqdomain;
|
||||||
|
u32 irq_mask;
|
||||||
|
struct mutex lock_irq;
|
||||||
struct mii_bus *mbus; /* mdio master */
|
struct mii_bus *mbus; /* mdio master */
|
||||||
struct mii_bus *sbus; /* mdio slave */
|
struct mii_bus *sbus; /* mdio slave */
|
||||||
struct regmap *regmap;
|
struct regmap *regmap;
|
||||||
@@ -520,32 +522,44 @@ static irqreturn_t ar9331_sw_irq(int irq, void *data)
|
|||||||
static void ar9331_sw_mask_irq(struct irq_data *d)
|
static void ar9331_sw_mask_irq(struct irq_data *d)
|
||||||
{
|
{
|
||||||
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
|
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
|
||||||
struct regmap *regmap = priv->regmap;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = regmap_update_bits(regmap, AR9331_SW_REG_GINT_MASK,
|
priv->irq_mask = 0;
|
||||||
AR9331_SW_GINT_PHY_INT, 0);
|
|
||||||
if (ret)
|
|
||||||
dev_err(priv->dev, "could not mask IRQ\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ar9331_sw_unmask_irq(struct irq_data *d)
|
static void ar9331_sw_unmask_irq(struct irq_data *d)
|
||||||
|
{
|
||||||
|
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
|
||||||
|
|
||||||
|
priv->irq_mask = AR9331_SW_GINT_PHY_INT;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ar9331_sw_irq_bus_lock(struct irq_data *d)
|
||||||
|
{
|
||||||
|
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
|
||||||
|
|
||||||
|
mutex_lock(&priv->lock_irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ar9331_sw_irq_bus_sync_unlock(struct irq_data *d)
|
||||||
{
|
{
|
||||||
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
|
struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);
|
||||||
struct regmap *regmap = priv->regmap;
|
struct regmap *regmap = priv->regmap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = regmap_update_bits(regmap, AR9331_SW_REG_GINT_MASK,
|
ret = regmap_update_bits(regmap, AR9331_SW_REG_GINT_MASK,
|
||||||
AR9331_SW_GINT_PHY_INT,
|
AR9331_SW_GINT_PHY_INT, priv->irq_mask);
|
||||||
AR9331_SW_GINT_PHY_INT);
|
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err(priv->dev, "could not unmask IRQ\n");
|
dev_err(priv->dev, "failed to change IRQ mask\n");
|
||||||
|
|
||||||
|
mutex_unlock(&priv->lock_irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip ar9331_sw_irq_chip = {
|
static struct irq_chip ar9331_sw_irq_chip = {
|
||||||
.name = AR9331_SW_NAME,
|
.name = AR9331_SW_NAME,
|
||||||
.irq_mask = ar9331_sw_mask_irq,
|
.irq_mask = ar9331_sw_mask_irq,
|
||||||
.irq_unmask = ar9331_sw_unmask_irq,
|
.irq_unmask = ar9331_sw_unmask_irq,
|
||||||
|
.irq_bus_lock = ar9331_sw_irq_bus_lock,
|
||||||
|
.irq_bus_sync_unlock = ar9331_sw_irq_bus_sync_unlock,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ar9331_sw_irq_map(struct irq_domain *domain, unsigned int irq,
|
static int ar9331_sw_irq_map(struct irq_domain *domain, unsigned int irq,
|
||||||
@@ -584,6 +598,7 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *priv)
|
|||||||
return irq ? irq : -EINVAL;
|
return irq ? irq : -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutex_init(&priv->lock_irq);
|
||||||
ret = devm_request_threaded_irq(dev, irq, NULL, ar9331_sw_irq,
|
ret = devm_request_threaded_irq(dev, irq, NULL, ar9331_sw_irq,
|
||||||
IRQF_ONESHOT, AR9331_SW_NAME, priv);
|
IRQF_ONESHOT, AR9331_SW_NAME, priv);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|||||||
@@ -828,13 +828,13 @@ static int emac_probe(struct platform_device *pdev)
|
|||||||
db->clk = devm_clk_get(&pdev->dev, NULL);
|
db->clk = devm_clk_get(&pdev->dev, NULL);
|
||||||
if (IS_ERR(db->clk)) {
|
if (IS_ERR(db->clk)) {
|
||||||
ret = PTR_ERR(db->clk);
|
ret = PTR_ERR(db->clk);
|
||||||
goto out_iounmap;
|
goto out_dispose_mapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = clk_prepare_enable(db->clk);
|
ret = clk_prepare_enable(db->clk);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "Error couldn't enable clock (%d)\n", ret);
|
dev_err(&pdev->dev, "Error couldn't enable clock (%d)\n", ret);
|
||||||
goto out_iounmap;
|
goto out_dispose_mapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sunxi_sram_claim(&pdev->dev);
|
ret = sunxi_sram_claim(&pdev->dev);
|
||||||
@@ -893,6 +893,8 @@ out_release_sram:
|
|||||||
sunxi_sram_release(&pdev->dev);
|
sunxi_sram_release(&pdev->dev);
|
||||||
out_clk_disable_unprepare:
|
out_clk_disable_unprepare:
|
||||||
clk_disable_unprepare(db->clk);
|
clk_disable_unprepare(db->clk);
|
||||||
|
out_dispose_mapping:
|
||||||
|
irq_dispose_mapping(ndev->irq);
|
||||||
out_iounmap:
|
out_iounmap:
|
||||||
iounmap(db->membase);
|
iounmap(db->membase);
|
||||||
out:
|
out:
|
||||||
@@ -911,6 +913,7 @@ static int emac_remove(struct platform_device *pdev)
|
|||||||
unregister_netdev(ndev);
|
unregister_netdev(ndev);
|
||||||
sunxi_sram_release(&pdev->dev);
|
sunxi_sram_release(&pdev->dev);
|
||||||
clk_disable_unprepare(db->clk);
|
clk_disable_unprepare(db->clk);
|
||||||
|
irq_dispose_mapping(ndev->irq);
|
||||||
iounmap(db->membase);
|
iounmap(db->membase);
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
|
|
||||||
|
|||||||
@@ -4069,8 +4069,10 @@ static int bcmgenet_probe(struct platform_device *pdev)
|
|||||||
clk_disable_unprepare(priv->clk);
|
clk_disable_unprepare(priv->clk);
|
||||||
|
|
||||||
err = register_netdev(dev);
|
err = register_netdev(dev);
|
||||||
if (err)
|
if (err) {
|
||||||
|
bcmgenet_mii_exit(dev);
|
||||||
goto err;
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|||||||
@@ -878,7 +878,7 @@ static int dpaa2_eth_build_sg_fd_single_buf(struct dpaa2_eth_priv *priv,
|
|||||||
swa = (struct dpaa2_eth_swa *)sgt_buf;
|
swa = (struct dpaa2_eth_swa *)sgt_buf;
|
||||||
swa->type = DPAA2_ETH_SWA_SINGLE;
|
swa->type = DPAA2_ETH_SWA_SINGLE;
|
||||||
swa->single.skb = skb;
|
swa->single.skb = skb;
|
||||||
swa->sg.sgt_size = sgt_buf_size;
|
swa->single.sgt_size = sgt_buf_size;
|
||||||
|
|
||||||
/* Separately map the SGT buffer */
|
/* Separately map the SGT buffer */
|
||||||
sgt_addr = dma_map_single(dev, sgt_buf, sgt_buf_size, DMA_BIDIRECTIONAL);
|
sgt_addr = dma_map_single(dev, sgt_buf, sgt_buf_size, DMA_BIDIRECTIONAL);
|
||||||
|
|||||||
@@ -2171,10 +2171,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
|||||||
napi_schedule(&adapter->napi[i]);
|
napi_schedule(&adapter->napi[i]);
|
||||||
|
|
||||||
if (adapter->reset_reason == VNIC_RESET_FAILOVER ||
|
if (adapter->reset_reason == VNIC_RESET_FAILOVER ||
|
||||||
adapter->reset_reason == VNIC_RESET_MOBILITY) {
|
adapter->reset_reason == VNIC_RESET_MOBILITY)
|
||||||
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
|
__netdev_notify_peers(netdev);
|
||||||
call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
|
||||||
@@ -2249,8 +2247,7 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
|
__netdev_notify_peers(netdev);
|
||||||
call_netdevice_notifiers(NETDEV_RESEND_IGMP, netdev);
|
|
||||||
out:
|
out:
|
||||||
/* restore adapter state if reset failed */
|
/* restore adapter state if reset failed */
|
||||||
if (rc)
|
if (rc)
|
||||||
|
|||||||
@@ -220,8 +220,11 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count)
|
|||||||
} while (count);
|
} while (count);
|
||||||
|
|
||||||
no_buffers:
|
no_buffers:
|
||||||
if (rx_ring->next_to_use != ntu)
|
if (rx_ring->next_to_use != ntu) {
|
||||||
|
/* clear the status bits for the next_to_use descriptor */
|
||||||
|
rx_desc->wb.qword1.status_error_len = 0;
|
||||||
i40e_release_rx_desc(rx_ring, ntu);
|
i40e_release_rx_desc(rx_ring, ntu);
|
||||||
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -446,8 +446,11 @@ bool ice_alloc_rx_bufs_zc(struct ice_ring *rx_ring, u16 count)
|
|||||||
}
|
}
|
||||||
} while (--count);
|
} while (--count);
|
||||||
|
|
||||||
if (rx_ring->next_to_use != ntu)
|
if (rx_ring->next_to_use != ntu) {
|
||||||
|
/* clear the status bits for the next_to_use descriptor */
|
||||||
|
rx_desc->wb.status_error0 = 0;
|
||||||
ice_release_rx_desc(rx_ring, ntu);
|
ice_release_rx_desc(rx_ring, ntu);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ static int korina_send_packet(struct sk_buff *skb, struct net_device *dev)
|
|||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
spin_unlock_irqrestore(&lp->lock, flags);
|
spin_unlock_irqrestore(&lp->lock, flags);
|
||||||
|
|
||||||
return NETDEV_TX_BUSY;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -275,7 +275,8 @@ static int rvu_npa_report_show(struct devlink_fmsg *fmsg, void *ctx,
|
|||||||
enum npa_af_rvu_health health_reporter)
|
enum npa_af_rvu_health health_reporter)
|
||||||
{
|
{
|
||||||
struct rvu_npa_event_ctx *npa_event_context;
|
struct rvu_npa_event_ctx *npa_event_context;
|
||||||
unsigned int intr_val, alloc_dis, free_dis;
|
unsigned int alloc_dis, free_dis;
|
||||||
|
u64 intr_val;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
npa_event_context = ctx;
|
npa_event_context = ctx;
|
||||||
|
|||||||
@@ -1935,6 +1935,14 @@ static struct sk_buff *lan743x_rx_allocate_skb(struct lan743x_rx *rx)
|
|||||||
length, GFP_ATOMIC | GFP_DMA);
|
length, GFP_ATOMIC | GFP_DMA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void lan743x_rx_update_tail(struct lan743x_rx *rx, int index)
|
||||||
|
{
|
||||||
|
/* update the tail once per 8 descriptors */
|
||||||
|
if ((index & 7) == 7)
|
||||||
|
lan743x_csr_write(rx->adapter, RX_TAIL(rx->channel_number),
|
||||||
|
index);
|
||||||
|
}
|
||||||
|
|
||||||
static int lan743x_rx_init_ring_element(struct lan743x_rx *rx, int index,
|
static int lan743x_rx_init_ring_element(struct lan743x_rx *rx, int index,
|
||||||
struct sk_buff *skb)
|
struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
@@ -1965,6 +1973,7 @@ static int lan743x_rx_init_ring_element(struct lan743x_rx *rx, int index,
|
|||||||
descriptor->data0 = (RX_DESC_DATA0_OWN_ |
|
descriptor->data0 = (RX_DESC_DATA0_OWN_ |
|
||||||
(length & RX_DESC_DATA0_BUF_LENGTH_MASK_));
|
(length & RX_DESC_DATA0_BUF_LENGTH_MASK_));
|
||||||
skb_reserve(buffer_info->skb, RX_HEAD_PADDING);
|
skb_reserve(buffer_info->skb, RX_HEAD_PADDING);
|
||||||
|
lan743x_rx_update_tail(rx, index);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1983,6 +1992,7 @@ static void lan743x_rx_reuse_ring_element(struct lan743x_rx *rx, int index)
|
|||||||
descriptor->data0 = (RX_DESC_DATA0_OWN_ |
|
descriptor->data0 = (RX_DESC_DATA0_OWN_ |
|
||||||
((buffer_info->buffer_length) &
|
((buffer_info->buffer_length) &
|
||||||
RX_DESC_DATA0_BUF_LENGTH_MASK_));
|
RX_DESC_DATA0_BUF_LENGTH_MASK_));
|
||||||
|
lan743x_rx_update_tail(rx, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lan743x_rx_release_ring_element(struct lan743x_rx *rx, int index)
|
static void lan743x_rx_release_ring_element(struct lan743x_rx *rx, int index)
|
||||||
@@ -2193,6 +2203,7 @@ static int lan743x_rx_napi_poll(struct napi_struct *napi, int weight)
|
|||||||
{
|
{
|
||||||
struct lan743x_rx *rx = container_of(napi, struct lan743x_rx, napi);
|
struct lan743x_rx *rx = container_of(napi, struct lan743x_rx, napi);
|
||||||
struct lan743x_adapter *adapter = rx->adapter;
|
struct lan743x_adapter *adapter = rx->adapter;
|
||||||
|
int result = RX_PROCESS_RESULT_NOTHING_TO_DO;
|
||||||
u32 rx_tail_flags = 0;
|
u32 rx_tail_flags = 0;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
@@ -2201,27 +2212,19 @@ static int lan743x_rx_napi_poll(struct napi_struct *napi, int weight)
|
|||||||
lan743x_csr_write(adapter, DMAC_INT_STS,
|
lan743x_csr_write(adapter, DMAC_INT_STS,
|
||||||
DMAC_INT_BIT_RXFRM_(rx->channel_number));
|
DMAC_INT_BIT_RXFRM_(rx->channel_number));
|
||||||
}
|
}
|
||||||
count = 0;
|
for (count = 0; count < weight; count++) {
|
||||||
while (count < weight) {
|
result = lan743x_rx_process_packet(rx);
|
||||||
int rx_process_result = lan743x_rx_process_packet(rx);
|
if (result == RX_PROCESS_RESULT_NOTHING_TO_DO)
|
||||||
|
|
||||||
if (rx_process_result == RX_PROCESS_RESULT_PACKET_RECEIVED) {
|
|
||||||
count++;
|
|
||||||
} else if (rx_process_result ==
|
|
||||||
RX_PROCESS_RESULT_NOTHING_TO_DO) {
|
|
||||||
break;
|
break;
|
||||||
} else if (rx_process_result ==
|
|
||||||
RX_PROCESS_RESULT_PACKET_DROPPED) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
rx->frame_count += count;
|
rx->frame_count += count;
|
||||||
if (count == weight)
|
if (count == weight || result == RX_PROCESS_RESULT_PACKET_RECEIVED)
|
||||||
goto done;
|
return weight;
|
||||||
|
|
||||||
if (!napi_complete_done(napi, count))
|
if (!napi_complete_done(napi, count))
|
||||||
goto done;
|
return count;
|
||||||
|
|
||||||
|
/* re-arm interrupts, must write to rx tail on some chip variants */
|
||||||
if (rx->vector_flags & LAN743X_VECTOR_FLAG_VECTOR_ENABLE_AUTO_SET)
|
if (rx->vector_flags & LAN743X_VECTOR_FLAG_VECTOR_ENABLE_AUTO_SET)
|
||||||
rx_tail_flags |= RX_TAIL_SET_TOP_INT_VEC_EN_;
|
rx_tail_flags |= RX_TAIL_SET_TOP_INT_VEC_EN_;
|
||||||
if (rx->vector_flags & LAN743X_VECTOR_FLAG_SOURCE_ENABLE_AUTO_SET) {
|
if (rx->vector_flags & LAN743X_VECTOR_FLAG_SOURCE_ENABLE_AUTO_SET) {
|
||||||
@@ -2231,10 +2234,10 @@ static int lan743x_rx_napi_poll(struct napi_struct *napi, int weight)
|
|||||||
INT_BIT_DMA_RX_(rx->channel_number));
|
INT_BIT_DMA_RX_(rx->channel_number));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update RX_TAIL */
|
if (rx_tail_flags)
|
||||||
lan743x_csr_write(adapter, RX_TAIL(rx->channel_number),
|
lan743x_csr_write(adapter, RX_TAIL(rx->channel_number),
|
||||||
rx_tail_flags | rx->last_tail);
|
rx_tail_flags | rx->last_tail);
|
||||||
done:
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2378,7 +2381,7 @@ static int lan743x_rx_open(struct lan743x_rx *rx)
|
|||||||
|
|
||||||
netif_napi_add(adapter->netdev,
|
netif_napi_add(adapter->netdev,
|
||||||
&rx->napi, lan743x_rx_napi_poll,
|
&rx->napi, lan743x_rx_napi_poll,
|
||||||
rx->ring_size - 1);
|
NAPI_POLL_WEIGHT);
|
||||||
|
|
||||||
lan743x_csr_write(adapter, DMAC_CMD,
|
lan743x_csr_write(adapter, DMAC_CMD,
|
||||||
DMAC_CMD_RX_SWR_(rx->channel_number));
|
DMAC_CMD_RX_SWR_(rx->channel_number));
|
||||||
|
|||||||
@@ -1267,7 +1267,7 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
err = mscc_ocelot_init_ports(pdev, ports);
|
err = mscc_ocelot_init_ports(pdev, ports);
|
||||||
if (err)
|
if (err)
|
||||||
goto out_put_ports;
|
goto out_ocelot_deinit;
|
||||||
|
|
||||||
if (ocelot->ptp) {
|
if (ocelot->ptp) {
|
||||||
err = ocelot_init_timestamp(ocelot, &ocelot_ptp_clock_info);
|
err = ocelot_init_timestamp(ocelot, &ocelot_ptp_clock_info);
|
||||||
@@ -1282,8 +1282,14 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
|
|||||||
register_switchdev_notifier(&ocelot_switchdev_nb);
|
register_switchdev_notifier(&ocelot_switchdev_nb);
|
||||||
register_switchdev_blocking_notifier(&ocelot_switchdev_blocking_nb);
|
register_switchdev_blocking_notifier(&ocelot_switchdev_blocking_nb);
|
||||||
|
|
||||||
|
of_node_put(ports);
|
||||||
|
|
||||||
dev_info(&pdev->dev, "Ocelot switch probed\n");
|
dev_info(&pdev->dev, "Ocelot switch probed\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
out_ocelot_deinit:
|
||||||
|
ocelot_deinit(ocelot);
|
||||||
out_put_ports:
|
out_put_ports:
|
||||||
of_node_put(ports);
|
of_node_put(ports);
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -860,9 +860,6 @@ static void nfp_flower_clean(struct nfp_app *app)
|
|||||||
skb_queue_purge(&app_priv->cmsg_skbs_low);
|
skb_queue_purge(&app_priv->cmsg_skbs_low);
|
||||||
flush_work(&app_priv->cmsg_work);
|
flush_work(&app_priv->cmsg_work);
|
||||||
|
|
||||||
flow_indr_dev_unregister(nfp_flower_indr_setup_tc_cb, app,
|
|
||||||
nfp_flower_setup_indr_tc_release);
|
|
||||||
|
|
||||||
if (app_priv->flower_ext_feats & NFP_FL_FEATS_VF_RLIM)
|
if (app_priv->flower_ext_feats & NFP_FL_FEATS_VF_RLIM)
|
||||||
nfp_flower_qos_cleanup(app);
|
nfp_flower_qos_cleanup(app);
|
||||||
|
|
||||||
@@ -951,6 +948,9 @@ static int nfp_flower_start(struct nfp_app *app)
|
|||||||
static void nfp_flower_stop(struct nfp_app *app)
|
static void nfp_flower_stop(struct nfp_app *app)
|
||||||
{
|
{
|
||||||
nfp_tunnel_config_stop(app);
|
nfp_tunnel_config_stop(app);
|
||||||
|
|
||||||
|
flow_indr_dev_unregister(nfp_flower_indr_setup_tc_cb, app,
|
||||||
|
nfp_flower_setup_indr_tc_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
#
|
#
|
||||||
# National Instuments network device configuration
|
# National Instruments network device configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
config NET_VENDOR_NI
|
config NET_VENDOR_NI
|
||||||
|
|||||||
@@ -2492,6 +2492,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
qlcnic_sriov_vf_register_map(ahw);
|
qlcnic_sriov_vf_register_map(ahw);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
err = -EINVAL;
|
||||||
goto err_out_free_hw_res;
|
goto err_out_free_hw_res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2050,11 +2050,11 @@ static void netvsc_link_change(struct work_struct *w)
|
|||||||
container_of(w, struct net_device_context, dwork.work);
|
container_of(w, struct net_device_context, dwork.work);
|
||||||
struct hv_device *device_obj = ndev_ctx->device_ctx;
|
struct hv_device *device_obj = ndev_ctx->device_ctx;
|
||||||
struct net_device *net = hv_get_drvdata(device_obj);
|
struct net_device *net = hv_get_drvdata(device_obj);
|
||||||
|
unsigned long flags, next_reconfig, delay;
|
||||||
|
struct netvsc_reconfig *event = NULL;
|
||||||
struct netvsc_device *net_device;
|
struct netvsc_device *net_device;
|
||||||
struct rndis_device *rdev;
|
struct rndis_device *rdev;
|
||||||
struct netvsc_reconfig *event = NULL;
|
bool reschedule = false;
|
||||||
bool notify = false, reschedule = false;
|
|
||||||
unsigned long flags, next_reconfig, delay;
|
|
||||||
|
|
||||||
/* if changes are happening, comeback later */
|
/* if changes are happening, comeback later */
|
||||||
if (!rtnl_trylock()) {
|
if (!rtnl_trylock()) {
|
||||||
@@ -2103,7 +2103,7 @@ static void netvsc_link_change(struct work_struct *w)
|
|||||||
netif_carrier_on(net);
|
netif_carrier_on(net);
|
||||||
netvsc_tx_enable(net_device, net);
|
netvsc_tx_enable(net_device, net);
|
||||||
} else {
|
} else {
|
||||||
notify = true;
|
__netdev_notify_peers(net);
|
||||||
}
|
}
|
||||||
kfree(event);
|
kfree(event);
|
||||||
break;
|
break;
|
||||||
@@ -2132,9 +2132,6 @@ static void netvsc_link_change(struct work_struct *w)
|
|||||||
|
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
|
|
||||||
if (notify)
|
|
||||||
netdev_notify_peers(net);
|
|
||||||
|
|
||||||
/* link_watch only sends one notification with current state per
|
/* link_watch only sends one notification with current state per
|
||||||
* second, handle next reconfig event in 2 seconds.
|
* second, handle next reconfig event in 2 seconds.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,31 +21,11 @@ static int s3fwrn5_nci_prop_rsp(struct nci_dev *ndev, struct sk_buff *skb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct nci_driver_ops s3fwrn5_nci_prop_ops[] = {
|
static struct nci_driver_ops s3fwrn5_nci_prop_ops[] = {
|
||||||
{
|
|
||||||
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
|
||||||
NCI_PROP_AGAIN),
|
|
||||||
.rsp = s3fwrn5_nci_prop_rsp,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
|
||||||
NCI_PROP_GET_RFREG),
|
|
||||||
.rsp = s3fwrn5_nci_prop_rsp,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
||||||
NCI_PROP_SET_RFREG),
|
NCI_PROP_SET_RFREG),
|
||||||
.rsp = s3fwrn5_nci_prop_rsp,
|
.rsp = s3fwrn5_nci_prop_rsp,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
|
||||||
NCI_PROP_GET_RFREG_VER),
|
|
||||||
.rsp = s3fwrn5_nci_prop_rsp,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
|
||||||
NCI_PROP_SET_RFREG_VER),
|
|
||||||
.rsp = s3fwrn5_nci_prop_rsp,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
||||||
NCI_PROP_START_RFREG),
|
NCI_PROP_START_RFREG),
|
||||||
@@ -61,11 +41,6 @@ static struct nci_driver_ops s3fwrn5_nci_prop_ops[] = {
|
|||||||
NCI_PROP_FW_CFG),
|
NCI_PROP_FW_CFG),
|
||||||
.rsp = s3fwrn5_nci_prop_rsp,
|
.rsp = s3fwrn5_nci_prop_rsp,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
|
|
||||||
NCI_PROP_WR_RESET),
|
|
||||||
.rsp = s3fwrn5_nci_prop_rsp,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n)
|
void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n)
|
||||||
|
|||||||
@@ -11,9 +11,6 @@
|
|||||||
|
|
||||||
#include "s3fwrn5.h"
|
#include "s3fwrn5.h"
|
||||||
|
|
||||||
#define NCI_PROP_AGAIN 0x01
|
|
||||||
|
|
||||||
#define NCI_PROP_GET_RFREG 0x21
|
|
||||||
#define NCI_PROP_SET_RFREG 0x22
|
#define NCI_PROP_SET_RFREG 0x22
|
||||||
|
|
||||||
struct nci_prop_set_rfreg_cmd {
|
struct nci_prop_set_rfreg_cmd {
|
||||||
@@ -25,23 +22,6 @@ struct nci_prop_set_rfreg_rsp {
|
|||||||
__u8 status;
|
__u8 status;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NCI_PROP_GET_RFREG_VER 0x24
|
|
||||||
|
|
||||||
struct nci_prop_get_rfreg_ver_rsp {
|
|
||||||
__u8 status;
|
|
||||||
__u8 data[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
#define NCI_PROP_SET_RFREG_VER 0x25
|
|
||||||
|
|
||||||
struct nci_prop_set_rfreg_ver_cmd {
|
|
||||||
__u8 data[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct nci_prop_set_rfreg_ver_rsp {
|
|
||||||
__u8 status;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define NCI_PROP_START_RFREG 0x26
|
#define NCI_PROP_START_RFREG 0x26
|
||||||
|
|
||||||
struct nci_prop_start_rfreg_rsp {
|
struct nci_prop_start_rfreg_rsp {
|
||||||
@@ -70,8 +50,6 @@ struct nci_prop_fw_cfg_rsp {
|
|||||||
__u8 status;
|
__u8 status;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NCI_PROP_WR_RESET 0x2f
|
|
||||||
|
|
||||||
void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n);
|
void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n);
|
||||||
int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name);
|
int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ void s3fwrn5_phy_set_wake(void *phy_id, bool wake)
|
|||||||
|
|
||||||
mutex_lock(&phy->mutex);
|
mutex_lock(&phy->mutex);
|
||||||
gpio_set_value(phy->gpio_fw_wake, wake);
|
gpio_set_value(phy->gpio_fw_wake, wake);
|
||||||
msleep(S3FWRN5_EN_WAIT_TIME);
|
if (wake)
|
||||||
|
msleep(S3FWRN5_EN_WAIT_TIME);
|
||||||
mutex_unlock(&phy->mutex);
|
mutex_unlock(&phy->mutex);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(s3fwrn5_phy_set_wake);
|
EXPORT_SYMBOL(s3fwrn5_phy_set_wake);
|
||||||
|
|||||||
@@ -64,14 +64,14 @@ struct cn_dev {
|
|||||||
* @callback: connector's callback.
|
* @callback: connector's callback.
|
||||||
* parameters are %cn_msg and the sender's credentials
|
* parameters are %cn_msg and the sender's credentials
|
||||||
*/
|
*/
|
||||||
int cn_add_callback(struct cb_id *id, const char *name,
|
int cn_add_callback(const struct cb_id *id, const char *name,
|
||||||
void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
|
void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
|
||||||
/**
|
/**
|
||||||
* cn_del_callback() - Unregisters new callback with connector core.
|
* cn_del_callback() - Unregisters new callback with connector core.
|
||||||
*
|
*
|
||||||
* @id: unique connector's user identifier.
|
* @id: unique connector's user identifier.
|
||||||
*/
|
*/
|
||||||
void cn_del_callback(struct cb_id *id);
|
void cn_del_callback(const struct cb_id *id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -122,14 +122,14 @@ int cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid, u32 group, gfp
|
|||||||
int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 group, gfp_t gfp_mask);
|
int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 group, gfp_t gfp_mask);
|
||||||
|
|
||||||
int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
|
int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
|
||||||
struct cb_id *id,
|
const struct cb_id *id,
|
||||||
void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
|
void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
|
||||||
void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
|
void cn_queue_del_callback(struct cn_queue_dev *dev, const struct cb_id *id);
|
||||||
void cn_queue_release_callback(struct cn_callback_entry *);
|
void cn_queue_release_callback(struct cn_callback_entry *);
|
||||||
|
|
||||||
struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *);
|
struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *);
|
||||||
void cn_queue_free_dev(struct cn_queue_dev *dev);
|
void cn_queue_free_dev(struct cn_queue_dev *dev);
|
||||||
|
|
||||||
int cn_cb_equal(struct cb_id *, struct cb_id *);
|
int cn_cb_equal(const struct cb_id *, const struct cb_id *);
|
||||||
|
|
||||||
#endif /* __CONNECTOR_H */
|
#endif /* __CONNECTOR_H */
|
||||||
|
|||||||
@@ -10711,9 +10711,9 @@ struct mlx5_ifc_affiliated_event_header_bits {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT(0xc),
|
MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT_ULL(0xc),
|
||||||
MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_IPSEC = BIT(0x13),
|
MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_IPSEC = BIT_ULL(0x13),
|
||||||
MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_SAMPLER = BIT(0x20),
|
MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_SAMPLER = BIT_ULL(0x20),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|||||||
@@ -4547,6 +4547,7 @@ void __dev_set_rx_mode(struct net_device *dev);
|
|||||||
int dev_set_promiscuity(struct net_device *dev, int inc);
|
int dev_set_promiscuity(struct net_device *dev, int inc);
|
||||||
int dev_set_allmulti(struct net_device *dev, int inc);
|
int dev_set_allmulti(struct net_device *dev, int inc);
|
||||||
void netdev_state_change(struct net_device *dev);
|
void netdev_state_change(struct net_device *dev);
|
||||||
|
void __netdev_notify_peers(struct net_device *dev);
|
||||||
void netdev_notify_peers(struct net_device *dev);
|
void netdev_notify_peers(struct net_device *dev);
|
||||||
void netdev_features_change(struct net_device *dev);
|
void netdev_features_change(struct net_device *dev);
|
||||||
/* Load a device via the kmod */
|
/* Load a device via the kmod */
|
||||||
|
|||||||
@@ -743,7 +743,8 @@ struct phy_driver {
|
|||||||
/** @read_status: Determines the negotiated speed and duplex */
|
/** @read_status: Determines the negotiated speed and duplex */
|
||||||
int (*read_status)(struct phy_device *phydev);
|
int (*read_status)(struct phy_device *phydev);
|
||||||
|
|
||||||
/** @config_intr: Enables or disables interrupts.
|
/**
|
||||||
|
* @config_intr: Enables or disables interrupts.
|
||||||
* It should also clear any pending interrupts prior to enabling the
|
* It should also clear any pending interrupts prior to enabling the
|
||||||
* IRQs and after disabling them.
|
* IRQs and after disabling them.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ enum devlink_reload_limit {
|
|||||||
DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1
|
DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEVLINK_RELOAD_LIMITS_VALID_MASK (BIT(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
|
#define DEVLINK_RELOAD_LIMITS_VALID_MASK (_BITUL(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
|
||||||
|
|
||||||
enum devlink_attr {
|
enum devlink_attr {
|
||||||
/* don't change the order or add anything between, this is ABI! */
|
/* don't change the order or add anything between, this is ABI! */
|
||||||
|
|||||||
@@ -1456,6 +1456,25 @@ void netdev_state_change(struct net_device *dev)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(netdev_state_change);
|
EXPORT_SYMBOL(netdev_state_change);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __netdev_notify_peers - notify network peers about existence of @dev,
|
||||||
|
* to be called when rtnl lock is already held.
|
||||||
|
* @dev: network device
|
||||||
|
*
|
||||||
|
* Generate traffic such that interested network peers are aware of
|
||||||
|
* @dev, such as by generating a gratuitous ARP. This may be used when
|
||||||
|
* a device wants to inform the rest of the network about some sort of
|
||||||
|
* reconfiguration such as a failover event or virtual machine
|
||||||
|
* migration.
|
||||||
|
*/
|
||||||
|
void __netdev_notify_peers(struct net_device *dev)
|
||||||
|
{
|
||||||
|
ASSERT_RTNL();
|
||||||
|
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev);
|
||||||
|
call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(__netdev_notify_peers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* netdev_notify_peers - notify network peers about existence of @dev
|
* netdev_notify_peers - notify network peers about existence of @dev
|
||||||
* @dev: network device
|
* @dev: network device
|
||||||
@@ -1469,8 +1488,7 @@ EXPORT_SYMBOL(netdev_state_change);
|
|||||||
void netdev_notify_peers(struct net_device *dev)
|
void netdev_notify_peers(struct net_device *dev)
|
||||||
{
|
{
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev);
|
__netdev_notify_peers(dev);
|
||||||
call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev);
|
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(netdev_notify_peers);
|
EXPORT_SYMBOL(netdev_notify_peers);
|
||||||
|
|||||||
@@ -194,8 +194,9 @@ int ethnl_set_channels(struct sk_buff *skb, struct genl_info *info)
|
|||||||
if (netif_is_rxfh_configured(dev) &&
|
if (netif_is_rxfh_configured(dev) &&
|
||||||
!ethtool_get_max_rxfh_channel(dev, &max_rx_in_use) &&
|
!ethtool_get_max_rxfh_channel(dev, &max_rx_in_use) &&
|
||||||
(channels.combined_count + channels.rx_count) <= max_rx_in_use) {
|
(channels.combined_count + channels.rx_count) <= max_rx_in_use) {
|
||||||
|
ret = -EINVAL;
|
||||||
GENL_SET_ERR_MSG(info, "requested channel counts are too low for existing indirection table settings");
|
GENL_SET_ERR_MSG(info, "requested channel counts are too low for existing indirection table settings");
|
||||||
return -EINVAL;
|
goto out_ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disabling channels, query zero-copy AF_XDP sockets */
|
/* Disabling channels, query zero-copy AF_XDP sockets */
|
||||||
@@ -203,8 +204,9 @@ int ethnl_set_channels(struct sk_buff *skb, struct genl_info *info)
|
|||||||
min(channels.rx_count, channels.tx_count);
|
min(channels.rx_count, channels.tx_count);
|
||||||
for (i = from_channel; i < old_total; i++)
|
for (i = from_channel; i < old_total; i++)
|
||||||
if (xsk_get_pool_from_qid(dev, i)) {
|
if (xsk_get_pool_from_qid(dev, i)) {
|
||||||
|
ret = -EINVAL;
|
||||||
GENL_SET_ERR_MSG(info, "requested channel counts are too low for existing zerocopy AF_XDP sockets");
|
GENL_SET_ERR_MSG(info, "requested channel counts are too low for existing zerocopy AF_XDP sockets");
|
||||||
return -EINVAL;
|
goto out_ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = dev->ethtool_ops->set_channels(dev, &channels);
|
ret = dev->ethtool_ops->set_channels(dev, &channels);
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ static int strset_parse_request(struct ethnl_req_info *req_base,
|
|||||||
ret = strset_get_id(attr, &id, extack);
|
ret = strset_get_id(attr, &id, extack);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if (ret >= ETH_SS_COUNT) {
|
if (id >= ETH_SS_COUNT) {
|
||||||
NL_SET_ERR_MSG_ATTR(extack, attr,
|
NL_SET_ERR_MSG_ATTR(extack, attr,
|
||||||
"unknown string set id");
|
"unknown string set id");
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|||||||
@@ -606,6 +606,8 @@ static bool mptcp_established_options_add_addr(struct sock *sk, struct sk_buff *
|
|||||||
skb && skb_is_tcp_pure_ack(skb)) {
|
skb && skb_is_tcp_pure_ack(skb)) {
|
||||||
pr_debug("drop other suboptions");
|
pr_debug("drop other suboptions");
|
||||||
opts->suboptions = 0;
|
opts->suboptions = 0;
|
||||||
|
opts->ext_copy.use_ack = 0;
|
||||||
|
opts->ext_copy.use_map = 0;
|
||||||
remaining += opt_size;
|
remaining += opt_size;
|
||||||
drop_other_suboptions = true;
|
drop_other_suboptions = true;
|
||||||
}
|
}
|
||||||
@@ -873,10 +875,13 @@ static void ack_update_msk(struct mptcp_sock *msk,
|
|||||||
|
|
||||||
new_wnd_end = new_snd_una + tcp_sk(ssk)->snd_wnd;
|
new_wnd_end = new_snd_una + tcp_sk(ssk)->snd_wnd;
|
||||||
|
|
||||||
if (after64(new_wnd_end, msk->wnd_end)) {
|
if (after64(new_wnd_end, msk->wnd_end))
|
||||||
msk->wnd_end = new_wnd_end;
|
msk->wnd_end = new_wnd_end;
|
||||||
__mptcp_wnd_updated(sk, ssk);
|
|
||||||
}
|
/* this assumes mptcp_incoming_options() is invoked after tcp_ack() */
|
||||||
|
if (after64(msk->wnd_end, READ_ONCE(msk->snd_nxt)) &&
|
||||||
|
sk_stream_memory_free(ssk))
|
||||||
|
__mptcp_check_push(sk, ssk);
|
||||||
|
|
||||||
if (after64(new_snd_una, old_snd_una)) {
|
if (after64(new_snd_una, old_snd_una)) {
|
||||||
msk->snd_una = new_snd_una;
|
msk->snd_una = new_snd_una;
|
||||||
@@ -942,8 +947,8 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
|
|||||||
* helpers are cheap.
|
* helpers are cheap.
|
||||||
*/
|
*/
|
||||||
mptcp_data_lock(subflow->conn);
|
mptcp_data_lock(subflow->conn);
|
||||||
if (mptcp_send_head(subflow->conn))
|
if (sk_stream_memory_free(sk))
|
||||||
__mptcp_wnd_updated(subflow->conn, sk);
|
__mptcp_check_push(subflow->conn, sk);
|
||||||
__mptcp_data_acked(subflow->conn);
|
__mptcp_data_acked(subflow->conn);
|
||||||
mptcp_data_unlock(subflow->conn);
|
mptcp_data_unlock(subflow->conn);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1658,6 +1658,7 @@ static int mptcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
|
|||||||
frag_truesize += psize;
|
frag_truesize += psize;
|
||||||
pfrag->offset += frag_truesize;
|
pfrag->offset += frag_truesize;
|
||||||
WRITE_ONCE(msk->write_seq, msk->write_seq + psize);
|
WRITE_ONCE(msk->write_seq, msk->write_seq + psize);
|
||||||
|
msk->tx_pending_data += psize;
|
||||||
|
|
||||||
/* charge data on mptcp pending queue to the msk socket
|
/* charge data on mptcp pending queue to the msk socket
|
||||||
* Note: we charge such data both to sk and ssk
|
* Note: we charge such data both to sk and ssk
|
||||||
@@ -1683,10 +1684,8 @@ wait_for_memory:
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copied) {
|
if (copied)
|
||||||
msk->tx_pending_data += copied;
|
|
||||||
mptcp_push_pending(sk, msg->msg_flags);
|
mptcp_push_pending(sk, msg->msg_flags);
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
release_sock(sk);
|
release_sock(sk);
|
||||||
@@ -2119,7 +2118,7 @@ void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,
|
|||||||
|
|
||||||
list_del(&subflow->node);
|
list_del(&subflow->node);
|
||||||
|
|
||||||
lock_sock(ssk);
|
lock_sock_nested(ssk, SINGLE_DEPTH_NESTING);
|
||||||
|
|
||||||
/* if we are invoked by the msk cleanup code, the subflow is
|
/* if we are invoked by the msk cleanup code, the subflow is
|
||||||
* already orphaned
|
* already orphaned
|
||||||
@@ -2699,6 +2698,8 @@ struct sock *mptcp_sk_clone(const struct sock *sk,
|
|||||||
sock_reset_flag(nsk, SOCK_RCU_FREE);
|
sock_reset_flag(nsk, SOCK_RCU_FREE);
|
||||||
/* will be fully established after successful MPC subflow creation */
|
/* will be fully established after successful MPC subflow creation */
|
||||||
inet_sk_state_store(nsk, TCP_SYN_RECV);
|
inet_sk_state_store(nsk, TCP_SYN_RECV);
|
||||||
|
|
||||||
|
security_inet_csk_clone(nsk, req);
|
||||||
bh_unlock_sock(nsk);
|
bh_unlock_sock(nsk);
|
||||||
|
|
||||||
/* keep a single reference */
|
/* keep a single reference */
|
||||||
@@ -2913,7 +2914,7 @@ void __mptcp_data_acked(struct sock *sk)
|
|||||||
mptcp_schedule_work(sk);
|
mptcp_schedule_work(sk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __mptcp_wnd_updated(struct sock *sk, struct sock *ssk)
|
void __mptcp_check_push(struct sock *sk, struct sock *ssk)
|
||||||
{
|
{
|
||||||
if (!mptcp_send_head(sk))
|
if (!mptcp_send_head(sk))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ void mptcp_rcv_space_init(struct mptcp_sock *msk, const struct sock *ssk);
|
|||||||
void mptcp_data_ready(struct sock *sk, struct sock *ssk);
|
void mptcp_data_ready(struct sock *sk, struct sock *ssk);
|
||||||
bool mptcp_finish_join(struct sock *sk);
|
bool mptcp_finish_join(struct sock *sk);
|
||||||
bool mptcp_schedule_work(struct sock *sk);
|
bool mptcp_schedule_work(struct sock *sk);
|
||||||
void __mptcp_wnd_updated(struct sock *sk, struct sock *ssk);
|
void __mptcp_check_push(struct sock *sk, struct sock *ssk);
|
||||||
void __mptcp_data_acked(struct sock *sk);
|
void __mptcp_data_acked(struct sock *sk);
|
||||||
void mptcp_subflow_eof(struct sock *sk);
|
void mptcp_subflow_eof(struct sock *sk);
|
||||||
bool mptcp_update_rcv_data_fin(struct mptcp_sock *msk, u64 data_fin_seq, bool use_64bit);
|
bool mptcp_update_rcv_data_fin(struct mptcp_sock *msk, u64 data_fin_seq, bool use_64bit);
|
||||||
|
|||||||
@@ -1597,6 +1597,21 @@ free_sched:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void taprio_reset(struct Qdisc *sch)
|
||||||
|
{
|
||||||
|
struct taprio_sched *q = qdisc_priv(sch);
|
||||||
|
struct net_device *dev = qdisc_dev(sch);
|
||||||
|
int i;
|
||||||
|
|
||||||
|
hrtimer_cancel(&q->advance_timer);
|
||||||
|
if (q->qdiscs) {
|
||||||
|
for (i = 0; i < dev->num_tx_queues && q->qdiscs[i]; i++)
|
||||||
|
qdisc_reset(q->qdiscs[i]);
|
||||||
|
}
|
||||||
|
sch->qstats.backlog = 0;
|
||||||
|
sch->q.qlen = 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void taprio_destroy(struct Qdisc *sch)
|
static void taprio_destroy(struct Qdisc *sch)
|
||||||
{
|
{
|
||||||
struct taprio_sched *q = qdisc_priv(sch);
|
struct taprio_sched *q = qdisc_priv(sch);
|
||||||
@@ -1607,7 +1622,6 @@ static void taprio_destroy(struct Qdisc *sch)
|
|||||||
list_del(&q->taprio_list);
|
list_del(&q->taprio_list);
|
||||||
spin_unlock(&taprio_list_lock);
|
spin_unlock(&taprio_list_lock);
|
||||||
|
|
||||||
hrtimer_cancel(&q->advance_timer);
|
|
||||||
|
|
||||||
taprio_disable_offload(dev, q, NULL);
|
taprio_disable_offload(dev, q, NULL);
|
||||||
|
|
||||||
@@ -1954,6 +1968,7 @@ static struct Qdisc_ops taprio_qdisc_ops __read_mostly = {
|
|||||||
.init = taprio_init,
|
.init = taprio_init,
|
||||||
.change = taprio_change,
|
.change = taprio_change,
|
||||||
.destroy = taprio_destroy,
|
.destroy = taprio_destroy,
|
||||||
|
.reset = taprio_reset,
|
||||||
.peek = taprio_peek,
|
.peek = taprio_peek,
|
||||||
.dequeue = taprio_dequeue,
|
.dequeue = taprio_dequeue,
|
||||||
.enqueue = taprio_enqueue,
|
.enqueue = taprio_enqueue,
|
||||||
|
|||||||
@@ -394,6 +394,22 @@ errout:
|
|||||||
return -EMSGSIZE;
|
return -EMSGSIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool smc_nl_handle_pci_values(const struct smc_pci_dev *smc_pci_dev,
|
||||||
|
struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
if (nla_put_u32(skb, SMC_NLA_DEV_PCI_FID, smc_pci_dev->pci_fid))
|
||||||
|
return false;
|
||||||
|
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_CHID, smc_pci_dev->pci_pchid))
|
||||||
|
return false;
|
||||||
|
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_VENDOR, smc_pci_dev->pci_vendor))
|
||||||
|
return false;
|
||||||
|
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_DEVICE, smc_pci_dev->pci_device))
|
||||||
|
return false;
|
||||||
|
if (nla_put_string(skb, SMC_NLA_DEV_PCI_ID, smc_pci_dev->pci_id))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static int smc_nl_handle_smcr_dev(struct smc_ib_device *smcibdev,
|
static int smc_nl_handle_smcr_dev(struct smc_ib_device *smcibdev,
|
||||||
struct sk_buff *skb,
|
struct sk_buff *skb,
|
||||||
struct netlink_callback *cb)
|
struct netlink_callback *cb)
|
||||||
@@ -417,19 +433,13 @@ static int smc_nl_handle_smcr_dev(struct smc_ib_device *smcibdev,
|
|||||||
is_crit = smcr_diag_is_dev_critical(&smc_lgr_list, smcibdev);
|
is_crit = smcr_diag_is_dev_critical(&smc_lgr_list, smcibdev);
|
||||||
if (nla_put_u8(skb, SMC_NLA_DEV_IS_CRIT, is_crit))
|
if (nla_put_u8(skb, SMC_NLA_DEV_IS_CRIT, is_crit))
|
||||||
goto errattr;
|
goto errattr;
|
||||||
memset(&smc_pci_dev, 0, sizeof(smc_pci_dev));
|
if (smcibdev->ibdev->dev.parent) {
|
||||||
pci_dev = to_pci_dev(smcibdev->ibdev->dev.parent);
|
memset(&smc_pci_dev, 0, sizeof(smc_pci_dev));
|
||||||
smc_set_pci_values(pci_dev, &smc_pci_dev);
|
pci_dev = to_pci_dev(smcibdev->ibdev->dev.parent);
|
||||||
if (nla_put_u32(skb, SMC_NLA_DEV_PCI_FID, smc_pci_dev.pci_fid))
|
smc_set_pci_values(pci_dev, &smc_pci_dev);
|
||||||
goto errattr;
|
if (!smc_nl_handle_pci_values(&smc_pci_dev, skb))
|
||||||
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_CHID, smc_pci_dev.pci_pchid))
|
goto errattr;
|
||||||
goto errattr;
|
}
|
||||||
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_VENDOR, smc_pci_dev.pci_vendor))
|
|
||||||
goto errattr;
|
|
||||||
if (nla_put_u16(skb, SMC_NLA_DEV_PCI_DEVICE, smc_pci_dev.pci_device))
|
|
||||||
goto errattr;
|
|
||||||
if (nla_put_string(skb, SMC_NLA_DEV_PCI_ID, smc_pci_dev.pci_id))
|
|
||||||
goto errattr;
|
|
||||||
snprintf(smc_ibname, sizeof(smc_ibname), "%s", smcibdev->ibdev->name);
|
snprintf(smc_ibname, sizeof(smc_ibname), "%s", smcibdev->ibdev->name);
|
||||||
if (nla_put_string(skb, SMC_NLA_DEV_IB_NAME, smc_ibname))
|
if (nla_put_string(skb, SMC_NLA_DEV_IB_NAME, smc_ibname))
|
||||||
goto errattr;
|
goto errattr;
|
||||||
|
|||||||
@@ -213,12 +213,14 @@ static int __tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
info.attrs = attrbuf;
|
info.attrs = attrbuf;
|
||||||
err = nlmsg_parse_deprecated(cb.nlh, GENL_HDRLEN, attrbuf,
|
|
||||||
tipc_genl_family.maxattr,
|
|
||||||
tipc_genl_family.policy, NULL);
|
|
||||||
if (err)
|
|
||||||
goto err_out;
|
|
||||||
|
|
||||||
|
if (nlmsg_len(cb.nlh) > 0) {
|
||||||
|
err = nlmsg_parse_deprecated(cb.nlh, GENL_HDRLEN, attrbuf,
|
||||||
|
tipc_genl_family.maxattr,
|
||||||
|
tipc_genl_family.policy, NULL);
|
||||||
|
if (err)
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
do {
|
do {
|
||||||
int rem;
|
int rem;
|
||||||
|
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ run_test 10 10 0 0 "balanced bwidth"
|
|||||||
run_test 10 10 1 50 "balanced bwidth with unbalanced delay"
|
run_test 10 10 1 50 "balanced bwidth with unbalanced delay"
|
||||||
|
|
||||||
# we still need some additional infrastructure to pass the following test-cases
|
# we still need some additional infrastructure to pass the following test-cases
|
||||||
# run_test 30 10 0 0 "unbalanced bwidth"
|
run_test 30 10 0 0 "unbalanced bwidth"
|
||||||
# run_test 30 10 1 50 "unbalanced bwidth with unbalanced delay"
|
run_test 30 10 1 50 "unbalanced bwidth with unbalanced delay"
|
||||||
# run_test 30 10 50 1 "unbalanced bwidth with opposed, unbalanced delay"
|
run_test 30 10 50 1 "unbalanced bwidth with opposed, unbalanced delay"
|
||||||
exit $ret
|
exit $ret
|
||||||
|
|||||||
Reference in New Issue
Block a user