mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-01 22:37:41 -04:00
Compare commits
6 Commits
dc9e9d61e3
...
4ee937107d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ee937107d | ||
|
|
cedc1bf327 | ||
|
|
e6e3eb5ee8 | ||
|
|
ddc748a391 | ||
|
|
514aac3599 | ||
|
|
fd63f18597 |
@@ -794,18 +794,34 @@ static int airoha_qdma_init_rx_queue(struct airoha_queue *q,
|
||||
|
||||
static void airoha_qdma_cleanup_rx_queue(struct airoha_queue *q)
|
||||
{
|
||||
struct airoha_eth *eth = q->qdma->eth;
|
||||
struct airoha_qdma *qdma = q->qdma;
|
||||
struct airoha_eth *eth = qdma->eth;
|
||||
int qid = q - &qdma->q_rx[0];
|
||||
|
||||
while (q->queued) {
|
||||
struct airoha_queue_entry *e = &q->entry[q->tail];
|
||||
struct airoha_qdma_desc *desc = &q->desc[q->tail];
|
||||
struct page *page = virt_to_head_page(e->buf);
|
||||
|
||||
dma_sync_single_for_cpu(eth->dev, e->dma_addr, e->dma_len,
|
||||
page_pool_get_dma_dir(q->page_pool));
|
||||
page_pool_put_full_page(q->page_pool, page, false);
|
||||
/* Reset DMA descriptor */
|
||||
WRITE_ONCE(desc->ctrl, 0);
|
||||
WRITE_ONCE(desc->addr, 0);
|
||||
WRITE_ONCE(desc->data, 0);
|
||||
WRITE_ONCE(desc->msg0, 0);
|
||||
WRITE_ONCE(desc->msg1, 0);
|
||||
WRITE_ONCE(desc->msg2, 0);
|
||||
WRITE_ONCE(desc->msg3, 0);
|
||||
|
||||
q->tail = (q->tail + 1) % q->ndesc;
|
||||
q->queued--;
|
||||
}
|
||||
|
||||
q->head = q->tail;
|
||||
airoha_qdma_rmw(qdma, REG_RX_DMA_IDX(qid), RX_RING_DMA_IDX_MASK,
|
||||
FIELD_PREP(RX_RING_DMA_IDX_MASK, q->tail));
|
||||
}
|
||||
|
||||
static int airoha_qdma_init_rx(struct airoha_qdma *qdma)
|
||||
@@ -2946,6 +2962,8 @@ static int airoha_register_gdm_devices(struct airoha_eth *eth)
|
||||
return err;
|
||||
}
|
||||
|
||||
set_bit(DEV_STATE_REGISTERED, ð->state);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ enum {
|
||||
|
||||
enum {
|
||||
DEV_STATE_INITIALIZED,
|
||||
DEV_STATE_REGISTERED,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
@@ -1368,6 +1368,13 @@ int airoha_ppe_setup_tc_block_cb(struct airoha_ppe_dev *dev, void *type_data)
|
||||
struct airoha_eth *eth = ppe->eth;
|
||||
int err = 0;
|
||||
|
||||
/* Netfilter flowtable can try to offload flower rules while not all
|
||||
* the net_devices are registered or initialized. Delay offloading
|
||||
* until all net_devices are registered in the system.
|
||||
*/
|
||||
if (!test_bit(DEV_STATE_REGISTERED, ð->state))
|
||||
return -EBUSY;
|
||||
|
||||
mutex_lock(&flow_offload_mutex);
|
||||
|
||||
if (!eth->npu)
|
||||
|
||||
@@ -8671,7 +8671,7 @@ static int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
|
||||
struct hwrm_func_backing_store_qcaps_v2_output *resp;
|
||||
struct hwrm_func_backing_store_qcaps_v2_input *req;
|
||||
struct bnxt_ctx_mem_info *ctx = bp->ctx;
|
||||
u16 type;
|
||||
u16 type, next_type = 0;
|
||||
int rc;
|
||||
|
||||
rc = hwrm_req_init(bp, req, HWRM_FUNC_BACKING_STORE_QCAPS_V2);
|
||||
@@ -8687,7 +8687,7 @@ static int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
|
||||
|
||||
resp = hwrm_req_hold(bp, req);
|
||||
|
||||
for (type = 0; type < BNXT_CTX_V2_MAX; ) {
|
||||
for (type = 0; type < BNXT_CTX_V2_MAX; type = next_type) {
|
||||
struct bnxt_ctx_mem_type *ctxm = &ctx->ctx_arr[type];
|
||||
u8 init_val, init_off, i;
|
||||
u32 max_entries;
|
||||
@@ -8700,7 +8700,7 @@ static int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
|
||||
if (rc)
|
||||
goto ctx_done;
|
||||
flags = le32_to_cpu(resp->flags);
|
||||
type = le16_to_cpu(resp->next_valid_type);
|
||||
next_type = le16_to_cpu(resp->next_valid_type);
|
||||
if (!(flags & BNXT_CTX_MEM_TYPE_VALID)) {
|
||||
bnxt_free_one_ctx_mem(bp, ctxm, true);
|
||||
continue;
|
||||
@@ -8715,7 +8715,7 @@ static int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
|
||||
else
|
||||
continue;
|
||||
}
|
||||
ctxm->type = le16_to_cpu(resp->type);
|
||||
ctxm->type = type;
|
||||
ctxm->entry_size = entry_size;
|
||||
ctxm->flags = flags;
|
||||
ctxm->instance_bmap = le32_to_cpu(resp->instance_bit_map);
|
||||
|
||||
@@ -3821,10 +3821,15 @@ static netdev_features_t gso_features_check(const struct sk_buff *skb,
|
||||
* segmentation-offloads.rst).
|
||||
*/
|
||||
if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4) {
|
||||
struct iphdr *iph = skb->encapsulation ?
|
||||
inner_ip_hdr(skb) : ip_hdr(skb);
|
||||
const struct iphdr *iph;
|
||||
struct iphdr _iph;
|
||||
int nhoff = skb->encapsulation ?
|
||||
skb_inner_network_offset(skb) :
|
||||
skb_network_offset(skb);
|
||||
|
||||
if (!(iph->frag_off & htons(IP_DF)))
|
||||
iph = skb_header_pointer(skb, nhoff, sizeof(_iph), &_iph);
|
||||
|
||||
if (!iph || !(iph->frag_off & htons(IP_DF)))
|
||||
features &= ~dev->mangleid_features;
|
||||
}
|
||||
|
||||
|
||||
@@ -3625,12 +3625,12 @@ static void addrconf_permanent_addr(struct net *net, struct net_device *dev)
|
||||
if ((ifp->flags & IFA_F_PERMANENT) &&
|
||||
fixup_permanent_addr(net, idev, ifp) < 0) {
|
||||
write_unlock_bh(&idev->lock);
|
||||
in6_ifa_hold(ifp);
|
||||
ipv6_del_addr(ifp);
|
||||
write_lock_bh(&idev->lock);
|
||||
|
||||
net_info_ratelimited("%s: Failed to add prefix route for address %pI6c; dropping\n",
|
||||
idev->dev->name, &ifp->addr);
|
||||
in6_ifa_hold(ifp);
|
||||
ipv6_del_addr(ifp);
|
||||
write_lock_bh(&idev->lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2969,6 +2969,7 @@ static int tc_chain_fill_node(const struct tcf_proto_ops *tmplt_ops,
|
||||
tcm->tcm__pad1 = 0;
|
||||
tcm->tcm__pad2 = 0;
|
||||
tcm->tcm_handle = 0;
|
||||
tcm->tcm_info = 0;
|
||||
if (block->q) {
|
||||
tcm->tcm_ifindex = qdisc_dev(block->q)->ifindex;
|
||||
tcm->tcm_parent = block->q->handle;
|
||||
|
||||
Reference in New Issue
Block a user